{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Pango.Structs.AttrClass
(
AttrClass(..) ,
newZeroAttrClass ,
noAttrClass ,
#if defined(ENABLE_OVERLOADING)
ResolveAttrClassMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
attrClass_destroy ,
#endif
clearAttrClassDestroy ,
getAttrClassDestroy ,
setAttrClassDestroy ,
#if defined(ENABLE_OVERLOADING)
attrClass_equal ,
#endif
clearAttrClassEqual ,
getAttrClassEqual ,
setAttrClassEqual ,
#if defined(ENABLE_OVERLOADING)
attrClass_type ,
#endif
getAttrClassType ,
setAttrClassType ,
) 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 qualified GI.Pango.Callbacks as Pango.Callbacks
import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums
newtype AttrClass = AttrClass (ManagedPtr AttrClass)
deriving (AttrClass -> AttrClass -> Bool
(AttrClass -> AttrClass -> Bool)
-> (AttrClass -> AttrClass -> Bool) -> Eq AttrClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttrClass -> AttrClass -> Bool
$c/= :: AttrClass -> AttrClass -> Bool
== :: AttrClass -> AttrClass -> Bool
$c== :: AttrClass -> AttrClass -> Bool
Eq)
instance WrappedPtr AttrClass where
wrappedPtrCalloc :: IO (Ptr AttrClass)
wrappedPtrCalloc = Int -> IO (Ptr AttrClass)
forall a. Int -> IO (Ptr a)
callocBytes 32
wrappedPtrCopy :: AttrClass -> IO AttrClass
wrappedPtrCopy = \p :: AttrClass
p -> AttrClass -> (Ptr AttrClass -> IO AttrClass) -> IO AttrClass
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
p (Int -> Ptr AttrClass -> IO (Ptr AttrClass)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 32 (Ptr AttrClass -> IO (Ptr AttrClass))
-> (Ptr AttrClass -> IO AttrClass) -> Ptr AttrClass -> IO AttrClass
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr AttrClass -> AttrClass)
-> Ptr AttrClass -> IO AttrClass
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr AttrClass -> AttrClass
AttrClass)
wrappedPtrFree :: Maybe (GDestroyNotify AttrClass)
wrappedPtrFree = GDestroyNotify AttrClass -> Maybe (GDestroyNotify AttrClass)
forall a. a -> Maybe a
Just GDestroyNotify AttrClass
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroAttrClass :: MonadIO m => m AttrClass
newZeroAttrClass :: m AttrClass
newZeroAttrClass = IO AttrClass -> m AttrClass
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AttrClass -> m AttrClass) -> IO AttrClass -> m AttrClass
forall a b. (a -> b) -> a -> b
$ IO (Ptr AttrClass)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr AttrClass)
-> (Ptr AttrClass -> IO AttrClass) -> IO AttrClass
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr AttrClass -> AttrClass)
-> Ptr AttrClass -> IO AttrClass
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr AttrClass -> AttrClass
AttrClass
instance tag ~ 'AttrSet => Constructible AttrClass tag where
new :: (ManagedPtr AttrClass -> AttrClass)
-> [AttrOp AttrClass tag] -> m AttrClass
new _ attrs :: [AttrOp AttrClass tag]
attrs = do
AttrClass
o <- m AttrClass
forall (m :: * -> *). MonadIO m => m AttrClass
newZeroAttrClass
AttrClass -> [AttrOp AttrClass 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set AttrClass
o [AttrOp AttrClass tag]
[AttrOp AttrClass 'AttrSet]
attrs
AttrClass -> m AttrClass
forall (m :: * -> *) a. Monad m => a -> m a
return AttrClass
o
noAttrClass :: Maybe AttrClass
noAttrClass :: Maybe AttrClass
noAttrClass = Maybe AttrClass
forall a. Maybe a
Nothing
getAttrClassType :: MonadIO m => AttrClass -> m Pango.Enums.AttrType
getAttrClassType :: AttrClass -> m AttrType
getAttrClassType s :: AttrClass
s = IO AttrType -> m AttrType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AttrType -> m AttrType) -> IO AttrType -> m AttrType
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO AttrType) -> IO AttrType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO AttrType) -> IO AttrType)
-> (Ptr AttrClass -> IO AttrType) -> IO AttrType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr AttrClass
ptr Ptr AttrClass -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO CUInt
let val' :: AttrType
val' = (Int -> AttrType
forall a. Enum a => Int -> a
toEnum (Int -> AttrType) -> (CUInt -> Int) -> CUInt -> AttrType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
AttrType -> IO AttrType
forall (m :: * -> *) a. Monad m => a -> m a
return AttrType
val'
setAttrClassType :: MonadIO m => AttrClass -> Pango.Enums.AttrType -> m ()
setAttrClassType :: AttrClass -> AttrType -> m ()
setAttrClassType s :: AttrClass
s val :: AttrType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO ()) -> IO ())
-> (Ptr AttrClass -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (AttrType -> Int) -> AttrType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AttrType -> Int
forall a. Enum a => a -> Int
fromEnum) AttrType
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AttrClass
ptr Ptr AttrClass -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data AttrClassTypeFieldInfo
instance AttrInfo AttrClassTypeFieldInfo where
type AttrBaseTypeConstraint AttrClassTypeFieldInfo = (~) AttrClass
type AttrAllowedOps AttrClassTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint AttrClassTypeFieldInfo = (~) Pango.Enums.AttrType
type AttrTransferTypeConstraint AttrClassTypeFieldInfo = (~)Pango.Enums.AttrType
type AttrTransferType AttrClassTypeFieldInfo = Pango.Enums.AttrType
type AttrGetType AttrClassTypeFieldInfo = Pango.Enums.AttrType
type AttrLabel AttrClassTypeFieldInfo = "type"
type AttrOrigin AttrClassTypeFieldInfo = AttrClass
attrGet = getAttrClassType
attrSet = setAttrClassType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
attrClass_type :: AttrLabelProxy "type"
attrClass_type = AttrLabelProxy
#endif
getAttrClassDestroy :: MonadIO m => AttrClass -> m (Maybe Pango.Callbacks.AttrClassDestroyFieldCallback)
getAttrClassDestroy :: AttrClass -> m (Maybe AttrClassDestroyFieldCallback)
getAttrClassDestroy s :: AttrClass
s = IO (Maybe AttrClassDestroyFieldCallback)
-> m (Maybe AttrClassDestroyFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe AttrClassDestroyFieldCallback)
-> m (Maybe AttrClassDestroyFieldCallback))
-> IO (Maybe AttrClassDestroyFieldCallback)
-> m (Maybe AttrClassDestroyFieldCallback)
forall a b. (a -> b) -> a -> b
$ AttrClass
-> (Ptr AttrClass -> IO (Maybe AttrClassDestroyFieldCallback))
-> IO (Maybe AttrClassDestroyFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO (Maybe AttrClassDestroyFieldCallback))
-> IO (Maybe AttrClassDestroyFieldCallback))
-> (Ptr AttrClass -> IO (Maybe AttrClassDestroyFieldCallback))
-> IO (Maybe AttrClassDestroyFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
FunPtr C_AttrClassDestroyFieldCallback
val <- Ptr (FunPtr C_AttrClassDestroyFieldCallback)
-> IO (FunPtr C_AttrClassDestroyFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr AttrClass
ptr Ptr AttrClass
-> Int -> Ptr (FunPtr C_AttrClassDestroyFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO (FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)
Maybe AttrClassDestroyFieldCallback
result <- FunPtr C_AttrClassDestroyFieldCallback
-> (FunPtr C_AttrClassDestroyFieldCallback
-> IO AttrClassDestroyFieldCallback)
-> IO (Maybe AttrClassDestroyFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_AttrClassDestroyFieldCallback
val ((FunPtr C_AttrClassDestroyFieldCallback
-> IO AttrClassDestroyFieldCallback)
-> IO (Maybe AttrClassDestroyFieldCallback))
-> (FunPtr C_AttrClassDestroyFieldCallback
-> IO AttrClassDestroyFieldCallback)
-> IO (Maybe AttrClassDestroyFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_AttrClassDestroyFieldCallback
val' -> do
let val'' :: AttrClassDestroyFieldCallback
val'' = FunPtr C_AttrClassDestroyFieldCallback
-> AttrClassDestroyFieldCallback
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_AttrClassDestroyFieldCallback -> Attribute -> m ()
Pango.Callbacks.dynamic_AttrClassDestroyFieldCallback FunPtr C_AttrClassDestroyFieldCallback
val'
AttrClassDestroyFieldCallback -> IO AttrClassDestroyFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return AttrClassDestroyFieldCallback
val''
Maybe AttrClassDestroyFieldCallback
-> IO (Maybe AttrClassDestroyFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AttrClassDestroyFieldCallback
result
setAttrClassDestroy :: MonadIO m => AttrClass -> FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback -> m ()
setAttrClassDestroy :: AttrClass -> FunPtr C_AttrClassDestroyFieldCallback -> m ()
setAttrClassDestroy s :: AttrClass
s val :: FunPtr C_AttrClassDestroyFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO ()) -> IO ())
-> (Ptr AttrClass -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
Ptr (FunPtr C_AttrClassDestroyFieldCallback)
-> FunPtr C_AttrClassDestroyFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AttrClass
ptr Ptr AttrClass
-> Int -> Ptr (FunPtr C_AttrClassDestroyFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr C_AttrClassDestroyFieldCallback
val :: FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)
clearAttrClassDestroy :: MonadIO m => AttrClass -> m ()
clearAttrClassDestroy :: AttrClass -> m ()
clearAttrClassDestroy s :: AttrClass
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO ()) -> IO ())
-> (Ptr AttrClass -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
Ptr (FunPtr C_AttrClassDestroyFieldCallback)
-> FunPtr C_AttrClassDestroyFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AttrClass
ptr Ptr AttrClass
-> Int -> Ptr (FunPtr C_AttrClassDestroyFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr C_AttrClassDestroyFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)
#if defined(ENABLE_OVERLOADING)
data AttrClassDestroyFieldInfo
instance AttrInfo AttrClassDestroyFieldInfo where
type AttrBaseTypeConstraint AttrClassDestroyFieldInfo = (~) AttrClass
type AttrAllowedOps AttrClassDestroyFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint AttrClassDestroyFieldInfo = (~) (FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)
type AttrTransferTypeConstraint AttrClassDestroyFieldInfo = (~)Pango.Callbacks.AttrClassDestroyFieldCallback
type AttrTransferType AttrClassDestroyFieldInfo = (FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)
type AttrGetType AttrClassDestroyFieldInfo = Maybe Pango.Callbacks.AttrClassDestroyFieldCallback
type AttrLabel AttrClassDestroyFieldInfo = "destroy"
type AttrOrigin AttrClassDestroyFieldInfo = AttrClass
attrGet = getAttrClassDestroy
attrSet = setAttrClassDestroy
attrConstruct = undefined
attrClear = clearAttrClassDestroy
attrTransfer _ v = do
Pango.Callbacks.mk_AttrClassDestroyFieldCallback (Pango.Callbacks.wrap_AttrClassDestroyFieldCallback Nothing v)
attrClass_destroy :: AttrLabelProxy "destroy"
attrClass_destroy = AttrLabelProxy
#endif
getAttrClassEqual :: MonadIO m => AttrClass -> m (Maybe Pango.Callbacks.AttrClassEqualFieldCallback)
getAttrClassEqual :: AttrClass -> m (Maybe AttrClassEqualFieldCallback)
getAttrClassEqual s :: AttrClass
s = IO (Maybe AttrClassEqualFieldCallback)
-> m (Maybe AttrClassEqualFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe AttrClassEqualFieldCallback)
-> m (Maybe AttrClassEqualFieldCallback))
-> IO (Maybe AttrClassEqualFieldCallback)
-> m (Maybe AttrClassEqualFieldCallback)
forall a b. (a -> b) -> a -> b
$ AttrClass
-> (Ptr AttrClass -> IO (Maybe AttrClassEqualFieldCallback))
-> IO (Maybe AttrClassEqualFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO (Maybe AttrClassEqualFieldCallback))
-> IO (Maybe AttrClassEqualFieldCallback))
-> (Ptr AttrClass -> IO (Maybe AttrClassEqualFieldCallback))
-> IO (Maybe AttrClassEqualFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
FunPtr C_AttrClassEqualFieldCallback
val <- Ptr (FunPtr C_AttrClassEqualFieldCallback)
-> IO (FunPtr C_AttrClassEqualFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr AttrClass
ptr Ptr AttrClass -> Int -> Ptr (FunPtr C_AttrClassEqualFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO (FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)
Maybe AttrClassEqualFieldCallback
result <- FunPtr C_AttrClassEqualFieldCallback
-> (FunPtr C_AttrClassEqualFieldCallback
-> IO AttrClassEqualFieldCallback)
-> IO (Maybe AttrClassEqualFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_AttrClassEqualFieldCallback
val ((FunPtr C_AttrClassEqualFieldCallback
-> IO AttrClassEqualFieldCallback)
-> IO (Maybe AttrClassEqualFieldCallback))
-> (FunPtr C_AttrClassEqualFieldCallback
-> IO AttrClassEqualFieldCallback)
-> IO (Maybe AttrClassEqualFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_AttrClassEqualFieldCallback
val' -> do
let val'' :: AttrClassEqualFieldCallback
val'' = FunPtr C_AttrClassEqualFieldCallback -> AttrClassEqualFieldCallback
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_AttrClassEqualFieldCallback
-> Attribute -> Attribute -> m Bool
Pango.Callbacks.dynamic_AttrClassEqualFieldCallback FunPtr C_AttrClassEqualFieldCallback
val'
AttrClassEqualFieldCallback -> IO AttrClassEqualFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return AttrClassEqualFieldCallback
val''
Maybe AttrClassEqualFieldCallback
-> IO (Maybe AttrClassEqualFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AttrClassEqualFieldCallback
result
setAttrClassEqual :: MonadIO m => AttrClass -> FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback -> m ()
setAttrClassEqual :: AttrClass -> FunPtr C_AttrClassEqualFieldCallback -> m ()
setAttrClassEqual s :: AttrClass
s val :: FunPtr C_AttrClassEqualFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO ()) -> IO ())
-> (Ptr AttrClass -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
Ptr (FunPtr C_AttrClassEqualFieldCallback)
-> FunPtr C_AttrClassEqualFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AttrClass
ptr Ptr AttrClass -> Int -> Ptr (FunPtr C_AttrClassEqualFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_AttrClassEqualFieldCallback
val :: FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)
clearAttrClassEqual :: MonadIO m => AttrClass -> m ()
clearAttrClassEqual :: AttrClass -> m ()
clearAttrClassEqual s :: AttrClass
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ AttrClass -> (Ptr AttrClass -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr AttrClass
s ((Ptr AttrClass -> IO ()) -> IO ())
-> (Ptr AttrClass -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr AttrClass
ptr -> do
Ptr (FunPtr C_AttrClassEqualFieldCallback)
-> FunPtr C_AttrClassEqualFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AttrClass
ptr Ptr AttrClass -> Int -> Ptr (FunPtr C_AttrClassEqualFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_AttrClassEqualFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)
#if defined(ENABLE_OVERLOADING)
data AttrClassEqualFieldInfo
instance AttrInfo AttrClassEqualFieldInfo where
type AttrBaseTypeConstraint AttrClassEqualFieldInfo = (~) AttrClass
type AttrAllowedOps AttrClassEqualFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint AttrClassEqualFieldInfo = (~) (FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)
type AttrTransferTypeConstraint AttrClassEqualFieldInfo = (~)Pango.Callbacks.AttrClassEqualFieldCallback
type AttrTransferType AttrClassEqualFieldInfo = (FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)
type AttrGetType AttrClassEqualFieldInfo = Maybe Pango.Callbacks.AttrClassEqualFieldCallback
type AttrLabel AttrClassEqualFieldInfo = "equal"
type AttrOrigin AttrClassEqualFieldInfo = AttrClass
attrGet = getAttrClassEqual
attrSet = setAttrClassEqual
attrConstruct = undefined
attrClear = clearAttrClassEqual
attrTransfer _ v = do
Pango.Callbacks.mk_AttrClassEqualFieldCallback (Pango.Callbacks.wrap_AttrClassEqualFieldCallback Nothing v)
attrClass_equal :: AttrLabelProxy "equal"
attrClass_equal = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AttrClass
type instance O.AttributeList AttrClass = AttrClassAttributeList
type AttrClassAttributeList = ('[ '("type", AttrClassTypeFieldInfo), '("destroy", AttrClassDestroyFieldInfo), '("equal", AttrClassEqualFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveAttrClassMethod (t :: Symbol) (o :: *) :: * where
ResolveAttrClassMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAttrClassMethod t AttrClass, O.MethodInfo info AttrClass p) => OL.IsLabel t (AttrClass -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif