{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Pango.Structs.Analysis.Analysis' 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                         ,
    noAnalysis                              ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded 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 (currently only one) (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 t'GI.Pango.Enums.Gravity').

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


-- ** langEngine #attr:langEngine#
-- | the engine for doing rendering-system-independent processing.

#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 t'GI.Pango.Enums.Script') (Since: 1.18).

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


-- ** shapeEngine #attr:shapeEngine#
-- | the engine for doing rendering-system-dependent processing.

#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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
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.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
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 qualified GHC.OverloadedLabels as OL

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)
    deriving (Analysis -> Analysis -> Bool
(Analysis -> Analysis -> Bool)
-> (Analysis -> Analysis -> Bool) -> Eq Analysis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Analysis -> Analysis -> Bool
$c/= :: Analysis -> Analysis -> Bool
== :: Analysis -> Analysis -> Bool
$c== :: Analysis -> Analysis -> Bool
Eq)
instance WrappedPtr Analysis where
    wrappedPtrCalloc :: IO (Ptr Analysis)
wrappedPtrCalloc = Int -> IO (Ptr Analysis)
forall a. Int -> IO (Ptr a)
callocBytes 48
    wrappedPtrCopy :: Analysis -> IO Analysis
wrappedPtrCopy = \p :: Analysis
p -> Analysis -> (Ptr Analysis -> IO Analysis) -> IO Analysis
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
p (Int -> Ptr Analysis -> IO (Ptr Analysis)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 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, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Analysis -> Analysis
Analysis)
    wrappedPtrFree :: Maybe (GDestroyNotify Analysis)
wrappedPtrFree = GDestroyNotify Analysis -> Maybe (GDestroyNotify Analysis)
forall a. a -> Maybe a
Just GDestroyNotify Analysis
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free

-- | Construct a `Analysis` struct initialized to zero.
newZeroAnalysis :: MonadIO m => m Analysis
newZeroAnalysis :: m Analysis
newZeroAnalysis = IO Analysis -> m Analysis
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. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr Analysis) -> (Ptr Analysis -> IO Analysis) -> IO Analysis
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Analysis -> Analysis) -> Ptr Analysis -> IO Analysis
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Analysis -> Analysis
Analysis

instance tag ~ 'AttrSet => Constructible Analysis tag where
    new :: (ManagedPtr Analysis -> Analysis)
-> [AttrOp Analysis tag] -> m Analysis
new _ attrs :: [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 (m :: * -> *) a. Monad m => a -> m a
return Analysis
o


-- | A convenience alias for `Nothing` :: `Maybe` `Analysis`.
noAnalysis :: Maybe Analysis
noAnalysis :: Maybe Analysis
noAnalysis = Maybe Analysis
forall a. Maybe a
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 :: Analysis -> m (Maybe EngineShape)
getAnalysisShapeEngine s :: Analysis
s = IO (Maybe EngineShape) -> m (Maybe EngineShape)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe EngineShape) -> m (Maybe EngineShape))
-> IO (Maybe EngineShape) -> m (Maybe EngineShape)
forall a b. (a -> b) -> a -> b
$ Analysis
-> (Ptr Analysis -> IO (Maybe EngineShape))
-> IO (Maybe EngineShape)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO (Maybe EngineShape))
 -> IO (Maybe EngineShape))
-> (Ptr Analysis -> IO (Maybe EngineShape))
-> IO (Maybe EngineShape)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr Analysis
ptr -> do
    Ptr EngineShape
val <- Ptr (Ptr EngineShape) -> IO (Ptr EngineShape)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineShape)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO (Ptr Pango.EngineShape.EngineShape)
    Maybe EngineShape
result <- Ptr EngineShape
-> (Ptr EngineShape -> IO EngineShape) -> IO (Maybe EngineShape)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr EngineShape
val ((Ptr EngineShape -> IO EngineShape) -> IO (Maybe EngineShape))
-> (Ptr EngineShape -> IO EngineShape) -> IO (Maybe EngineShape)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr EngineShape
val' -> do
        EngineShape
val'' <- ((ManagedPtr EngineShape -> EngineShape)
-> Ptr EngineShape -> IO EngineShape
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr EngineShape -> EngineShape
Pango.EngineShape.EngineShape) Ptr EngineShape
val'
        EngineShape -> IO EngineShape
forall (m :: * -> *) a. Monad m => a -> m a
return EngineShape
val''
    Maybe EngineShape -> IO (Maybe EngineShape)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EngineShape
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 :: Analysis -> Ptr EngineShape -> m ()
setAnalysisShapeEngine s :: Analysis
s val :: Ptr EngineShape
val = IO () -> m ()
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 :: Ptr Analysis
ptr -> do
    Ptr (Ptr EngineShape) -> Ptr EngineShape -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineShape)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Ptr EngineShape
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 :: Analysis -> m ()
clearAnalysisShapeEngine s :: Analysis
s = IO () -> m ()
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 :: Ptr Analysis
ptr -> do
    Ptr (Ptr EngineShape) -> Ptr EngineShape -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineShape)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Ptr EngineShape
forall a. Ptr a
FP.nullPtr :: Ptr Pango.EngineShape.EngineShape)

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

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 :: Analysis -> m (Maybe EngineLang)
getAnalysisLangEngine s :: Analysis
s = IO (Maybe EngineLang) -> m (Maybe EngineLang)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe EngineLang) -> m (Maybe EngineLang))
-> IO (Maybe EngineLang) -> m (Maybe EngineLang)
forall a b. (a -> b) -> a -> b
$ Analysis
-> (Ptr Analysis -> IO (Maybe EngineLang)) -> IO (Maybe EngineLang)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Analysis
s ((Ptr Analysis -> IO (Maybe EngineLang)) -> IO (Maybe EngineLang))
-> (Ptr Analysis -> IO (Maybe EngineLang)) -> IO (Maybe EngineLang)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr Analysis
ptr -> do
    Ptr EngineLang
val <- Ptr (Ptr EngineLang) -> IO (Ptr EngineLang)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineLang)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (Ptr Pango.EngineLang.EngineLang)
    Maybe EngineLang
result <- Ptr EngineLang
-> (Ptr EngineLang -> IO EngineLang) -> IO (Maybe EngineLang)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr EngineLang
val ((Ptr EngineLang -> IO EngineLang) -> IO (Maybe EngineLang))
-> (Ptr EngineLang -> IO EngineLang) -> IO (Maybe EngineLang)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr EngineLang
val' -> do
        EngineLang
val'' <- ((ManagedPtr EngineLang -> EngineLang)
-> Ptr EngineLang -> IO EngineLang
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr EngineLang -> EngineLang
Pango.EngineLang.EngineLang) Ptr EngineLang
val'
        EngineLang -> IO EngineLang
forall (m :: * -> *) a. Monad m => a -> m a
return EngineLang
val''
    Maybe EngineLang -> IO (Maybe EngineLang)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EngineLang
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 :: Analysis -> Ptr EngineLang -> m ()
setAnalysisLangEngine s :: Analysis
s val :: Ptr EngineLang
val = IO () -> m ()
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 :: Ptr Analysis
ptr -> do
    Ptr (Ptr EngineLang) -> Ptr EngineLang -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineLang)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr EngineLang
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 :: Analysis -> m ()
clearAnalysisLangEngine s :: Analysis
s = IO () -> m ()
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 :: Ptr Analysis
ptr -> do
    Ptr (Ptr EngineLang) -> Ptr EngineLang -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Analysis
ptr Ptr Analysis -> Int -> Ptr (Ptr EngineLang)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr EngineLang
forall a. Ptr a
FP.nullPtr :: Ptr Pango.EngineLang.EngineLang)

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

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 :: Analysis -> m (Maybe Font)
getAnalysisFont s :: Analysis
s = IO (Maybe Font) -> m (Maybe Font)
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 :: 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` 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
$ \val' :: 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 (m :: * -> *) a. Monad m => a -> m a
return Font
val''
    Maybe Font -> IO (Maybe Font)
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 :: Analysis -> Ptr Font -> m ()
setAnalysisFont s :: Analysis
s val :: Ptr Font
val = IO () -> m ()
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 :: 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` 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 :: Analysis -> m ()
clearAnalysisFont s :: Analysis
s = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m Word8
getAnalysisLevel s :: Analysis
s = IO Word8 -> m Word8
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 :: 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` 24) :: IO Word8
    Word8 -> IO Word8
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 :: Analysis -> Word8 -> m ()
setAnalysisLevel s :: Analysis
s val :: Word8
val = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m Word8
getAnalysisGravity s :: Analysis
s = IO Word8 -> m Word8
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 :: 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` 25) :: IO Word8
    Word8 -> IO Word8
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 :: Analysis -> Word8 -> m ()
setAnalysisGravity s :: Analysis
s val :: Word8
val = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m Word8
getAnalysisFlags s :: Analysis
s = IO Word8 -> m Word8
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 :: 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` 26) :: IO Word8
    Word8 -> IO Word8
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 :: Analysis -> Word8 -> m ()
setAnalysisFlags s :: Analysis
s val :: Word8
val = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m Word8
getAnalysisScript s :: Analysis
s = IO Word8 -> m Word8
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 :: 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` 27) :: IO Word8
    Word8 -> IO Word8
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 :: Analysis -> Word8 -> m ()
setAnalysisScript s :: Analysis
s val :: Word8
val = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m (Maybe Language)
getAnalysisLanguage s :: Analysis
s = IO (Maybe Language) -> m (Maybe Language)
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 :: 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` 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
$ \val' :: Ptr Language
val' -> do
        Language
val'' <- ((ManagedPtr Language -> Language) -> Ptr Language -> IO Language
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Language -> Language
Pango.Language.Language) Ptr Language
val'
        Language -> IO Language
forall (m :: * -> *) a. Monad m => a -> m a
return Language
val''
    Maybe Language -> IO (Maybe Language)
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 :: Analysis -> Ptr Language -> m ()
setAnalysisLanguage s :: Analysis
s val :: Ptr Language
val = IO () -> m ()
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 :: 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` 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 :: Analysis -> m ()
clearAnalysisLanguage s :: Analysis
s = IO () -> m ()
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 :: 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` 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

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 :: Analysis -> m [Ptr ()]
getAnalysisExtraAttrs s :: Analysis
s = IO [Ptr ()] -> m [Ptr ()]
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 :: 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` 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 (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 :: Analysis -> Ptr (GSList (Ptr ())) -> m ()
setAnalysisExtraAttrs s :: Analysis
s val :: Ptr (GSList (Ptr ()))
val = IO () -> m ()
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 :: 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` 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 :: Analysis -> m ()
clearAnalysisExtraAttrs s :: Analysis
s = IO () -> m ()
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 :: 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` 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

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

#if defined(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) => OL.IsLabel t (Analysis -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif