{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Structs.TextAppearance
    ( 

-- * Exported types
    TextAppearance(..)                      ,
    newZeroTextAppearance                   ,


 -- * Methods

#if defined(ENABLE_OVERLOADING)
    ResolveTextAppearanceMethod             ,
#endif



 -- * Properties


-- ** bgColor #attr:bgColor#
-- | Background t'GI.Gdk.Structs.Color.Color'.

    getTextAppearanceBgColor                ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_bgColor                  ,
#endif


-- ** drawBg #attr:drawBg#
-- | Whether to use background-related values; this is
--   irrelevant for the values struct when in a tag, but is used for
--   the composite values struct; it’s true if any of the tags being
--   composited had background stuff set.

    getTextAppearanceDrawBg                 ,
    setTextAppearanceDrawBg                 ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_drawBg                   ,
#endif


-- ** fgColor #attr:fgColor#
-- | Foreground t'GI.Gdk.Structs.Color.Color'.

    getTextAppearanceFgColor                ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_fgColor                  ,
#endif


-- ** insideSelection #attr:insideSelection#
-- | This are only used when we are actually laying
--   out and rendering a paragraph; not when a t'GI.Gtk.Structs.TextAppearance.TextAppearance' is
--   part of a t'GI.Gtk.Structs.TextAttributes.TextAttributes'.

    getTextAppearanceInsideSelection        ,
    setTextAppearanceInsideSelection        ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_insideSelection          ,
#endif


-- ** isText #attr:isText#
-- | This are only used when we are actually laying
--   out and rendering a paragraph; not when a t'GI.Gtk.Structs.TextAppearance.TextAppearance' is
--   part of a t'GI.Gtk.Structs.TextAttributes.TextAttributes'.

    getTextAppearanceIsText                 ,
    setTextAppearanceIsText                 ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_isText                   ,
#endif


-- ** rise #attr:rise#
-- | Super\/subscript rise, can be negative.

    getTextAppearanceRise                   ,
    setTextAppearanceRise                   ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_rise                     ,
#endif


-- ** strikethrough #attr:strikethrough#
-- | Strikethrough style

    getTextAppearanceStrikethrough          ,
    setTextAppearanceStrikethrough          ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_strikethrough            ,
#endif


-- ** underline #attr:underline#
-- | t'GI.Pango.Enums.Underline'

    getTextAppearanceUnderline              ,
    setTextAppearanceUnderline              ,
#if defined(ENABLE_OVERLOADING)
    textAppearance_underline                ,
#endif




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.Gdk.Structs.Color as Gdk.Color

-- | Memory-managed wrapper type.
newtype TextAppearance = TextAppearance (SP.ManagedPtr TextAppearance)
    deriving (TextAppearance -> TextAppearance -> Bool
(TextAppearance -> TextAppearance -> Bool)
-> (TextAppearance -> TextAppearance -> Bool) -> Eq TextAppearance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextAppearance -> TextAppearance -> Bool
== :: TextAppearance -> TextAppearance -> Bool
$c/= :: TextAppearance -> TextAppearance -> Bool
/= :: TextAppearance -> TextAppearance -> Bool
Eq)

instance SP.ManagedPtrNewtype TextAppearance where
    toManagedPtr :: TextAppearance -> ManagedPtr TextAppearance
toManagedPtr (TextAppearance ManagedPtr TextAppearance
p) = ManagedPtr TextAppearance
p

instance BoxedPtr TextAppearance where
    boxedPtrCopy :: TextAppearance -> IO TextAppearance
boxedPtrCopy = \TextAppearance
p -> TextAppearance
-> (Ptr TextAppearance -> IO TextAppearance) -> IO TextAppearance
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TextAppearance
p (Int -> Ptr TextAppearance -> IO (Ptr TextAppearance)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
48 (Ptr TextAppearance -> IO (Ptr TextAppearance))
-> (Ptr TextAppearance -> IO TextAppearance)
-> Ptr TextAppearance
-> IO TextAppearance
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr TextAppearance -> TextAppearance)
-> Ptr TextAppearance -> IO TextAppearance
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr TextAppearance -> TextAppearance
TextAppearance)
    boxedPtrFree :: TextAppearance -> IO ()
boxedPtrFree = \TextAppearance
x -> TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr TextAppearance
x Ptr TextAppearance -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr TextAppearance where
    boxedPtrCalloc :: IO (Ptr TextAppearance)
boxedPtrCalloc = Int -> IO (Ptr TextAppearance)
forall a. Int -> IO (Ptr a)
callocBytes Int
48


-- | Construct a `TextAppearance` struct initialized to zero.
newZeroTextAppearance :: MonadIO m => m TextAppearance
newZeroTextAppearance :: forall (m :: * -> *). MonadIO m => m TextAppearance
newZeroTextAppearance = IO TextAppearance -> m TextAppearance
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextAppearance -> m TextAppearance)
-> IO TextAppearance -> m TextAppearance
forall a b. (a -> b) -> a -> b
$ IO (Ptr TextAppearance)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr TextAppearance)
-> (Ptr TextAppearance -> IO TextAppearance) -> IO TextAppearance
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TextAppearance -> TextAppearance)
-> Ptr TextAppearance -> IO TextAppearance
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TextAppearance -> TextAppearance
TextAppearance

instance tag ~ 'AttrSet => Constructible TextAppearance tag where
    new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr TextAppearance -> TextAppearance)
-> [AttrOp TextAppearance tag] -> m TextAppearance
new ManagedPtr TextAppearance -> TextAppearance
_ [AttrOp TextAppearance tag]
attrs = do
        TextAppearance
o <- m TextAppearance
forall (m :: * -> *). MonadIO m => m TextAppearance
newZeroTextAppearance
        TextAppearance -> [AttrOp TextAppearance 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set TextAppearance
o [AttrOp TextAppearance tag]
[AttrOp TextAppearance 'AttrSet]
attrs
        TextAppearance -> m TextAppearance
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return TextAppearance
o


-- | Get the value of the “@bg_color@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #bgColor
-- @
getTextAppearanceBgColor :: MonadIO m => TextAppearance -> m Gdk.Color.Color
getTextAppearanceBgColor :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Color
getTextAppearanceBgColor TextAppearance
s = IO Color -> m Color
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Color -> m Color) -> IO Color -> m Color
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Color) -> IO Color
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Color) -> IO Color)
-> (Ptr TextAppearance -> IO Color) -> IO Color
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    let val :: Ptr Color
val = Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Color
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.Color.Color)
    Color
val' <- ((ManagedPtr Color -> Color) -> Ptr Color -> IO Color
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Color -> Color
Gdk.Color.Color) Ptr Color
val
    Color -> IO Color
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Color
val'

#if defined(ENABLE_OVERLOADING)
data TextAppearanceBgColorFieldInfo
instance AttrInfo TextAppearanceBgColorFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceBgColorFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceBgColorFieldInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceBgColorFieldInfo = (~) (Ptr Gdk.Color.Color)
    type AttrTransferTypeConstraint TextAppearanceBgColorFieldInfo = (~)(Ptr Gdk.Color.Color)
    type AttrTransferType TextAppearanceBgColorFieldInfo = (Ptr Gdk.Color.Color)
    type AttrGetType TextAppearanceBgColorFieldInfo = Gdk.Color.Color
    type AttrLabel TextAppearanceBgColorFieldInfo = "bg_color"
    type AttrOrigin TextAppearanceBgColorFieldInfo = TextAppearance
    attrGet = getTextAppearanceBgColor
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.bgColor"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:bgColor"
        })

textAppearance_bgColor :: AttrLabelProxy "bgColor"
textAppearance_bgColor = AttrLabelProxy

#endif


