    {-# LINE 2 "./Graphics/UI/Gtk/Display/Label.chs" #-}
    {-# LANGUAGE ScopedTypeVariables #-}

    {-# LINE 3 "./Graphics/UI/Gtk/Display/Label.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widget Label
    --
    -- Author : Manuel M. T. Chakravarty, Axel Simon, Andy Stewart
    --
    -- Created: 2 May 2001
    --
    -- Copyright (C) 1999-2005 Axel Simon
    -- Copyright (C) 2009 Andy Stewart
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- A widget that displays a small to medium amount of text
    --
    module Graphics.UI.Gtk.Display.Label (
    -- * Detail
    --
    -- | The 'Label' widget displays a small amount of text. As the name implies,
    -- most labels are used to label another widget such as a 'Button', a
    -- 'MenuItem', or a 'OptionMenu'.

    -- ** Mnemonics
    --
    -- | Labels may contain mnemonics. Mnemonics are underlined characters in the
    -- label, used for keyboard navigation. Mnemonics are created by providing a
    -- string with an underscore before the mnemonic character, such as
    -- @\"_File\"@, to the functions 'labelNewWithMnemonic' or
    -- 'labelSetTextWithMnemonic'.
    --
    -- Mnemonics automatically activate any activatable widget the label is
    -- inside, such as a 'Button'; if the label is not inside the mnemonic's target
    -- widget, you have to tell the label about the target using
    -- 'labelSetMnemonicWidget'. Here's a simple example where the label is inside
    -- a button: There's a convenience function to create buttons with a mnemonic
    -- label already inside: To create a mnemonic for a widget alongside the label,
    -- such as a 'Entry', you have to point the label at the entry with
    -- 'labelSetMnemonicWidget':
    --
    -- > -- Pressing Alt+H will activate this button
    -- > button <- buttonNew
    -- > label <- labelNewWithMnemonic "_Hello"
    -- > containerAdd button label
    --
    -- > -- Pressing Alt+H will activate this button
    -- > button <- buttonNewWithMnemonic "_Hello"
    --
    -- > -- Pressing Alt+H will focus the entry
    -- > entry <- entryNew
    -- > label <- labelNewWithMnemonic "_Hello"
    -- > labelSetMnemonicWidget label entry

    -- ** Markup (styled text)
    --
    -- | To make it easy to format text in a label (changing colors, fonts, etc.),
    -- label text can be provided in a simple markup format. Here's how to create a
    -- label with a small font: (See complete documentation of available tags in
    -- the Pango manual.)
    --
    -- > label <- labelNew Nothing
    -- > labelSetMarkup label "<small>Small text</small>"
    --
    -- The markup passed to 'labelSetMarkup' must be valid; for example, literal
    -- \<\/>\/& characters must be escaped as @\"&lt;\"@, @\"&gt;\"@, and
    -- @\"&amp;@\". If you pass
    -- text obtained from the user, file, or a network to 'labelSetMarkup', you\'ll
    -- want to escape it with 'Graphics.Rendering.Pango.Layout.escapeMarkup'.

    -- ** Selectable labels
    --
    -- | Labels can be made selectable with 'labelSetSelectable'. Selectable
    -- labels allow the user to copy the label contents to the clipboard. Only
    -- labels that contain useful-to-copy information - such as error messages -
    -- should be made selectable.

    -- ** Text layout
    --
    -- | A label can contain any number of paragraphs, but will have performance
    -- problems if it contains more than a small number. Paragraphs are separated
    -- by newlines or other paragraph separators understood by Pango.
    --
    -- Labels can automatically wrap text if you call 'labelSetLineWrap'.
    --
    -- 'labelSetJustify' sets how the lines in a label align with one another.
    -- If you want to set how the label as a whole aligns in its available space,
    -- see 'Graphics.UI.Gtk.Abstract.Misc.miscSetAlignment'.
    --

    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'Object'
    -- | +----'Widget'
    -- | +----'Misc'
    -- | +----Label
    -- | +----'AccelLabel'
    -- | +----'TipsQuery'
    -- @

    -- * Types
      Label,
      LabelClass,
      castToLabel, gTypeLabel,
      toLabel,

    -- * Constructors
      labelNew,
      labelNewWithMnemonic,

    -- * Methods
      labelSetText,
      labelSetLabel,
      labelSetTextWithMnemonic,
      labelSetMarkup,
      labelSetMarkupWithMnemonic,
      labelSetMnemonicWidget,
      labelGetMnemonicWidget,
      KeyVal,
      labelGetMnemonicKeyval,
      labelSetUseMarkup,
      labelGetUseMarkup,
      labelSetUseUnderline,
      labelGetUseUnderline,
      labelGetText,
      labelGetLabel,
      labelSetAttributes,
      labelGetAttributes,
      labelSetPattern,
      Justification(..),
      labelSetJustify,
      labelGetJustify,
      labelGetLayout,
      labelSetLineWrap,
      labelGetLineWrap,
      labelSetLineWrapMode,
      labelGetLineWrapMode,
      labelSetSelectable,
      labelGetSelectable,
      labelSelectRegion,
      labelGetSelectionBounds,
      labelGetLayoutOffsets,

      labelSetEllipsize,
      labelGetEllipsize,
      labelSetWidthChars,
      labelGetWidthChars,
      labelSetMaxWidthChars,
      labelGetMaxWidthChars,
      labelSetSingleLineMode,
      labelGetSingleLineMode,
      labelSetAngle,
      labelGetAngle,

    -- * Attributes
      labelLabel,
      labelUseMarkup,
      labelUseUnderline,
      labelJustify,
      labelWrap,
      labelWrapMode,
      labelSelectable,
      labelMnemonicWidget,
      labelMnemonicKeyval,
      labelPattern,
      labelCursorPosition,
      labelSelectionBound,

      labelEllipsize,
      labelWidthChars,
      labelSingleLineMode,
      labelAngle,
      labelAttributes,
      labelMaxWidthChars,

      labelLineWrap,
      labelText,

    -- * Signals
      labelActiveCurrentLink,
      labelActiveLink,
      labelCopyClipboard,
      labelMoveCursor,
      labelPopulatePopup
      ) where

    import Control.Monad (liftM)
    import Data.Text (Text)
    import qualified Data.Text as T (pack)

    import System.Glib.FFI
    import System.Glib.UTFString
    import System.Glib.Attributes
    import System.Glib.Properties
    import Graphics.Rendering.Pango.Layout
    {-# LINE 211 "./Graphics/UI/Gtk/Display/Label.chs" #-}
    import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
    import Graphics.UI.Gtk.Types
    {-# LINE 213 "./Graphics/UI/Gtk/Display/Label.chs" #-}
    import Graphics.Rendering.Pango.Attributes ( withAttrList, fromAttrList)
    import Graphics.UI.Gtk.Gdk.Keys (KeyVal)
    import Graphics.UI.Gtk.General.Enums (Justification(..), MovementStep (..))
    import Graphics.Rendering.Pango.BasicTypes (PangoLayout(PangoLayout),
                                             makeNewPangoString, PangoString(..) )
    import Graphics.Rendering.Pango.Types (mkPangoLayoutRaw, PangoLayoutRaw)
    import Graphics.Rendering.Pango.Enums (PangoAttribute)
    import Data.IORef ( newIORef )
    import Graphics.UI.Gtk.Signals
    {-# LINE 222 "./Graphics/UI/Gtk/Display/Label.chs" #-}

    {-# LINE 224 "./Graphics/UI/Gtk/Display/Label.chs" #-}

    --------------------
    -- Constructors

    -- | Creates a new label with the given text inside it. You can pass @Nothing@
    -- to get an empty label widget.
    --
    labelNew :: GlibString string => Maybe string -> IO Label
    labelNew :: forall string. GlibString string => Maybe string -> IO Label
    labelNew Maybe string
    str =
      (ForeignPtr Label -> Label, FinalizerPtr Label)
    -> IO (Ptr Label) -> IO Label
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Label -> Label, FinalizerPtr Label)
    forall {a}. (ForeignPtr Label -> Label, FinalizerPtr a)
    mkLabel (IO (Ptr Label) -> IO Label) -> IO (Ptr Label) -> IO Label
    forall a b. (a -> b) -> a -> b
    $
      (Ptr Widget -> Ptr Label) -> IO (Ptr Widget) -> IO (Ptr Label)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Ptr Widget -> Ptr Label
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr Widget -> Ptr Label) (IO (Ptr Widget) -> IO (Ptr Label))
    -> IO (Ptr Widget) -> IO (Ptr Label)
    forall a b. (a -> b) -> a -> b
    $
      (string -> (Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> Maybe string
    -> (Ptr CChar -> IO (Ptr Widget))
    -> IO (Ptr Widget)
    forall a b c.
    (a -> (Ptr b -> IO c) -> IO c)
    -> Maybe a -> (Ptr b -> IO c) -> IO c
    maybeWith string -> (Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString Maybe string
    str ((Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      Ptr CChar -> IO (Ptr Widget)
    gtk_label_new
    {-# LINE 237 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        strPtr

    -- | Creates a new 'Label', containing the text in @str@.
    --
    -- If characters in @str@ 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
    -- 'labelSetMnemonicWidget'.
    --
    -- If 'labelSetMnemonicWidget' is not called, then the first activatable
    -- ancestor of the 'Label' 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 -- ^ @str@ - The text of the label, with an underscore in front
                 -- of the mnemonic character
     -> IO Label
    labelNewWithMnemonic :: forall string. GlibString string => string -> IO Label
    labelNewWithMnemonic string
    str =
      (ForeignPtr Label -> Label, FinalizerPtr Label)
    -> IO (Ptr Label) -> IO Label
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Label -> Label, FinalizerPtr Label)
    forall {a}. (ForeignPtr Label -> Label, FinalizerPtr a)
    mkLabel (IO (Ptr Label) -> IO Label) -> IO (Ptr Label) -> IO Label
    forall a b. (a -> b) -> a -> b
    $
      (Ptr Widget -> Ptr Label) -> IO (Ptr Widget) -> IO (Ptr Label)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Ptr Widget -> Ptr Label
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr Widget -> Ptr Label) (IO (Ptr Widget) -> IO (Ptr Label))
    -> IO (Ptr Widget) -> IO (Ptr Label)
    forall a b. (a -> b) -> a -> b
    $
      string -> (Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    str ((Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr CChar -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      Ptr CChar -> IO (Ptr Widget)
    gtk_label_new_with_mnemonic
    {-# LINE 262 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        strPtr

    --------------------
    -- Methods

    -- | Sets the text within the 'Label' 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 ()
    labelSetText :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetText self
    self string
    str =
      string -> (Ptr CChar -> IO ()) -> IO ()
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    str ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_text Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 276 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CChar
    strPtr

    -- | 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 ()
    labelSetLabel :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetLabel self
    self string
    str =
      string -> (Ptr CChar -> IO ()) -> IO ()
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    str ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_label Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 287 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CChar
    strPtr

    -- | 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 'labelUseUnderline' or
    -- 'labelUseMarkup' 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] -- ^ @attr@ 'PangoAttribute'
     -> IO ()
    labelSetAttributes :: forall self. LabelClass self => self -> [PangoAttribute] -> IO ()
    labelSetAttributes self
    self [PangoAttribute]
    attrs = do
      (txt :: Text) <- self -> IO Text
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetText self
    self
      ps <- makeNewPangoString txt
      withAttrList ps attrs $ \Ptr ()
    alPtr ->
        (\(Label ForeignPtr Label
    arg1) Ptr ()
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr () -> IO ()
    gtk_label_set_attributes Ptr Label
    argPtr1 Ptr ()
    arg2) (self -> Label
    forall o. LabelClass o => o -> Label
    toLabel self
    self) Ptr ()
    alPtr

    -- | Gets the attribute list that was set on the label using 'labelSetAttributes', if any.
    -- This function does not reflect attributes that come from the labels markup (see 'labelSetMarkup').
    -- If you want to get the effective attributes for the label, use 'layoutGetAttributes' ('labelGetLayout' (label)).
    --
    labelGetAttributes :: LabelClass self => self
     -> IO [PangoAttribute] -- ^ return the attribute list, or Empty if none was set.
    labelGetAttributes :: forall self. LabelClass self => self -> IO [PangoAttribute]
    labelGetAttributes self
    self = do
      (txt :: Text) <- self -> IO Text
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetText self
    self
      (PangoString correct _ _ ) <- makeNewPangoString txt
      attrListPtr <- (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr Label -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO (Ptr ())
    gtk_label_get_attributes Ptr Label
    argPtr1) (toLabel self)
      attr <- fromAttrList correct attrListPtr
      return $ concat attr

    -- | Parses @str@ which is marked up with the Pango text markup language,
    -- as defined in "Graphics.Rendering.Pango.Markup",
    -- setting the label's text and attribute list based on the parse results. If
    -- the @str@ is external data, you may need to escape it.
    --
    labelSetMarkup :: (LabelClass self, GlibString markup) => self
     -> markup -- ^ @str@ - a markup string (see Pango markup format)
     -> IO ()
    labelSetMarkup :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetMarkup self
    self markup
    str =
      markup -> (Ptr CChar -> IO ()) -> IO ()
    forall a. markup -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString markup
    str ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_markup Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 332 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CChar
    strPtr

    -- | Parses @str@ which is marked up with the Pango text markup language,
    -- as defined in "Graphics.Rendering.Pango.Markup",
    -- setting the label's text and attribute list based on the parse results. If
    -- characters in @str@ 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 'labelSetMnemonicWidget'.
    --
    labelSetMarkupWithMnemonic :: (LabelClass self, GlibString markup) => self
     -> markup -- ^ @str@ - a markup string (see Pango markup format)
     -> IO ()
    labelSetMarkupWithMnemonic :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetMarkupWithMnemonic self
    self markup
    str =
      markup -> (Ptr CChar -> IO ()) -> IO ()
    forall a. markup -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString markup
    str ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_markup_with_mnemonic Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 350 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CChar
    strPtr

    -- | Underline parts of the text, odd indices of the list represent underlined
    -- parts.
    --
    labelSetPattern :: LabelClass l => l -> [Int] -> IO ()
    labelSetPattern :: forall l. LabelClass l => l -> [Int] -> IO ()
    labelSetPattern l
    self [Int]
    list =
      Text -> (Ptr CChar -> IO ()) -> IO ()
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    forall a. Text -> (Ptr CChar -> IO a) -> IO a
    withUTFString (String -> Text
    T.pack String
    str) ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_pattern Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 360 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
      where
        str :: String
    str = [String] -> String
    forall (t :: * -> *) a. Foldable t => t [a] -> [a]
    concat ([String] -> String) -> [String] -> String
    forall a b. (a -> b) -> a -> b
    $ (Int -> Char -> String) -> [Int] -> String -> [String]
    forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
    zipWith Int -> Char -> String
    forall a. Int -> a -> [a]
    replicate [Int]
    list (String -> String
    forall a. HasCallStack => [a] -> [a]
    cycle [Char
    '_',Char
    ' '])

    -- | Sets the alignment of the lines in the text of the label relative to each
    -- other. 'JustifyLeft' is the default value when the widget is first created
    -- with 'labelNew'. If you instead want to set the alignment of the label as a
    -- whole, use 'Graphics.UI.Gtk.Abstract.Misc.miscSetAlignment' instead.
    -- 'labelSetJustify' has no effect on labels containing only a single line.
    --
    labelSetJustify :: LabelClass self => self -> Justification -> IO ()
    labelSetJustify :: forall self. LabelClass self => self -> Justification -> IO ()
    labelSetJustify self
    self Justification
    jtype =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_justify Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 373 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        ((Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt) -> (Justification -> Int) -> Justification -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Justification -> Int
    forall a. Enum a => a -> Int
    fromEnum) Justification
    jtype)

    -- | Returns the justification of the label. See 'labelSetJustify'.
    --
    labelGetJustify :: LabelClass self => self -> IO Justification
    labelGetJustify :: forall self. LabelClass self => self -> IO Justification
    labelGetJustify self
    self =
      (CInt -> Justification) -> IO CInt -> IO Justification
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> Justification
    forall a. Enum a => Int -> a
    toEnum (Int -> Justification) -> (CInt -> Int) -> CInt -> Justification
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO Justification) -> IO CInt -> IO Justification
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_justify Ptr Label
    argPtr1)
    {-# LINE 382 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Gets the 'PangoLayout' used to display the label. The layout is useful to
    -- e.g. convert text positions to pixel positions, in combination with
    -- 'labelGetLayoutOffsets'.
    --
    labelGetLayout :: LabelClass self => self -> IO PangoLayout
    labelGetLayout :: forall self. LabelClass self => self -> IO PangoLayout
    labelGetLayout self
    self = do
      plr <- (ForeignPtr PangoLayoutRaw -> PangoLayoutRaw,
     FinalizerPtr PangoLayoutRaw)
    -> IO (Ptr PangoLayoutRaw) -> IO PangoLayoutRaw
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr PangoLayoutRaw -> PangoLayoutRaw,
     FinalizerPtr PangoLayoutRaw)
    forall {a}.
    (ForeignPtr PangoLayoutRaw -> PangoLayoutRaw, FinalizerPtr a)
    mkPangoLayoutRaw (IO (Ptr PangoLayoutRaw) -> IO PangoLayoutRaw)
    -> IO (Ptr PangoLayoutRaw) -> IO PangoLayoutRaw
    forall a b. (a -> b) -> a -> b
    $
        (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label
    -> (Ptr Label -> IO (Ptr PangoLayoutRaw))
    -> IO (Ptr PangoLayoutRaw)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO (Ptr PangoLayoutRaw)) -> IO (Ptr PangoLayoutRaw))
    -> (Ptr Label -> IO (Ptr PangoLayoutRaw))
    -> IO (Ptr PangoLayoutRaw)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO (Ptr PangoLayoutRaw)
    gtk_label_get_layout Ptr Label
    argPtr1) (self -> Label
    forall o. LabelClass o => o -> Label
    toLabel self
    self)
      (txt :: Text) <- labelGetText self
      ps <- makeNewPangoString txt
      psRef <- newIORef ps
      return (PangoLayout psRef plr)

    -- | Toggles line wrapping within the 'Label' widget. @True@ makes it break
    -- lines if text exceeds the widget's size. @False@ lets the text get cut off
    -- by the edge of the widget if it exceeds the widget size.
    --
    labelSetLineWrap :: LabelClass self => self
     -> Bool -- ^ @wrap@ - the setting
     -> IO ()
    labelSetLineWrap :: forall self. LabelClass self => self -> Bool -> IO ()
    labelSetLineWrap self
    self Bool
    wrap =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_line_wrap Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 406 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    wrap)

    -- | Returns whether lines in the label are automatically wrapped. See
    -- 'labelSetLineWrap'.
    --
    labelGetLineWrap :: LabelClass self => self
     -> IO Bool -- ^ returns @True@ if the lines of the label are automatically
                -- wrapped.
    labelGetLineWrap :: forall self. LabelClass self => self -> IO Bool
    labelGetLineWrap self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_line_wrap Ptr Label
    argPtr1)
    {-# LINE 418 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | If line wrapping is on (see 'labelSetLineWrap') this controls how the line wrapping is done.
    -- The default is 'WrapWholeWords' which means wrap on word boundaries.
    --
    -- * Available since Gtk+ version 2.10
    --
    labelSetLineWrapMode :: LabelClass self => self
     -> LayoutWrapMode -- ^ @wrapMode@ - the line wrapping mode
     -> IO ()
    labelSetLineWrapMode :: forall self. LabelClass self => self -> LayoutWrapMode -> IO ()
    labelSetLineWrapMode self
    self LayoutWrapMode
    wrapMode =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_line_wrap_mode Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 430 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (LayoutWrapMode -> Int
    forall a. Enum a => a -> Int
    fromEnum LayoutWrapMode
    wrapMode))

    -- | Returns line wrap mode used by the label. See 'labelSetLineWrapMode'.
    --
    -- * Available since Gtk+ version 2.10
    --
    labelGetLineWrapMode :: LabelClass self => self
     -> IO LayoutWrapMode -- ^ return the line wrapping mode
    labelGetLineWrapMode :: forall self. LabelClass self => self -> IO LayoutWrapMode
    labelGetLineWrapMode self
    self = (CInt -> LayoutWrapMode) -> IO CInt -> IO LayoutWrapMode
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> LayoutWrapMode
    forall a. Enum a => Int -> a
    toEnum (Int -> LayoutWrapMode) -> (CInt -> Int) -> CInt -> LayoutWrapMode
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO LayoutWrapMode) -> IO CInt -> IO LayoutWrapMode
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_line_wrap_mode Ptr Label
    argPtr1)
    {-# LINE 441 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Obtains the coordinates where the label will draw the 'PangoLayout'
    -- representing the text in the label; useful to convert mouse events into
    -- coordinates inside the 'PangoLayout', e.g. to take some action if some part
    -- of the label is clicked. Of course you will need to create a 'EventBox' to
    -- receive the events, and pack the label inside it, since labels are a
    -- \'NoWindow\' widget.
    --
    labelGetLayoutOffsets :: LabelClass self => self -> IO (Int, Int)
    labelGetLayoutOffsets :: forall self. LabelClass self => self -> IO (Int, Int)
    labelGetLayoutOffsets self
    self =
      (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CInt -> IO (Int, Int)) -> IO (Int, Int))
    -> (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
    forall a b. (a -> b) -> a -> b
    $ \Ptr CInt
    xPtr ->
      (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CInt -> IO (Int, Int)) -> IO (Int, Int))
    -> (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
    forall a b. (a -> b) -> a -> b
    $ \Ptr CInt
    yPtr -> do
      (\(Label ForeignPtr Label
    arg1) Ptr CInt
    arg2 Ptr CInt
    arg3 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CInt -> Ptr CInt -> IO ()
    gtk_label_get_layout_offsets Ptr Label
    argPtr1 Ptr CInt
    arg2 Ptr CInt
    arg3)
    {-# LINE 455 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CInt
    xPtr
        Ptr CInt
    yPtr
      x <- Ptr CInt -> IO CInt
    forall a. Storable a => Ptr a -> IO a
    peek Ptr CInt
    xPtr
      y <- peek yPtr
      return (fromIntegral x, fromIntegral y)

    -- | 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
    labelGetMnemonicKeyval :: forall self. LabelClass self => self -> IO KeyVal
    labelGetMnemonicKeyval self
    self =
      (CUInt -> KeyVal) -> IO CUInt -> IO KeyVal
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CUInt -> KeyVal
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CUInt -> IO KeyVal) -> IO CUInt -> IO KeyVal
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CUInt) -> IO CUInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CUInt) -> IO CUInt)
    -> (Ptr Label -> IO CUInt) -> IO CUInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CUInt
    gtk_label_get_mnemonic_keyval Ptr Label
    argPtr1)
    {-# LINE 469 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Gets whether the text selectable.
    --
    labelGetSelectable :: LabelClass self => self
     -> IO Bool -- ^ returns @True@ if the user can copy text from the label
    labelGetSelectable :: forall self. LabelClass self => self -> IO Bool
    labelGetSelectable self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_selectable Ptr Label
    argPtr1)
    {-# LINE 478 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Sets whether the text of the label contains markup in Pango's text markup
    -- language. See 'labelSetMarkup'.
    --
    labelSetUseMarkup :: LabelClass self => self
     -> Bool -- ^ @setting@ - @True@ if the label's text should be parsed for
              -- markup.
     -> IO ()
    labelSetUseMarkup :: forall self. LabelClass self => self -> Bool -> IO ()
    labelSetUseMarkup self
    self Bool
    setting =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_use_markup Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 489 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    setting)

    -- | Returns whether the label's text is interpreted as marked up with the
    -- Pango text markup language. See 'labelSetUseMarkup'.
    --
    labelGetUseMarkup :: LabelClass self => self
     -> IO Bool -- ^ returns @True@ if the label's text will be parsed for markup.
    labelGetUseMarkup :: forall self. LabelClass self => self -> IO Bool
    labelGetUseMarkup self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_use_markup Ptr Label
    argPtr1)
    {-# LINE 500 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | If @True@, an underline in the text indicates the next character should be
    -- used for the mnemonic accelerator key.
    --
    labelSetUseUnderline :: LabelClass self => self -> Bool -> IO ()
    labelSetUseUnderline :: forall self. LabelClass self => self -> Bool -> IO ()
    labelSetUseUnderline self
    self Bool
    useUnderline =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_use_underline Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 508 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    useUnderline)

    -- | Returns whether an embedded underline in the label indicates a mnemonic.
    -- See 'labelSetUseUnderline'.
    --
    labelGetUseUnderline :: LabelClass self => self -> IO Bool
    labelGetUseUnderline :: forall self. LabelClass self => self -> IO Bool
    labelGetUseUnderline self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_use_underline Ptr Label
    argPtr1)
    {-# LINE 518 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | 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 'labelGetLabel')
    --
    labelGetText :: (LabelClass self, GlibString string) => self -> IO string
    labelGetText :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetText self
    self =
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO (Ptr CChar)
    gtk_label_get_text Ptr Label
    argPtr1)
    {-# LINE 527 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Gets the text from a label widget including any embedded underlines
    -- indicating mnemonics and Pango markup. (See 'labelGetText').
    --
    labelGetLabel :: (LabelClass self, GlibString string) => self -> IO string
    labelGetLabel :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetLabel self
    self =
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr Label -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO (Ptr CChar)
    gtk_label_get_label Ptr Label
    argPtr1)
    {-# LINE 536 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Selects a range of characters in the label, if the label is selectable.
    -- See 'labelSetSelectable'. If the label is not selectable, this function has
    -- no effect. If @startOffset@ or @endOffset@ are -1, then the end of the label
    -- will be substituted.
    --
    labelSelectRegion :: LabelClass self => self
     -> Int -- ^ @startOffset@ - start offset
     -> Int -- ^ @endOffset@ - end offset
     -> IO ()
    labelSelectRegion :: forall self. LabelClass self => self -> Int -> Int -> IO ()
    labelSelectRegion self
    self Int
    startOffset Int
    endOffset =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 CInt
    arg3 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> CInt -> IO ()
    gtk_label_select_region Ptr Label
    argPtr1 CInt
    arg2 CInt
    arg3)
    {-# LINE 550 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    startOffset)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    endOffset)

    -- | 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))
    labelGetSelectionBounds :: forall self. LabelClass self => self -> IO (Maybe (Int, Int))
    labelGetSelectionBounds self
    self =
      (Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int))
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int)))
    -> (Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr CInt
    startPtr ->
      (Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int))
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int)))
    -> (Ptr CInt -> IO (Maybe (Int, Int))) -> IO (Maybe (Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr CInt
    endPtr -> do
      isSelection <-
        (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
        (\(Label ForeignPtr Label
    arg1) Ptr CInt
    arg2 Ptr CInt
    arg3 -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CInt -> Ptr CInt -> IO CInt
    gtk_label_get_selection_bounds Ptr Label
    argPtr1 Ptr CInt
    arg2 Ptr CInt
    arg3)
    {-# LINE 566 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CInt
    startPtr
        Ptr CInt
    endPtr
      if isSelection
        then do start <- peek startPtr
                end <- peek endPtr
                return $ Just $ (fromIntegral start, fromIntegral end)
        else return Nothing

    -- | If the label has been set so that it has an mnemonic key (using i.e.
    -- 'labelSetMarkupWithMnemonic', 'labelSetTextWithMnemonic',
    -- 'labelNewWithMnemonic' 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 'Button' or a 'Notebook' tab) it is automatically
    -- associated with the correct widget, but sometimes (i.e. when the target is a
    -- 'Entry' 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 -- ^ @widget@ - the target 'Widget'
     -> IO ()
    labelSetMnemonicWidget :: forall self widget.
    (LabelClass self, WidgetClass widget) =>
    self -> widget -> IO ()
    labelSetMnemonicWidget self
    self widget
    widget =
      (\(Label ForeignPtr Label
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr Label -> Ptr Widget -> IO ()
    gtk_label_set_mnemonic_widget Ptr Label
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 594 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (widget -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget widget
    widget)

    -- | Retrieves the target of the mnemonic (keyboard shortcut) of this label.
    -- See 'labelSetMnemonicWidget'.
    --
    labelGetMnemonicWidget :: LabelClass self => self
     -> IO (Maybe Widget) -- ^ returns the target of the label's mnemonic, or
                          -- @Nothing@ if none has been set and the default
                          -- algorithm will be used.
    labelGetMnemonicWidget :: forall self. LabelClass self => self -> IO (Maybe Widget)
    labelGetMnemonicWidget self
    self =
      (IO (Ptr Widget) -> IO Widget)
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    -> IO (Ptr Widget) -> IO Widget
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
    mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label
    -> (Ptr Label -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr Label -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO (Ptr Widget)
    gtk_label_get_mnemonic_widget Ptr Label
    argPtr1)
    {-# LINE 607 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Selectable labels allow the user to select text from the label, for
    -- copy-and-paste.
    --
    labelSetSelectable :: LabelClass self => self
     -> Bool -- ^ @setting@ - @True@ to allow selecting text in the label
     -> IO ()
    labelSetSelectable :: forall self. LabelClass self => self -> Bool -> IO ()
    labelSetSelectable self
    self Bool
    setting =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_selectable Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 617 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    setting)

    -- | 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
    -- 'labelSetMnemonicWidget'.
    --
    labelSetTextWithMnemonic :: (LabelClass self, GlibString string) => self -> string -> IO ()
    labelSetTextWithMnemonic :: forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetTextWithMnemonic self
    self string
    str =
      string -> (Ptr CChar -> IO ()) -> IO ()
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    str ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    strPtr ->
      (\(Label ForeignPtr Label
    arg1) Ptr CChar
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> Ptr CChar -> IO ()
    gtk_label_set_text_with_mnemonic Ptr Label
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 630 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        Ptr CChar
    strPtr

    -- | Sets the mode used to ellipsize (add an ellipsis: \"...\") to the text if
    -- there is not enough space to render the entire string.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelSetEllipsize :: LabelClass self => self
     -> EllipsizeMode -- ^ @mode@ - a 'EllipsizeMode'
     -> IO ()
    labelSetEllipsize :: forall self. LabelClass self => self -> EllipsizeMode -> IO ()
    labelSetEllipsize self
    self EllipsizeMode
    mode =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_ellipsize Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 644 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        ((Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt) -> (EllipsizeMode -> Int) -> EllipsizeMode -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EllipsizeMode -> Int
    forall a. Enum a => a -> Int
    fromEnum) EllipsizeMode
    mode)

    -- | Sets the desired width in characters of @label@ to @nChars@.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelSetWidthChars :: LabelClass self => self
     -> Int -- ^ @nChars@ - the new desired width, in characters.
     -> IO ()
    labelSetWidthChars :: forall self. LabelClass self => self -> Int -> IO ()
    labelSetWidthChars self
    self Int
    nChars =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_width_chars Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 656 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    nChars)

    -- | Sets the desired maximum width in characters of @label@ to @nChars@.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelSetMaxWidthChars :: LabelClass self => self
     -> Int -- ^ @nChars@ - the new desired maximum width, in characters.
     -> IO ()
    labelSetMaxWidthChars :: forall self. LabelClass self => self -> Int -> IO ()
    labelSetMaxWidthChars self
    self Int
    nChars =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_max_width_chars Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 668 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    nChars)

    -- | Returns the ellipsizing position of the label. See 'labelSetEllipsize'.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelGetEllipsize :: LabelClass self => self
     -> IO EllipsizeMode -- ^ returns 'EllipsizeMode'
    labelGetEllipsize :: forall self. LabelClass self => self -> IO EllipsizeMode
    labelGetEllipsize self
    self =
      (CInt -> EllipsizeMode) -> IO CInt -> IO EllipsizeMode
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> EllipsizeMode
    forall a. Enum a => Int -> a
    toEnum (Int -> EllipsizeMode) -> (CInt -> Int) -> CInt -> EllipsizeMode
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO EllipsizeMode) -> IO CInt -> IO EllipsizeMode
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_ellipsize Ptr Label
    argPtr1)
    {-# LINE 680 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Retrieves the desired width of @label@, in characters. See
    -- 'labelSetWidthChars'.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelGetWidthChars :: LabelClass self => self
     -> IO Int -- ^ returns the width of the label in characters.
    labelGetWidthChars :: forall self. LabelClass self => self -> IO Int
    labelGetWidthChars self
    self =
      (CInt -> Int) -> IO CInt -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_width_chars Ptr Label
    argPtr1)
    {-# LINE 692 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Retrieves the desired maximum width of @label@, in characters. See
    -- 'labelSetWidthChars'.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelGetMaxWidthChars :: LabelClass self => self
     -> IO Int -- ^ returns the maximum width of the label in characters.
    labelGetMaxWidthChars :: forall self. LabelClass self => self -> IO Int
    labelGetMaxWidthChars self
    self =
      (CInt -> Int) -> IO CInt -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_max_width_chars Ptr Label
    argPtr1)
    {-# LINE 704 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Returns whether the label is in single line mode.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelGetSingleLineMode :: LabelClass self => self
     -> IO Bool -- ^ returns @True@ when the label is in single line mode.
    labelGetSingleLineMode :: forall self. LabelClass self => self -> IO Bool
    labelGetSingleLineMode self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CInt) -> IO CInt)
    -> (Ptr Label -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CInt
    gtk_label_get_single_line_mode Ptr Label
    argPtr1)
    {-# LINE 715 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Gets the angle of rotation for the label. See gtk_label_set_angle.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelGetAngle :: LabelClass self => self
     -> IO Double -- ^ returns the angle of rotation for the label
    labelGetAngle :: forall self. LabelClass self => self -> IO Double
    labelGetAngle self
    self =
      (CDouble -> Double) -> IO CDouble -> IO Double
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CDouble -> Double
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac (IO CDouble -> IO Double) -> IO CDouble -> IO Double
    forall a b. (a -> b) -> a -> b
    $
      (\(Label ForeignPtr Label
    arg1) -> ForeignPtr Label -> (Ptr Label -> IO CDouble) -> IO CDouble
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO CDouble) -> IO CDouble)
    -> (Ptr Label -> IO CDouble) -> IO CDouble
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> IO CDouble
    gtk_label_get_angle Ptr Label
    argPtr1)
    {-# LINE 726 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)

    -- | Sets whether the label is in single line mode.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelSetSingleLineMode :: LabelClass self => self
     -> Bool -- ^ @singleLineMode@ - @True@ if the label should be in single line
              -- mode
     -> IO ()
    labelSetSingleLineMode :: forall self. LabelClass self => self -> Bool -> IO ()
    labelSetSingleLineMode self
    self Bool
    singleLineMode =
      (\(Label ForeignPtr Label
    arg1) CInt
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CInt -> IO ()
    gtk_label_set_single_line_mode Ptr Label
    argPtr1 CInt
    arg2)
    {-# LINE 738 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    singleLineMode)

    -- | 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.
    --
    -- * Available since Gtk+ version 2.6
    --
    labelSetAngle :: LabelClass self => self
     -> Double -- ^ @angle@ - the angle that the baseline of the label makes with
               -- the horizontal, in degrees, measured counterclockwise
     -> IO ()
    labelSetAngle :: forall self. LabelClass self => self -> Double -> IO ()
    labelSetAngle self
    self Double
    angle =
      (\(Label ForeignPtr Label
    arg1) CDouble
    arg2 -> ForeignPtr Label -> (Ptr Label -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Label
    arg1 ((Ptr Label -> IO ()) -> IO ()) -> (Ptr Label -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Label
    argPtr1 ->Ptr Label -> CDouble -> IO ()
    gtk_label_set_angle Ptr Label
    argPtr1 CDouble
    arg2)
    {-# LINE 753 "./Graphics/UI/Gtk/Display/Label.chs" #-}
        (toLabel self)
        (Double -> CDouble
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac Double
    angle)

    --------------------
    -- Attributes

    -- | The text of the label.
    --
    labelLabel :: (LabelClass self, GlibString string) => Attr self string
    labelLabel :: forall self string.
    (LabelClass self, GlibString string) =>
    Attr self string
    labelLabel = (self -> IO string)
    -> (self -> string -> IO ()) -> ReadWriteAttr self string string
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO string
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetLabel
      self -> string -> IO ()
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetLabel

    -- | The text of the label includes XML markup. See pango_parse_markup().
    --
    -- Default value: @False@
    --
    labelUseMarkup :: LabelClass self => Attr self Bool
    labelUseMarkup :: forall self. LabelClass self => Attr self Bool
    labelUseMarkup = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. LabelClass self => self -> IO Bool
    labelGetUseMarkup
      self -> Bool -> IO ()
    forall self. LabelClass self => self -> Bool -> IO ()
    labelSetUseMarkup

    -- | If set, an underline in the text indicates the next character should be
    -- used for the mnemonic accelerator key.
    --
    -- Default value: @False@
    --
    labelUseUnderline :: LabelClass self => Attr self Bool
    labelUseUnderline :: forall self. LabelClass self => Attr self Bool
    labelUseUnderline = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. LabelClass self => self -> IO Bool
    labelGetUseUnderline
      self -> Bool -> IO ()
    forall self. LabelClass self => self -> Bool -> IO ()
    labelSetUseUnderline

    -- | 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: 'JustifyLeft'
    --
    labelJustify :: LabelClass self => Attr self Justification
    labelJustify :: forall self. LabelClass self => Attr self Justification
    labelJustify = (self -> IO Justification)
    -> (self -> Justification -> IO ())
    -> ReadWriteAttr self Justification Justification
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Justification
    forall self. LabelClass self => self -> IO Justification
    labelGetJustify
      self -> Justification -> IO ()
    forall self. LabelClass self => self -> Justification -> IO ()
    labelSetJustify

    -- | If set, wrap lines if the text becomes too wide.
    --
    -- Default value: @False@
    --
    labelWrap :: LabelClass self => Attr self Bool
    labelWrap :: forall self. LabelClass self => Attr self Bool
    labelWrap = String -> Attr self Bool
    forall gobj. GObjectClass gobj => String -> Attr gobj Bool
    newAttrFromBoolProperty String
    "wrap"

    -- | If line wrapping is on (see the 'labelWrap' property) this controls how the line wrapping is done.
    -- The default is 'WrapWholeWords', which means wrap on word boundaries.
    --
    -- Default value: 'WrapWholeWords'
    --
    -- * Available since Gtk+ version 2.10
    --
    labelWrapMode :: LabelClass self => Attr self LayoutWrapMode
    labelWrapMode :: forall self. LabelClass self => Attr self LayoutWrapMode
    labelWrapMode = String -> GType -> Attr self LayoutWrapMode
    forall gobj enum.
    (GObjectClass gobj, Enum enum) =>
    String -> GType -> Attr gobj enum
    newAttrFromEnumProperty String
    "wrap-mode"
                    GType
    gtk_label_get_type
    {-# LINE 814 "./Graphics/UI/Gtk/Display/Label.chs" #-}

    -- | Whether the label text can be selected with the mouse.
    --
    -- Default value: @False@
    --
    labelSelectable :: LabelClass self => Attr self Bool
    labelSelectable :: forall self. LabelClass self => Attr self Bool
    labelSelectable = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. LabelClass self => self -> IO Bool
    labelGetSelectable
      self -> Bool -> IO ()
    forall self. LabelClass self => self -> Bool -> IO ()
    labelSetSelectable

    -- | The widget to be activated when the label's mnemonic key is pressed.
    --
    labelMnemonicWidget :: (LabelClass self, WidgetClass widget) => ReadWriteAttr self (Maybe Widget) widget
    labelMnemonicWidget :: forall self widget.
    (LabelClass self, WidgetClass widget) =>
    ReadWriteAttr self (Maybe Widget) widget
    labelMnemonicWidget = (self -> IO (Maybe Widget))
    -> (self -> widget -> IO ())
    -> ReadWriteAttr self (Maybe Widget) widget
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO (Maybe Widget)
    forall self. LabelClass self => self -> IO (Maybe Widget)
    labelGetMnemonicWidget
      self -> widget -> IO ()
    forall self widget.
    (LabelClass self, WidgetClass widget) =>
    self -> widget -> IO ()
    labelSetMnemonicWidget

    -- | The mnemonic accelerator key for this label.
    --
    -- Default value: 16777215
    --
    labelMnemonicKeyval :: LabelClass self => ReadAttr self Int
    labelMnemonicKeyval :: forall self. LabelClass self => ReadAttr self Int
    labelMnemonicKeyval = String -> ReadAttr self Int
    forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
    readAttrFromIntProperty String
    "mnemonic-keyval"

    -- | A string with _ characters in positions correspond to characters in the text to underline.
    --
    -- Default value: "\\"
    --
    labelPattern :: (LabelClass self, GlibString string) => WriteAttr self string
    labelPattern :: forall self string.
    (LabelClass self, GlibString string) =>
    WriteAttr self string
    labelPattern = String -> WriteAttr self string
    forall gobj string.
    (GObjectClass gobj, GlibString string) =>
    String -> WriteAttr gobj string
    writeAttrFromStringProperty String
    "pattern"

    -- | The current position of the insertion cursor in chars.
    --
    -- Allowed values: >= 0
    --
    -- Default value: 0
    --
    labelCursorPosition :: LabelClass self => ReadAttr self Int
    labelCursorPosition :: forall self. LabelClass self => ReadAttr self Int
    labelCursorPosition = String -> ReadAttr self Int
    forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
    readAttrFromIntProperty String
    "cursor-position"

    -- | The position of the opposite end of the selection from the cursor in
    -- chars.
    --
    -- Allowed values: >= 0
    --
    -- Default value: 0
    --
    labelSelectionBound :: LabelClass self => ReadAttr self Int
    labelSelectionBound :: forall self. LabelClass self => ReadAttr self Int
    labelSelectionBound = String -> ReadAttr self Int
    forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
    readAttrFromIntProperty String
    "selection-bound"

    -- | The preferred place to ellipsize the string, if the label does not have
    -- enough room to display the entire string, specified as a 'EllipsizeMode'.
    --
    -- Note that setting this property to a value other than 'EllipsizeNone' 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
    -- @True@. Other means to set a label's width are
    -- 'Graphics.UI.Gtk.Abstract.Widget.widgetSetSizeRequest' and
    -- 'labelSetWidthChars'.
    --
    -- Default value: 'EllipsizeNone'
    --
    labelEllipsize :: LabelClass self => Attr self EllipsizeMode
    labelEllipsize :: forall self. LabelClass self => Attr self EllipsizeMode
    labelEllipsize = (self -> IO EllipsizeMode)
    -> (self -> EllipsizeMode -> IO ())
    -> ReadWriteAttr self EllipsizeMode EllipsizeMode
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO EllipsizeMode
    forall self. LabelClass self => self -> IO EllipsizeMode
    labelGetEllipsize
      self -> EllipsizeMode -> IO ()
    forall self. LabelClass self => self -> EllipsizeMode -> IO ()
    labelSetEllipsize

    -- | 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: >= -1
    --
    -- Default value: -1
    --
    labelWidthChars :: LabelClass self => Attr self Int
    labelWidthChars :: forall self. LabelClass self => Attr self Int
    labelWidthChars = (self -> IO Int)
    -> (self -> Int -> IO ()) -> ReadWriteAttr self Int Int
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Int
    forall self. LabelClass self => self -> IO Int
    labelGetWidthChars
      self -> Int -> IO ()
    forall self. LabelClass self => self -> Int -> IO ()
    labelSetWidthChars

    -- | 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: @False@
    --
    labelSingleLineMode :: LabelClass self => Attr self Bool
    labelSingleLineMode :: forall self. LabelClass self => Attr self Bool
    labelSingleLineMode = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. LabelClass self => self -> IO Bool
    labelGetSingleLineMode
      self -> Bool -> IO ()
    forall self. LabelClass self => self -> Bool -> IO ()
    labelSetSingleLineMode

    -- | 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
    labelAngle :: forall self. LabelClass self => Attr self Double
    labelAngle = (self -> IO Double)
    -> (self -> Double -> IO ()) -> ReadWriteAttr self Double Double
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Double
    forall self. LabelClass self => self -> IO Double
    labelGetAngle
      self -> Double -> IO ()
    forall self. LabelClass self => self -> Double -> IO ()
    labelSetAngle

    -- | A list of style attributes to apply to the text of the label.
    labelAttributes :: LabelClass self => Attr self [PangoAttribute]
    labelAttributes :: forall self. LabelClass self => Attr self [PangoAttribute]
    labelAttributes = (self -> IO [PangoAttribute])
    -> (self -> [PangoAttribute] -> IO ())
    -> ReadWriteAttr self [PangoAttribute] [PangoAttribute]
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO [PangoAttribute]
    forall self. LabelClass self => self -> IO [PangoAttribute]
    labelGetAttributes
      self -> [PangoAttribute] -> IO ()
    forall self. LabelClass self => self -> [PangoAttribute] -> IO ()
    labelSetAttributes

    -- | 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: >= -1
    --
    -- Default value: -1
    --
    labelMaxWidthChars :: LabelClass self => Attr self Int
    labelMaxWidthChars :: forall self. LabelClass self => Attr self Int
    labelMaxWidthChars = (self -> IO Int)
    -> (self -> Int -> IO ()) -> ReadWriteAttr self Int Int
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Int
    forall self. LabelClass self => self -> IO Int
    labelGetMaxWidthChars
      self -> Int -> IO ()
    forall self. LabelClass self => self -> Int -> IO ()
    labelSetMaxWidthChars

    -- | \'lineWrap\' property. See 'labelGetLineWrap' and 'labelSetLineWrap'
    --
    labelLineWrap :: LabelClass self => Attr self Bool
    labelLineWrap :: forall self. LabelClass self => Attr self Bool
    labelLineWrap = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. LabelClass self => self -> IO Bool
    labelGetLineWrap
      self -> Bool -> IO ()
    forall self. LabelClass self => self -> Bool -> IO ()
    labelSetLineWrap

    -- | \'text\' property. See 'labelGetText' and 'labelSetText'
    --
    labelText :: (LabelClass self, GlibString string) => Attr self string
    labelText :: forall self string.
    (LabelClass self, GlibString string) =>
    Attr self string
    labelText = (self -> IO string)
    -> (self -> string -> IO ()) -> ReadWriteAttr self string string
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO string
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> IO string
    labelGetText
      self -> string -> IO ()
    forall self string.
    (LabelClass self, GlibString string) =>
    self -> string -> IO ()
    labelSetText

    --------------------
    -- Signals

    -- | The 'labelActiveCurrentLink' signal a keybinding signal which gets emitted when the user activates
    -- a link in the label.
    labelActiveCurrentLink :: LabelClass self => Signal self (IO ())
    labelActiveCurrentLink :: forall self. LabelClass self => Signal self (IO ())
    labelActiveCurrentLink = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (String -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    String -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE String
    "activate-current-link")

    -- | The 'labelActiveLink' signal is emitted when a URI is activated. Default is to use showURI.
    labelActiveLink :: (LabelClass self, GlibString string) => Signal self (string -> IO ())
    labelActiveLink :: forall self string.
    (LabelClass self, GlibString string) =>
    Signal self (string -> IO ())
    labelActiveLink = (Bool -> self -> (string -> IO ()) -> IO (ConnectId self))
    -> Signal self (string -> IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (String -> Bool -> self -> (string -> IO ()) -> IO (ConnectId self)
    forall a' obj.
    (GlibString a', GObjectClass obj) =>
    String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
    connect_GLIBSTRING__NONE String
    "activate-link")

    -- | The 'labelCopyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the
    -- clipboard.
    labelCopyClipboard :: LabelClass self => Signal self (IO ())
    labelCopyClipboard :: forall self. LabelClass self => Signal self (IO ())
    labelCopyClipboard = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (String -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    String -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE String
    "copy-clipboard")

    -- | The 'labelMoveCursor' signal is a keybinding signal which gets emitted when the user initiates a cursor
    -- movement. If the cursor is not visible in label, this signal causes the viewport to be moved
    -- instead.
    --
    -- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to
    -- control the cursor programmatically.
    --
    -- The default bindings for this signal come in two variants, the variant with the Shift modifier
    -- extends the selection, the variant without the Shift modifier does not. There are too many key
    -- combinations to list them all here.
    --
    -- * Arrow keys move by individual characters\/lines
    -- * Ctrl-arrow key combinations move by words\/paragraphs
    -- * Home\/End keys move to the ends of the buffer
    labelMoveCursor :: LabelClass self => Signal self (MovementStep -> Int -> Bool -> IO ())
    labelMoveCursor :: forall self.
    LabelClass self =>
    Signal self (MovementStep -> Int -> Bool -> IO ())
    labelMoveCursor = (Bool
     -> self
     -> (MovementStep -> Int -> Bool -> IO ())
     -> IO (ConnectId self))
    -> Signal self (MovementStep -> Int -> Bool -> IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (String
    -> Bool
    -> self
    -> (MovementStep -> Int -> Bool -> IO ())
    -> IO (ConnectId self)
    forall a obj.
    (Enum a, GObjectClass obj) =>
    String
    -> Bool -> obj -> (a -> Int -> Bool -> IO ()) -> IO (ConnectId obj)
    connect_ENUM_INT_BOOL__NONE String
    "move-cursor")

    -- | The 'labelPopulatePopup' signal gets emitted before showing the context menu of the label.
    --
    -- If you need to add items to the context menu, connect to this signal and append your menuitems to
    -- the menu.
    labelPopulatePopup :: LabelClass self=> Signal self (Menu -> IO ())
    labelPopulatePopup :: forall self. LabelClass self => Signal self (Menu -> IO ())
    labelPopulatePopup = (Bool -> self -> (Menu -> IO ()) -> IO (ConnectId self))
    -> Signal self (Menu -> IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (String -> Bool -> self -> (Menu -> IO ()) -> IO (ConnectId self)
    forall a' obj.
    (GObjectClass a', GObjectClass obj) =>
    String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
    connect_OBJECT__NONE String
    "populate-popup")

    foreign import ccall safe "gtk_label_new"
      gtk_label_new :: ((Ptr CChar) -> (IO (Ptr Widget)))

    foreign import ccall safe "gtk_label_new_with_mnemonic"
      gtk_label_new_with_mnemonic :: ((Ptr CChar) -> (IO (Ptr Widget)))

    foreign import ccall safe "gtk_label_set_text"
      gtk_label_set_text :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_label_set_label"
      gtk_label_set_label :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall unsafe "gtk_label_set_attributes"
      gtk_label_set_attributes :: ((Ptr Label) -> ((Ptr ()) -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_attributes"
      gtk_label_get_attributes :: ((Ptr Label) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_label_set_markup"
      gtk_label_set_markup :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_label_set_markup_with_mnemonic"
      gtk_label_set_markup_with_mnemonic :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_label_set_pattern"
      gtk_label_set_pattern :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_label_set_justify"
      gtk_label_set_justify :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_justify"
      gtk_label_get_justify :: ((Ptr Label) -> (IO CInt))

    foreign import ccall unsafe "gtk_label_get_layout"
      gtk_label_get_layout :: ((Ptr Label) -> (IO (Ptr PangoLayoutRaw)))

    foreign import ccall safe "gtk_label_set_line_wrap"
      gtk_label_set_line_wrap :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_line_wrap"
      gtk_label_get_line_wrap :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_set_line_wrap_mode"
      gtk_label_set_line_wrap_mode :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_get_line_wrap_mode"
      gtk_label_get_line_wrap_mode :: ((Ptr Label) -> (IO CInt))

    foreign import ccall unsafe "gtk_label_get_layout_offsets"
      gtk_label_get_layout_offsets :: ((Ptr Label) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ()))))

    foreign import ccall unsafe "gtk_label_get_mnemonic_keyval"
      gtk_label_get_mnemonic_keyval :: ((Ptr Label) -> (IO CUInt))

    foreign import ccall unsafe "gtk_label_get_selectable"
      gtk_label_get_selectable :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_set_use_markup"
      gtk_label_set_use_markup :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_use_markup"
      gtk_label_get_use_markup :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_set_use_underline"
      gtk_label_set_use_underline :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_use_underline"
      gtk_label_get_use_underline :: ((Ptr Label) -> (IO CInt))

    foreign import ccall unsafe "gtk_label_get_text"
      gtk_label_get_text :: ((Ptr Label) -> (IO (Ptr CChar)))

    foreign import ccall unsafe "gtk_label_get_label"
      gtk_label_get_label :: ((Ptr Label) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_label_select_region"
      gtk_label_select_region :: ((Ptr Label) -> (CInt -> (CInt -> (IO ()))))

    foreign import ccall unsafe "gtk_label_get_selection_bounds"
      gtk_label_get_selection_bounds :: ((Ptr Label) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO CInt))))

    foreign import ccall unsafe "gtk_label_set_mnemonic_widget"
      gtk_label_set_mnemonic_widget :: ((Ptr Label) -> ((Ptr Widget) -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_mnemonic_widget"
      gtk_label_get_mnemonic_widget :: ((Ptr Label) -> (IO (Ptr Widget)))

    foreign import ccall unsafe "gtk_label_set_selectable"
      gtk_label_set_selectable :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_set_text_with_mnemonic"
      gtk_label_set_text_with_mnemonic :: ((Ptr Label) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_label_set_ellipsize"
      gtk_label_set_ellipsize :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_set_width_chars"
      gtk_label_set_width_chars :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_set_max_width_chars"
      gtk_label_set_max_width_chars :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_get_ellipsize"
      gtk_label_get_ellipsize :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_get_width_chars"
      gtk_label_get_width_chars :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_get_max_width_chars"
      gtk_label_get_max_width_chars :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_get_single_line_mode"
      gtk_label_get_single_line_mode :: ((Ptr Label) -> (IO CInt))

    foreign import ccall safe "gtk_label_get_angle"
      gtk_label_get_angle :: ((Ptr Label) -> (IO CDouble))

    foreign import ccall safe "gtk_label_set_single_line_mode"
      gtk_label_set_single_line_mode :: ((Ptr Label) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_label_set_angle"
      gtk_label_set_angle :: ((Ptr Label) -> (CDouble -> (IO ())))

    foreign import ccall unsafe "gtk_label_get_type"
      gtk_label_get_type :: CULong