{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

The 'GI.Pango.Structs.Analysis.Analysis' structure stores information about
the properties of a segment of text.
-}

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

module GI.Pango.Structs.Analysis
    (

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


 -- * Properties
-- ** extraAttrs #attr:extraAttrs#
{- | extra attributes for this segment.
-}
#if ENABLE_OVERLOADING
    analysis_extraAttrs                     ,
#endif
    clearAnalysisExtraAttrs                 ,
    getAnalysisExtraAttrs                   ,
    setAnalysisExtraAttrs                   ,


-- ** flags #attr:flags#
{- | boolean flags for this segment (currently only one) (Since: 1.16).
-}
#if ENABLE_OVERLOADING
    analysis_flags                          ,
#endif
    getAnalysisFlags                        ,
    setAnalysisFlags                        ,


-- ** font #attr:font#
{- | the font for this segment.
-}
#if ENABLE_OVERLOADING
    analysis_font                           ,
#endif
    clearAnalysisFont                       ,
    getAnalysisFont                         ,
    setAnalysisFont                         ,


-- ** gravity #attr:gravity#
{- | the glyph orientation for this segment (A 'GI.Pango.Enums.Gravity').
-}
#if ENABLE_OVERLOADING
    analysis_gravity                        ,
#endif
    getAnalysisGravity                      ,
    setAnalysisGravity                      ,


-- ** langEngine #attr:langEngine#
{- | the engine for doing rendering-system-independent processing.
-}
#if ENABLE_OVERLOADING
    analysis_langEngine                     ,
#endif
    clearAnalysisLangEngine                 ,
    getAnalysisLangEngine                   ,
    setAnalysisLangEngine                   ,


-- ** language #attr:language#
{- | the detected language for this segment.
-}
#if ENABLE_OVERLOADING
    analysis_language                       ,
#endif
    clearAnalysisLanguage                   ,
    getAnalysisLanguage                     ,
    setAnalysisLanguage                     ,


-- ** level #attr:level#
{- | the bidirectional level for this segment.
-}
#if ENABLE_OVERLOADING
    analysis_level                          ,
#endif
    getAnalysisLevel                        ,
    setAnalysisLevel                        ,


-- ** script #attr:script#
{- | the detected script for this segment (A 'GI.Pango.Enums.Script') (Since: 1.18).
-}
#if ENABLE_OVERLOADING
    analysis_script                         ,
#endif
    getAnalysisScript                       ,
    setAnalysisScript                       ,


-- ** shapeEngine #attr:shapeEngine#
{- | the engine for doing rendering-system-dependent processing.
-}
#if 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

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

-- | Memory-managed wrapper type.
newtype Analysis = Analysis (ManagedPtr Analysis)
instance WrappedPtr Analysis where
    wrappedPtrCalloc = callocBytes 48
    wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 48 >=> wrapPtr Analysis)
    wrappedPtrFree = Just ptr_to_g_free

-- | Construct a `Analysis` struct initialized to zero.
newZeroAnalysis :: MonadIO m => m Analysis
newZeroAnalysis = liftIO $ wrappedPtrCalloc >>= wrapPtr Analysis

instance tag ~ 'AttrSet => Constructible Analysis tag where
    new _ attrs = do
        o <- newZeroAnalysis
        GI.Attributes.set o attrs
        return o


-- | A convenience alias for `Nothing` :: `Maybe` `Analysis`.
noAnalysis :: Maybe Analysis
noAnalysis = Nothing

{- |
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 (Maybe Pango.EngineShape.EngineShape)
getAnalysisShapeEngine s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.EngineShape.EngineShape)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newObject Pango.EngineShape.EngineShape) val'
        return val''
    return result

{- |
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 Pango.EngineShape.EngineShape -> m ()
setAnalysisShapeEngine s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 0) (val :: Ptr Pango.EngineShape.EngineShape)

{- |
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 s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.EngineShape.EngineShape)

#if ENABLE_OVERLOADING
data AnalysisShapeEngineFieldInfo
instance AttrInfo AnalysisShapeEngineFieldInfo where
    type AttrAllowedOps AnalysisShapeEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisShapeEngineFieldInfo = (~) (Ptr Pango.EngineShape.EngineShape)
    type AttrBaseTypeConstraint AnalysisShapeEngineFieldInfo = (~) Analysis
    type AttrGetType AnalysisShapeEngineFieldInfo = Maybe Pango.EngineShape.EngineShape
    type AttrLabel AnalysisShapeEngineFieldInfo = "shape_engine"
    type AttrOrigin AnalysisShapeEngineFieldInfo = Analysis
    attrGet _ = getAnalysisShapeEngine
    attrSet _ = setAnalysisShapeEngine
    attrConstruct = undefined
    attrClear _ = clearAnalysisShapeEngine

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 (Maybe Pango.EngineLang.EngineLang)
getAnalysisLangEngine s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr Pango.EngineLang.EngineLang)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newObject Pango.EngineLang.EngineLang) val'
        return val''
    return result

{- |
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 Pango.EngineLang.EngineLang -> m ()
setAnalysisLangEngine s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 8) (val :: Ptr Pango.EngineLang.EngineLang)

{- |
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 s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr Pango.EngineLang.EngineLang)

#if ENABLE_OVERLOADING
data AnalysisLangEngineFieldInfo
instance AttrInfo AnalysisLangEngineFieldInfo where
    type AttrAllowedOps AnalysisLangEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisLangEngineFieldInfo = (~) (Ptr Pango.EngineLang.EngineLang)
    type AttrBaseTypeConstraint AnalysisLangEngineFieldInfo = (~) Analysis
    type AttrGetType AnalysisLangEngineFieldInfo = Maybe Pango.EngineLang.EngineLang
    type AttrLabel AnalysisLangEngineFieldInfo = "lang_engine"
    type AttrOrigin AnalysisLangEngineFieldInfo = Analysis
    attrGet _ = getAnalysisLangEngine
    attrSet _ = setAnalysisLangEngine
    attrConstruct = undefined
    attrClear _ = clearAnalysisLangEngine

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr Pango.Font.Font)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newObject Pango.Font.Font) val'
        return val''
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 16) (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 s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr Pango.Font.Font)

#if ENABLE_OVERLOADING
data AnalysisFontFieldInfo
instance AttrInfo AnalysisFontFieldInfo where
    type AttrAllowedOps AnalysisFontFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisFontFieldInfo = (~) (Ptr Pango.Font.Font)
    type AttrBaseTypeConstraint AnalysisFontFieldInfo = (~) Analysis
    type AttrGetType AnalysisFontFieldInfo = Maybe Pango.Font.Font
    type AttrLabel AnalysisFontFieldInfo = "font"
    type AttrOrigin AnalysisFontFieldInfo = Analysis
    attrGet _ = getAnalysisFont
    attrSet _ = setAnalysisFont
    attrConstruct = undefined
    attrClear _ = clearAnalysisFont

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word8
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 24) (val :: Word8)

#if ENABLE_OVERLOADING
data AnalysisLevelFieldInfo
instance AttrInfo AnalysisLevelFieldInfo where
    type AttrAllowedOps AnalysisLevelFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisLevelFieldInfo = (~) Word8
    type AttrBaseTypeConstraint AnalysisLevelFieldInfo = (~) Analysis
    type AttrGetType AnalysisLevelFieldInfo = Word8
    type AttrLabel AnalysisLevelFieldInfo = "level"
    type AttrOrigin AnalysisLevelFieldInfo = Analysis
    attrGet _ = getAnalysisLevel
    attrSet _ = setAnalysisLevel
    attrConstruct = undefined
    attrClear _ = undefined

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 25) :: IO Word8
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 25) (val :: Word8)

#if ENABLE_OVERLOADING
data AnalysisGravityFieldInfo
instance AttrInfo AnalysisGravityFieldInfo where
    type AttrAllowedOps AnalysisGravityFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisGravityFieldInfo = (~) Word8
    type AttrBaseTypeConstraint AnalysisGravityFieldInfo = (~) Analysis
    type AttrGetType AnalysisGravityFieldInfo = Word8
    type AttrLabel AnalysisGravityFieldInfo = "gravity"
    type AttrOrigin AnalysisGravityFieldInfo = Analysis
    attrGet _ = getAnalysisGravity
    attrSet _ = setAnalysisGravity
    attrConstruct = undefined
    attrClear _ = undefined

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 26) :: IO Word8
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 26) (val :: Word8)

#if ENABLE_OVERLOADING
data AnalysisFlagsFieldInfo
instance AttrInfo AnalysisFlagsFieldInfo where
    type AttrAllowedOps AnalysisFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisFlagsFieldInfo = (~) Word8
    type AttrBaseTypeConstraint AnalysisFlagsFieldInfo = (~) Analysis
    type AttrGetType AnalysisFlagsFieldInfo = Word8
    type AttrLabel AnalysisFlagsFieldInfo = "flags"
    type AttrOrigin AnalysisFlagsFieldInfo = Analysis
    attrGet _ = getAnalysisFlags
    attrSet _ = setAnalysisFlags
    attrConstruct = undefined
    attrClear _ = undefined

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 27) :: IO Word8
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 27) (val :: Word8)

#if ENABLE_OVERLOADING
data AnalysisScriptFieldInfo
instance AttrInfo AnalysisScriptFieldInfo where
    type AttrAllowedOps AnalysisScriptFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint AnalysisScriptFieldInfo = (~) Word8
    type AttrBaseTypeConstraint AnalysisScriptFieldInfo = (~) Analysis
    type AttrGetType AnalysisScriptFieldInfo = Word8
    type AttrLabel AnalysisScriptFieldInfo = "script"
    type AttrOrigin AnalysisScriptFieldInfo = Analysis
    attrGet _ = getAnalysisScript
    attrSet _ = setAnalysisScript
    attrConstruct = undefined
    attrClear _ = undefined

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO (Ptr Pango.Language.Language)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newBoxed Pango.Language.Language) val'
        return val''
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 32) (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 s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 32) (FP.nullPtr :: Ptr Pango.Language.Language)

#if ENABLE_OVERLOADING
data AnalysisLanguageFieldInfo
instance AttrInfo AnalysisLanguageFieldInfo where
    type AttrAllowedOps AnalysisLanguageFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisLanguageFieldInfo = (~) (Ptr Pango.Language.Language)
    type AttrBaseTypeConstraint AnalysisLanguageFieldInfo = (~) Analysis
    type AttrGetType AnalysisLanguageFieldInfo = Maybe Pango.Language.Language
    type AttrLabel AnalysisLanguageFieldInfo = "language"
    type AttrOrigin AnalysisLanguageFieldInfo = Analysis
    attrGet _ = getAnalysisLanguage
    attrSet _ = setAnalysisLanguage
    attrConstruct = undefined
    attrClear _ = clearAnalysisLanguage

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 s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO (Ptr (GSList (Ptr ())))
    val' <- unpackGSList val
    return 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 s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 40) (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 s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 40) (FP.nullPtr :: Ptr (GSList (Ptr ())))

#if ENABLE_OVERLOADING
data AnalysisExtraAttrsFieldInfo
instance AttrInfo AnalysisExtraAttrsFieldInfo where
    type AttrAllowedOps AnalysisExtraAttrsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint AnalysisExtraAttrsFieldInfo = (~) (Ptr (GSList (Ptr ())))
    type AttrBaseTypeConstraint AnalysisExtraAttrsFieldInfo = (~) Analysis
    type AttrGetType AnalysisExtraAttrsFieldInfo = [Ptr ()]
    type AttrLabel AnalysisExtraAttrsFieldInfo = "extra_attrs"
    type AttrOrigin AnalysisExtraAttrsFieldInfo = Analysis
    attrGet _ = getAnalysisExtraAttrs
    attrSet _ = setAnalysisExtraAttrs
    attrConstruct = undefined
    attrClear _ = clearAnalysisExtraAttrs

analysis_extraAttrs :: AttrLabelProxy "extraAttrs"
analysis_extraAttrs = AttrLabelProxy

#endif



#if 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, *)])
#endif

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

instance (info ~ ResolveAnalysisMethod t Analysis, O.MethodInfo info Analysis p) => O.IsLabelProxy t (Analysis -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveAnalysisMethod t Analysis, O.MethodInfo info Analysis p) => O.IsLabel t (Analysis -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif

#endif