-- | Get the value of the “@fg_color@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #fgColor
-- @
getTextAppearanceFgColor :: MonadIO m => TextAppearance -> m Gdk.Color.Color
getTextAppearanceFgColor :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Color
getTextAppearanceFgColor TextAppearance
s = IO Color -> m Color
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Color -> m Color) -> IO Color -> m Color
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Color) -> IO Color
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Color) -> IO Color)
-> (Ptr TextAppearance -> IO Color) -> IO Color
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    let val :: Ptr Color
val = Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Color
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: (Ptr Gdk.Color.Color)
    Color
val' <- ((ManagedPtr Color -> Color) -> Ptr Color -> IO Color
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Color -> Color
Gdk.Color.Color) Ptr Color
val
    Color -> IO Color
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Color
val'

#if defined(ENABLE_OVERLOADING)
data TextAppearanceFgColorFieldInfo
instance AttrInfo TextAppearanceFgColorFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceFgColorFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceFgColorFieldInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceFgColorFieldInfo = (~) (Ptr Gdk.Color.Color)
    type AttrTransferTypeConstraint TextAppearanceFgColorFieldInfo = (~)(Ptr Gdk.Color.Color)
    type AttrTransferType TextAppearanceFgColorFieldInfo = (Ptr Gdk.Color.Color)
    type AttrGetType TextAppearanceFgColorFieldInfo = Gdk.Color.Color
    type AttrLabel TextAppearanceFgColorFieldInfo = "fg_color"
    type AttrOrigin TextAppearanceFgColorFieldInfo = TextAppearance
    attrGet = getTextAppearanceFgColor
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.fgColor"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:fgColor"
        })

textAppearance_fgColor :: AttrLabelProxy "fgColor"
textAppearance_fgColor = AttrLabelProxy

#endif


-- | Get the value of the “@rise@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #rise
-- @
getTextAppearanceRise :: MonadIO m => TextAppearance -> m Int32
getTextAppearanceRise :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Int32
getTextAppearanceRise TextAppearance
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Int32) -> IO Int32)
-> (Ptr TextAppearance -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO Int32
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val

-- | Set the value of the “@rise@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #rise 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceRise :: MonadIO m => TextAppearance -> Int32 -> m ()
setTextAppearanceRise :: forall (m :: * -> *). MonadIO m => TextAppearance -> Int32 -> m ()
setTextAppearanceRise TextAppearance
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Int32
val :: Int32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceRiseFieldInfo
instance AttrInfo TextAppearanceRiseFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceRiseFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceRiseFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceRiseFieldInfo = (~) Int32
    type AttrTransferTypeConstraint TextAppearanceRiseFieldInfo = (~)Int32
    type AttrTransferType TextAppearanceRiseFieldInfo = Int32
    type AttrGetType TextAppearanceRiseFieldInfo = Int32
    type AttrLabel TextAppearanceRiseFieldInfo = "rise"
    type AttrOrigin TextAppearanceRiseFieldInfo = TextAppearance
    attrGet = getTextAppearanceRise
    attrSet = setTextAppearanceRise
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.rise"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:rise"
        })

textAppearance_rise :: AttrLabelProxy "rise"
textAppearance_rise = AttrLabelProxy

#endif


-- | Get the value of the “@underline@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #underline
-- @
getTextAppearanceUnderline :: MonadIO m => TextAppearance -> m Word32
getTextAppearanceUnderline :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Word32
getTextAppearanceUnderline TextAppearance
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Word32) -> IO Word32)
-> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) :: IO Word32
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@underline@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #underline 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceUnderline :: MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceUnderline :: forall (m :: * -> *). MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceUnderline TextAppearance
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceUnderlineFieldInfo
instance AttrInfo TextAppearanceUnderlineFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceUnderlineFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceUnderlineFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceUnderlineFieldInfo = (~) Word32
    type AttrTransferTypeConstraint TextAppearanceUnderlineFieldInfo = (~)Word32
    type AttrTransferType TextAppearanceUnderlineFieldInfo = Word32
    type AttrGetType TextAppearanceUnderlineFieldInfo = Word32
    type AttrLabel TextAppearanceUnderlineFieldInfo = "underline"
    type AttrOrigin TextAppearanceUnderlineFieldInfo = TextAppearance
    attrGet = getTextAppearanceUnderline
    attrSet = setTextAppearanceUnderline
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.underline"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:underline"
        })

textAppearance_underline :: AttrLabelProxy "underline"
textAppearance_underline = AttrLabelProxy

#endif


-- | Get the value of the “@strikethrough@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #strikethrough
-- @
getTextAppearanceStrikethrough :: MonadIO m => TextAppearance -> m Word32
getTextAppearanceStrikethrough :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Word32
getTextAppearanceStrikethrough TextAppearance
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Word32) -> IO Word32)
-> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO Word32
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@strikethrough@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #strikethrough 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceStrikethrough :: MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceStrikethrough :: forall (m :: * -> *). MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceStrikethrough TextAppearance
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceStrikethroughFieldInfo
instance AttrInfo TextAppearanceStrikethroughFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceStrikethroughFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceStrikethroughFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceStrikethroughFieldInfo = (~) Word32
    type AttrTransferTypeConstraint TextAppearanceStrikethroughFieldInfo = (~)Word32
    type AttrTransferType TextAppearanceStrikethroughFieldInfo = Word32
    type AttrGetType TextAppearanceStrikethroughFieldInfo = Word32
    type AttrLabel TextAppearanceStrikethroughFieldInfo = "strikethrough"
    type AttrOrigin TextAppearanceStrikethroughFieldInfo = TextAppearance
    attrGet = getTextAppearanceStrikethrough
    attrSet = setTextAppearanceStrikethrough
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.strikethrough"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:strikethrough"
        })

textAppearance_strikethrough :: AttrLabelProxy "strikethrough"
textAppearance_strikethrough = AttrLabelProxy

#endif


-- | Get the value of the “@draw_bg@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #drawBg
-- @
getTextAppearanceDrawBg :: MonadIO m => TextAppearance -> m Word32
getTextAppearanceDrawBg :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Word32
getTextAppearanceDrawBg TextAppearance
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Word32) -> IO Word32)
-> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36) :: IO Word32
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@draw_bg@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #drawBg 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceDrawBg :: MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceDrawBg :: forall (m :: * -> *). MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceDrawBg TextAppearance
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceDrawBgFieldInfo
instance AttrInfo TextAppearanceDrawBgFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceDrawBgFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceDrawBgFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceDrawBgFieldInfo = (~) Word32
    type AttrTransferTypeConstraint TextAppearanceDrawBgFieldInfo = (~)Word32
    type AttrTransferType TextAppearanceDrawBgFieldInfo = Word32
    type AttrGetType TextAppearanceDrawBgFieldInfo = Word32
    type AttrLabel TextAppearanceDrawBgFieldInfo = "draw_bg"
    type AttrOrigin TextAppearanceDrawBgFieldInfo = TextAppearance
    attrGet = getTextAppearanceDrawBg
    attrSet = setTextAppearanceDrawBg
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.drawBg"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:drawBg"
        })

textAppearance_drawBg :: AttrLabelProxy "drawBg"
textAppearance_drawBg = AttrLabelProxy

#endif


-- | Get the value of the “@inside_selection@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #insideSelection
-- @
getTextAppearanceInsideSelection :: MonadIO m => TextAppearance -> m Word32
getTextAppearanceInsideSelection :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Word32
getTextAppearanceInsideSelection TextAppearance
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Word32) -> IO Word32)
-> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO Word32
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@inside_selection@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #insideSelection 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceInsideSelection :: MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceInsideSelection :: forall (m :: * -> *). MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceInsideSelection TextAppearance
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceInsideSelectionFieldInfo
instance AttrInfo TextAppearanceInsideSelectionFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceInsideSelectionFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceInsideSelectionFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceInsideSelectionFieldInfo = (~) Word32
    type AttrTransferTypeConstraint TextAppearanceInsideSelectionFieldInfo = (~)Word32
    type AttrTransferType TextAppearanceInsideSelectionFieldInfo = Word32
    type AttrGetType TextAppearanceInsideSelectionFieldInfo = Word32
    type AttrLabel TextAppearanceInsideSelectionFieldInfo = "inside_selection"
    type AttrOrigin TextAppearanceInsideSelectionFieldInfo = TextAppearance
    attrGet = getTextAppearanceInsideSelection
    attrSet = setTextAppearanceInsideSelection
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.insideSelection"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:insideSelection"
        })

