{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The @PangoAnalysis@ structure stores information about
-- the properties of a segment of text.

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

module GI.Pango.Structs.Analysis
    ( 

-- * Exported types
    Analysis(..)                            ,
    newZeroAnalysis                         ,


 -- * Methods

#if defined(ENABLE_OVERLOADING)
    ResolveAnalysisMethod                   ,
#endif



 -- * Properties


-- ** extraAttrs #attr:extraAttrs#
-- | extra attributes for this segment.

#if defined(ENABLE_OVERLOADING)
    analysis_extraAttrs                     ,
#endif
    clearAnalysisExtraAttrs                 ,
    getAnalysisExtraAttrs                   ,
    setAnalysisExtraAttrs                   ,


-- ** flags #attr:flags#
-- | boolean flags for this segment (Since: 1.16).

#if defined(ENABLE_OVERLOADING)
    analysis_flags                          ,
#endif
    getAnalysisFlags                        ,
    setAnalysisFlags                        ,


-- ** font #attr:font#
-- | the font for this segment.

#if defined(ENABLE_OVERLOADING)
    analysis_font                           ,
#endif
    clearAnalysisFont                       ,
    getAnalysisFont                         ,
    setAnalysisFont                         ,


-- ** gravity #attr:gravity#
-- | the glyph orientation for this segment (A @PangoGravity@).

#if defined(ENABLE_OVERLOADING)
    analysis_gravity                        ,
#endif
    getAnalysisGravity                      ,
    setAnalysisGravity                      ,


-- ** langEngine #attr:langEngine#
-- | unused, reserved

#if defined(ENABLE_OVERLOADING)
    analysis_langEngine                     ,
#endif
    clearAnalysisLangEngine                 ,
    getAnalysisLangEngine                   ,
    setAnalysisLangEngine                   ,


-- ** language #attr:language#
-- | the detected language for this segment.

#if defined(ENABLE_OVERLOADING)
    analysis_language                       ,
#endif
    clearAnalysisLanguage                   ,
    getAnalysisLanguage                     ,
    setAnalysisLanguage                     ,


-- ** level #attr:level#
-- | the bidirectional level for this segment.

#if defined(ENABLE_OVERLOADING)
    analysis_level                          ,
#endif
    getAnalysisLevel                        ,
    setAnalysisLevel                        ,


-- ** script #attr:script#
-- | the detected script for this segment (A @PangoScript@) (Since: 1.18).

#if defined(ENABLE_OVERLOADING)
    analysis_script                         ,
#endif
    getAnalysisScript                       ,
    setAnalysisScript                       ,


-- ** shapeEngine #attr:shapeEngine#
-- | unused, reserved

#if defined(ENABLE_OVERLOADING)
    analysis_shapeEngine                    ,
#endif
    clearAnalysisShapeEngine                ,
    getAnalysisShapeEngine                  ,
    setAnalysisShapeEngine                  ,




    ) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.HarfBuzz.Structs.FeatureT as HarfBuzz.FeatureT
import qualified GI.Pango.Callbacks as Pango.Callbacks
import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums
import {-# SOURCE #-} qualified GI.Pango.Flags as Pango.Flags
import {-# SOURCE #-} qualified GI.Pango.Objects.Context as Pango.Context
import {-# SOURCE #-} qualified GI.Pango.Objects.Coverage as Pango.Coverage
import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font
import {-# SOURCE #-} qualified GI.Pango.Objects.FontFace as Pango.FontFace
import {-# SOURCE #-} qualified GI.Pango.Objects.FontFamily as Pango.FontFamily
import {-# SOURCE #-} qualified GI.Pango.Objects.FontMap as Pango.FontMap
import {-# SOURCE #-} qualified GI.Pango.Objects.Fontset as Pango.Fontset
import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription
import {-# SOURCE #-} qualified GI.Pango.Structs.FontMetrics as Pango.FontMetrics
import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language
import {-# SOURCE #-} qualified GI.Pango.Structs.Matrix as Pango.Matrix
import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle

#else
import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font
import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language

#endif

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

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

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


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

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


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

-- | Set the value of the “@shape_engine@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #shapeEngine 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisShapeEngine :: MonadIO m => Analysis -> Ptr () -> m ()
setAnalysisShapeEngine :: forall (m :: * -> *). MonadIO m => Analysis -> Ptr () -> m ()
setAnalysisShapeEngine Analysis
s Ptr ()
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr ()
val :: Ptr ())

-- | Set the value of the “@shape_engine@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #shapeEngine
-- @
clearAnalysisShapeEngine :: MonadIO m => Analysis -> m ()
clearAnalysisShapeEngine :: forall (m :: * -> *). MonadIO m => Analysis -> m ()
clearAnalysisShapeEngine Analysis
s = 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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())

#if defined(ENABLE_OVERLOADING)
data AnalysisShapeEngineFieldInfo
instance AttrInfo AnalysisShapeEngineFieldInfo where
    type AttrBaseTypeConstraint AnalysisShapeEngineFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisShapeEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisShapeEngineFieldInfo = (~) (Ptr ())
    type AttrTransferTypeConstraint AnalysisShapeEngineFieldInfo = (~)(Ptr ())
    type AttrTransferType AnalysisShapeEngineFieldInfo = (Ptr ())
    type AttrGetType AnalysisShapeEngineFieldInfo = Ptr ()
    type AttrLabel AnalysisShapeEngineFieldInfo = "shape_engine"
    type AttrOrigin AnalysisShapeEngineFieldInfo = Analysis
    attrGet = getAnalysisShapeEngine
    attrSet = setAnalysisShapeEngine
    attrConstruct = undefined
    attrClear = clearAnalysisShapeEngine
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.shapeEngine"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:shapeEngine"
        })

analysis_shapeEngine :: AttrLabelProxy "shapeEngine"
analysis_shapeEngine = AttrLabelProxy

#endif


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

-- | Set the value of the “@lang_engine@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #langEngine 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisLangEngine :: MonadIO m => Analysis -> Ptr () -> m ()
setAnalysisLangEngine :: forall (m :: * -> *). MonadIO m => Analysis -> Ptr () -> m ()
setAnalysisLangEngine Analysis
s Ptr ()
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr ()
val :: Ptr ())

-- | Set the value of the “@lang_engine@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #langEngine
-- @
clearAnalysisLangEngine :: MonadIO m => Analysis -> m ()
clearAnalysisLangEngine :: forall (m :: * -> *). MonadIO m => Analysis -> m ()
clearAnalysisLangEngine Analysis
s = 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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())

#if defined(ENABLE_OVERLOADING)
data AnalysisLangEngineFieldInfo
instance AttrInfo AnalysisLangEngineFieldInfo where
    type AttrBaseTypeConstraint AnalysisLangEngineFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisLangEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisLangEngineFieldInfo = (~) (Ptr ())
    type AttrTransferTypeConstraint AnalysisLangEngineFieldInfo = (~)(Ptr ())
    type AttrTransferType AnalysisLangEngineFieldInfo = (Ptr ())
    type AttrGetType AnalysisLangEngineFieldInfo = Ptr ()
    type AttrLabel AnalysisLangEngineFieldInfo = "lang_engine"
    type AttrOrigin AnalysisLangEngineFieldInfo = Analysis
    attrGet = getAnalysisLangEngine
    attrSet = setAnalysisLangEngine
    attrConstruct = undefined
    attrClear = clearAnalysisLangEngine
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.langEngine"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:langEngine"
        })

analysis_langEngine :: AttrLabelProxy "langEngine"
analysis_langEngine = AttrLabelProxy

#endif


-- | Get the value of the “@font@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' analysis #font
-- @
getAnalysisFont :: MonadIO m => Analysis -> m (Maybe Pango.Font.Font)
getAnalysisFont :: forall (m :: * -> *). MonadIO m => Analysis -> m (Maybe Font)
getAnalysisFont Analysis
s = IO (Maybe Font) -> m (Maybe Font)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Font) -> m (Maybe Font))
-> IO (Maybe Font) -> m (Maybe Font)
forall a b. (a -> b) -> a -> b
$ Analysis -> (Ptr Analysis -> IO (Maybe Font)) -> IO (Maybe Font)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO (Maybe Font)) -> IO (Maybe Font))
-> (Ptr Analysis -> IO (Maybe Font)) -> IO (Maybe Font)
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr Font
val <- Ptr (Ptr Font) -> IO (Ptr Font)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr Font)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (Ptr Pango.Font.Font)
    Maybe Font
result <- Ptr Font -> (Ptr Font -> IO Font) -> IO (Maybe Font)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Font
val ((Ptr Font -> IO Font) -> IO (Maybe Font))
-> (Ptr Font -> IO Font) -> IO (Maybe Font)
forall a b. (a -> b) -> a -> b
$ \Ptr Font
val' -> do
        Font
val'' <- ((ManagedPtr Font -> Font) -> Ptr Font -> IO Font
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Font -> Font
Pango.Font.Font) Ptr Font
val'
        Font -> IO Font
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Font
val''
    Maybe Font -> IO (Maybe Font)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Font
result

-- | Set the value of the “@font@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #font 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisFont :: MonadIO m => Analysis -> Ptr Pango.Font.Font -> m ()
setAnalysisFont :: forall (m :: * -> *). MonadIO m => Analysis -> Ptr Font -> m ()
setAnalysisFont Analysis
s Ptr Font
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr Font) -> Ptr Font -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr Font)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr Font
val :: Ptr Pango.Font.Font)

-- | Set the value of the “@font@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #font
-- @
clearAnalysisFont :: MonadIO m => Analysis -> m ()
clearAnalysisFont :: forall (m :: * -> *). MonadIO m => Analysis -> m ()
clearAnalysisFont Analysis
s = 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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr Font) -> Ptr Font -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr Font)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr Font
forall a. Ptr a
FP.nullPtr :: Ptr Pango.Font.Font)

#if defined(ENABLE_OVERLOADING)
data AnalysisFontFieldInfo
instance AttrInfo AnalysisFontFieldInfo where
    type AttrBaseTypeConstraint AnalysisFontFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisFontFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisFontFieldInfo = (~) (Ptr Pango.Font.Font)
    type AttrTransferTypeConstraint AnalysisFontFieldInfo = (~)(Ptr Pango.Font.Font)
    type AttrTransferType AnalysisFontFieldInfo = (Ptr Pango.Font.Font)
    type AttrGetType AnalysisFontFieldInfo = Maybe Pango.Font.Font
    type AttrLabel AnalysisFontFieldInfo = "font"
    type AttrOrigin AnalysisFontFieldInfo = Analysis
    attrGet = getAnalysisFont
    attrSet = setAnalysisFont
    attrConstruct = undefined
    attrClear = clearAnalysisFont
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.font"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:font"
        })

analysis_font :: AttrLabelProxy "font"
analysis_font = AttrLabelProxy

#endif


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

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

#if defined(ENABLE_OVERLOADING)
data AnalysisLevelFieldInfo
instance AttrInfo AnalysisLevelFieldInfo where
    type AttrBaseTypeConstraint AnalysisLevelFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisLevelFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisLevelFieldInfo = (~) Word8
    type AttrTransferTypeConstraint AnalysisLevelFieldInfo = (~)Word8
    type AttrTransferType AnalysisLevelFieldInfo = Word8
    type AttrGetType AnalysisLevelFieldInfo = Word8
    type AttrLabel AnalysisLevelFieldInfo = "level"
    type AttrOrigin AnalysisLevelFieldInfo = Analysis
    attrGet = getAnalysisLevel
    attrSet = setAnalysisLevel
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.level"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:level"
        })

analysis_level :: AttrLabelProxy "level"
analysis_level = AttrLabelProxy

#endif


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

-- | Set the value of the “@gravity@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #gravity 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisGravity :: MonadIO m => Analysis -> Word8 -> m ()
setAnalysisGravity :: forall (m :: * -> *). MonadIO m => Analysis -> Word8 -> m ()
setAnalysisGravity Analysis
s Word8
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr Word8 -> Word8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr Word8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
25) (Word8
val :: Word8)

#if defined(ENABLE_OVERLOADING)
data AnalysisGravityFieldInfo
instance AttrInfo AnalysisGravityFieldInfo where
    type AttrBaseTypeConstraint AnalysisGravityFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisGravityFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisGravityFieldInfo = (~) Word8
    type AttrTransferTypeConstraint AnalysisGravityFieldInfo = (~)Word8
    type AttrTransferType AnalysisGravityFieldInfo = Word8
    type AttrGetType AnalysisGravityFieldInfo = Word8
    type AttrLabel AnalysisGravityFieldInfo = "gravity"
    type AttrOrigin AnalysisGravityFieldInfo = Analysis
    attrGet = getAnalysisGravity
    attrSet = setAnalysisGravity
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.gravity"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:gravity"
        })

analysis_gravity :: AttrLabelProxy "gravity"
analysis_gravity = AttrLabelProxy

#endif


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

-- | Set the value of the “@flags@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #flags 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisFlags :: MonadIO m => Analysis -> Word8 -> m ()
setAnalysisFlags :: forall (m :: * -> *). MonadIO m => Analysis -> Word8 -> m ()
setAnalysisFlags Analysis
s Word8
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr Word8 -> Word8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr Word8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
26) (Word8
val :: Word8)

#if defined(ENABLE_OVERLOADING)
data AnalysisFlagsFieldInfo
instance AttrInfo AnalysisFlagsFieldInfo where
    type AttrBaseTypeConstraint AnalysisFlagsFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisFlagsFieldInfo = (~) Word8
    type AttrTransferTypeConstraint AnalysisFlagsFieldInfo = (~)Word8
    type AttrTransferType AnalysisFlagsFieldInfo = Word8
    type AttrGetType AnalysisFlagsFieldInfo = Word8
    type AttrLabel AnalysisFlagsFieldInfo = "flags"
    type AttrOrigin AnalysisFlagsFieldInfo = Analysis
    attrGet = getAnalysisFlags
    attrSet = setAnalysisFlags
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.flags"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:flags"
        })

analysis_flags :: AttrLabelProxy "flags"
analysis_flags = AttrLabelProxy

#endif


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

-- | Set the value of the “@script@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #script 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisScript :: MonadIO m => Analysis -> Word8 -> m ()
setAnalysisScript :: forall (m :: * -> *). MonadIO m => Analysis -> Word8 -> m ()
setAnalysisScript Analysis
s Word8
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr Word8 -> Word8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr Word8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
27) (Word8
val :: Word8)

#if defined(ENABLE_OVERLOADING)
data AnalysisScriptFieldInfo
instance AttrInfo AnalysisScriptFieldInfo where
    type AttrBaseTypeConstraint AnalysisScriptFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisScriptFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisScriptFieldInfo = (~) Word8
    type AttrTransferTypeConstraint AnalysisScriptFieldInfo = (~)Word8
    type AttrTransferType AnalysisScriptFieldInfo = Word8
    type AttrGetType AnalysisScriptFieldInfo = Word8
    type AttrLabel AnalysisScriptFieldInfo = "script"
    type AttrOrigin AnalysisScriptFieldInfo = Analysis
    attrGet = getAnalysisScript
    attrSet = setAnalysisScript
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.script"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:script"
        })

analysis_script :: AttrLabelProxy "script"
analysis_script = AttrLabelProxy

#endif


-- | Get the value of the “@language@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' analysis #language
-- @
getAnalysisLanguage :: MonadIO m => Analysis -> m (Maybe Pango.Language.Language)
getAnalysisLanguage :: forall (m :: * -> *). MonadIO m => Analysis -> m (Maybe Language)
getAnalysisLanguage Analysis
s = IO (Maybe Language) -> m (Maybe Language)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Language) -> m (Maybe Language))
-> IO (Maybe Language) -> m (Maybe Language)
forall a b. (a -> b) -> a -> b
$ Analysis
-> (Ptr Analysis -> IO (Maybe Language)) -> IO (Maybe Language)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO (Maybe Language)) -> IO (Maybe Language))
-> (Ptr Analysis -> IO (Maybe Language)) -> IO (Maybe Language)
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr Language
val <- Ptr (Ptr Language) -> IO (Ptr Language)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr Language)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (Ptr Pango.Language.Language)
    Maybe Language
result <- Ptr Language
-> (Ptr Language -> IO Language) -> IO (Maybe Language)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Language
val ((Ptr Language -> IO Language) -> IO (Maybe Language))
-> (Ptr Language -> IO Language) -> IO (Maybe Language)
forall a b. (a -> b) -> a -> b
$ \Ptr Language
val' -> do
        Language
val'' <- ((ManagedPtr Language -> Language) -> Ptr Language -> IO Language
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Language -> Language
Pango.Language.Language) Ptr Language
val'
        Language -> IO Language
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Language
val''
    Maybe Language -> IO (Maybe Language)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Language
result

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

-- | Set the value of the “@language@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #language
-- @
clearAnalysisLanguage :: MonadIO m => Analysis -> m ()
clearAnalysisLanguage :: forall (m :: * -> *). MonadIO m => Analysis -> m ()
clearAnalysisLanguage Analysis
s = 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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr Language) -> Ptr Language -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr Language)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr Language
forall a. Ptr a
FP.nullPtr :: Ptr Pango.Language.Language)

#if defined(ENABLE_OVERLOADING)
data AnalysisLanguageFieldInfo
instance AttrInfo AnalysisLanguageFieldInfo where
    type AttrBaseTypeConstraint AnalysisLanguageFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisLanguageFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisLanguageFieldInfo = (~) (Ptr Pango.Language.Language)
    type AttrTransferTypeConstraint AnalysisLanguageFieldInfo = (~)(Ptr Pango.Language.Language)
    type AttrTransferType AnalysisLanguageFieldInfo = (Ptr Pango.Language.Language)
    type AttrGetType AnalysisLanguageFieldInfo = Maybe Pango.Language.Language
    type AttrLabel AnalysisLanguageFieldInfo = "language"
    type AttrOrigin AnalysisLanguageFieldInfo = Analysis
    attrGet = getAnalysisLanguage
    attrSet = setAnalysisLanguage
    attrConstruct = undefined
    attrClear = clearAnalysisLanguage
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.language"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:language"
        })

analysis_language :: AttrLabelProxy "language"
analysis_language = AttrLabelProxy

#endif


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

-- | Set the value of the “@extra_attrs@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' analysis [ #extraAttrs 'Data.GI.Base.Attributes.:=' value ]
-- @
setAnalysisExtraAttrs :: MonadIO m => Analysis -> Ptr (GSList (Ptr ())) -> m ()
setAnalysisExtraAttrs :: forall (m :: * -> *).
MonadIO m =>
Analysis -> Ptr (GSList (Ptr ())) -> m ()
setAnalysisExtraAttrs Analysis
s Ptr (GSList (Ptr ()))
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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr (GSList (Ptr ()))) -> Ptr (GSList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr (GSList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Ptr (GSList (Ptr ()))
val :: Ptr (GSList (Ptr ())))

-- | Set the value of the “@extra_attrs@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #extraAttrs
-- @
clearAnalysisExtraAttrs :: MonadIO m => Analysis -> m ()
clearAnalysisExtraAttrs :: forall (m :: * -> *). MonadIO m => Analysis -> m ()
clearAnalysisExtraAttrs Analysis
s = 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
$ Analysis -> (Ptr Analysis -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO ()) -> IO ())
-> (Ptr Analysis -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Analysis
ptr -> do
    Ptr (Ptr (GSList (Ptr ()))) -> Ptr (GSList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr (GSList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Ptr (GSList (Ptr ()))
forall a. Ptr a
FP.nullPtr :: Ptr (GSList (Ptr ())))

#if defined(ENABLE_OVERLOADING)
data AnalysisExtraAttrsFieldInfo
instance AttrInfo AnalysisExtraAttrsFieldInfo where
    type AttrBaseTypeConstraint AnalysisExtraAttrsFieldInfo = (~) Analysis
    type AttrAllowedOps AnalysisExtraAttrsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisExtraAttrsFieldInfo = (~) (Ptr (GSList (Ptr ())))
    type AttrTransferTypeConstraint AnalysisExtraAttrsFieldInfo = (~)(Ptr (GSList (Ptr ())))
    type AttrTransferType AnalysisExtraAttrsFieldInfo = (Ptr (GSList (Ptr ())))
    type AttrGetType AnalysisExtraAttrsFieldInfo = [Ptr ()]
    type AttrLabel AnalysisExtraAttrsFieldInfo = "extra_attrs"
    type AttrOrigin AnalysisExtraAttrsFieldInfo = Analysis
    attrGet = getAnalysisExtraAttrs
    attrSet = setAnalysisExtraAttrs
    attrConstruct = undefined
    attrClear = clearAnalysisExtraAttrs
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Pango.Structs.Analysis.extraAttrs"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.30/docs/GI-Pango-Structs-Analysis.html#g:attr:extraAttrs"
        })

analysis_extraAttrs :: AttrLabelProxy "extraAttrs"
analysis_extraAttrs = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Analysis
type instance O.AttributeList Analysis = AnalysisAttributeList
type AnalysisAttributeList = ('[ '("shapeEngine", AnalysisShapeEngineFieldInfo), '("langEngine", AnalysisLangEngineFieldInfo), '("font", AnalysisFontFieldInfo), '("level", AnalysisLevelFieldInfo), '("gravity", AnalysisGravityFieldInfo), '("flags", AnalysisFlagsFieldInfo), '("script", AnalysisScriptFieldInfo), '("language", AnalysisLanguageFieldInfo), '("extraAttrs", AnalysisExtraAttrsFieldInfo)] :: [(Symbol, DK.Type)])
#endif

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

instance (info ~ ResolveAnalysisMethod t Analysis, O.OverloadedMethod info Analysis p) => OL.IsLabel t (Analysis -> 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 ~ ResolveAnalysisMethod t Analysis, O.OverloadedMethod info Analysis p, R.HasField t Analysis p) => R.HasField t Analysis p where
    getField = O.overloadedMethod @info

#endif

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

#endif