textAppearance_insideSelection :: AttrLabelProxy "insideSelection"
textAppearance_insideSelection = AttrLabelProxy

#endif


-- | Get the value of the “@is_text@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' textAppearance #isText
-- @
getTextAppearanceIsText :: MonadIO m => TextAppearance -> m Word32
getTextAppearanceIsText :: forall (m :: * -> *). MonadIO m => TextAppearance -> m Word32
getTextAppearanceIsText TextAppearance
s = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO Word32) -> IO Word32)
-> (Ptr TextAppearance -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44) :: IO Word32
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@is_text@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' textAppearance [ #isText 'Data.GI.Base.Attributes.:=' value ]
-- @
setTextAppearanceIsText :: MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceIsText :: forall (m :: * -> *). MonadIO m => TextAppearance -> Word32 -> m ()
setTextAppearanceIsText TextAppearance
s Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextAppearance -> (Ptr TextAppearance -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextAppearance
s ((Ptr TextAppearance -> IO ()) -> IO ())
-> (Ptr TextAppearance -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextAppearance
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextAppearance
ptr Ptr TextAppearance -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data TextAppearanceIsTextFieldInfo
instance AttrInfo TextAppearanceIsTextFieldInfo where
    type AttrBaseTypeConstraint TextAppearanceIsTextFieldInfo = (~) TextAppearance
    type AttrAllowedOps TextAppearanceIsTextFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint TextAppearanceIsTextFieldInfo = (~) Word32
    type AttrTransferTypeConstraint TextAppearanceIsTextFieldInfo = (~)Word32
    type AttrTransferType TextAppearanceIsTextFieldInfo = Word32
    type AttrGetType TextAppearanceIsTextFieldInfo = Word32
    type AttrLabel TextAppearanceIsTextFieldInfo = "is_text"
    type AttrOrigin TextAppearanceIsTextFieldInfo = TextAppearance
    attrGet = getTextAppearanceIsText
    attrSet = setTextAppearanceIsText
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TextAppearance.isText"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Structs-TextAppearance.html#g:attr:isText"
        })

textAppearance_isText :: AttrLabelProxy "isText"
textAppearance_isText = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextAppearance
type instance O.AttributeList TextAppearance = TextAppearanceAttributeList
type TextAppearanceAttributeList = ('[ '("bgColor", TextAppearanceBgColorFieldInfo), '("fgColor", TextAppearanceFgColorFieldInfo), '("rise", TextAppearanceRiseFieldInfo), '("underline", TextAppearanceUnderlineFieldInfo), '("strikethrough", TextAppearanceStrikethroughFieldInfo), '("drawBg", TextAppearanceDrawBgFieldInfo), '("insideSelection", TextAppearanceInsideSelectionFieldInfo), '("isText", TextAppearanceIsTextFieldInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveTextAppearanceMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveTextAppearanceMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveTextAppearanceMethod t TextAppearance, O.OverloadedMethod info TextAppearance p) => OL.IsLabel t (TextAppearance -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTextAppearanceMethod t TextAppearance, O.OverloadedMethod info TextAppearance p, R.HasField t TextAppearance p) => R.HasField t TextAppearance p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveTextAppearanceMethod t TextAppearance, O.OverloadedMethodInfo info TextAppearance) => OL.IsLabel t (O.MethodProxy info TextAppearance) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif