{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Structs.TextRectangle
(
TextRectangle(..) ,
newZeroTextRectangle ,
#if defined(ENABLE_OVERLOADING)
ResolveTextRectangleMethod ,
#endif
getTextRectangleHeight ,
setTextRectangleHeight ,
#if defined(ENABLE_OVERLOADING)
textRectangle_height ,
#endif
getTextRectangleWidth ,
setTextRectangleWidth ,
#if defined(ENABLE_OVERLOADING)
textRectangle_width ,
#endif
getTextRectangleX ,
setTextRectangleX ,
#if defined(ENABLE_OVERLOADING)
textRectangle_x ,
#endif
getTextRectangleY ,
setTextRectangleY ,
#if defined(ENABLE_OVERLOADING)
textRectangle_y ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified Data.Bits as DB
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
#else
#endif
newtype TextRectangle = TextRectangle (SP.ManagedPtr TextRectangle)
deriving (TextRectangle -> TextRectangle -> Bool
(TextRectangle -> TextRectangle -> Bool)
-> (TextRectangle -> TextRectangle -> Bool) -> Eq TextRectangle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextRectangle -> TextRectangle -> Bool
== :: TextRectangle -> TextRectangle -> Bool
$c/= :: TextRectangle -> TextRectangle -> Bool
/= :: TextRectangle -> TextRectangle -> Bool
Eq)
instance SP.ManagedPtrNewtype TextRectangle where
toManagedPtr :: TextRectangle -> ManagedPtr TextRectangle
toManagedPtr (TextRectangle ManagedPtr TextRectangle
p) = ManagedPtr TextRectangle
p
instance BoxedPtr TextRectangle where
boxedPtrCopy :: TextRectangle -> IO TextRectangle
boxedPtrCopy = \TextRectangle
p -> TextRectangle
-> (Ptr TextRectangle -> IO TextRectangle) -> IO TextRectangle
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TextRectangle
p (Int -> Ptr TextRectangle -> IO (Ptr TextRectangle)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
16 (Ptr TextRectangle -> IO (Ptr TextRectangle))
-> (Ptr TextRectangle -> IO TextRectangle)
-> Ptr TextRectangle
-> IO TextRectangle
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr TextRectangle -> TextRectangle)
-> Ptr TextRectangle -> IO TextRectangle
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr TextRectangle -> TextRectangle
TextRectangle)
boxedPtrFree :: TextRectangle -> IO ()
boxedPtrFree = \TextRectangle
x -> TextRectangle -> (Ptr TextRectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr TextRectangle
x Ptr TextRectangle -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr TextRectangle where
boxedPtrCalloc :: IO (Ptr TextRectangle)
boxedPtrCalloc = Int -> IO (Ptr TextRectangle)
forall a. Int -> IO (Ptr a)
callocBytes Int
16
newZeroTextRectangle :: MonadIO m => m TextRectangle
newZeroTextRectangle :: forall (m :: * -> *). MonadIO m => m TextRectangle
newZeroTextRectangle = IO TextRectangle -> m TextRectangle
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextRectangle -> m TextRectangle)
-> IO TextRectangle -> m TextRectangle
forall a b. (a -> b) -> a -> b
$ IO (Ptr TextRectangle)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr TextRectangle)
-> (Ptr TextRectangle -> IO TextRectangle) -> IO TextRectangle
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TextRectangle -> TextRectangle)
-> Ptr TextRectangle -> IO TextRectangle
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TextRectangle -> TextRectangle
TextRectangle
instance tag ~ 'AttrSet => Constructible TextRectangle tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr TextRectangle -> TextRectangle)
-> [AttrOp TextRectangle tag] -> m TextRectangle
new ManagedPtr TextRectangle -> TextRectangle
_ [AttrOp TextRectangle tag]
attrs = do
o <- m TextRectangle
forall (m :: * -> *). MonadIO m => m TextRectangle
newZeroTextRectangle
GI.Attributes.set o attrs
return o
getTextRectangleX :: MonadIO m => TextRectangle -> m Int32
getTextRectangleX :: forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleX TextRectangle
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO Int32) -> IO Int32)
-> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
return val
setTextRectangleX :: MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleX :: forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleX TextRectangle
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO ()) -> IO ())
-> (Ptr TextRectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data TextRectangleXFieldInfo
instance AttrInfo TextRectangleXFieldInfo where
type AttrBaseTypeConstraint TextRectangleXFieldInfo = (~) TextRectangle
type AttrAllowedOps TextRectangleXFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TextRectangleXFieldInfo = (~) Int32
type AttrTransferTypeConstraint TextRectangleXFieldInfo = (~)Int32
type AttrTransferType TextRectangleXFieldInfo = Int32
type AttrGetType TextRectangleXFieldInfo = Int32
type AttrLabel TextRectangleXFieldInfo = "x"
type AttrOrigin TextRectangleXFieldInfo = TextRectangle
attrGet :: forall o.
AttrBaseTypeConstraint TextRectangleXFieldInfo o =>
o -> IO (AttrGetType TextRectangleXFieldInfo)
attrGet = o -> IO (AttrGetType TextRectangleXFieldInfo)
TextRectangle -> IO Int32
forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleX
attrSet :: forall o b.
(AttrBaseTypeConstraint TextRectangleXFieldInfo o,
AttrSetTypeConstraint TextRectangleXFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
TextRectangle -> Int32 -> IO ()
forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleX
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TextRectangleXFieldInfo o,
AttrSetTypeConstraint TextRectangleXFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint TextRectangleXFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TextRectangleXFieldInfo o,
AttrTransferTypeConstraint TextRectangleXFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType TextRectangleXFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Atk.Structs.TextRectangle.x"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-atk-2.0.29/docs/GI-Atk-Structs-TextRectangle.html#g:attr:x"
})
textRectangle_x :: AttrLabelProxy "x"
textRectangle_x :: AttrLabelProxy "x"
textRectangle_x = AttrLabelProxy "x"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getTextRectangleY :: MonadIO m => TextRectangle -> m Int32
getTextRectangleY :: forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleY TextRectangle
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO Int32) -> IO Int32)
-> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Int32
return val
setTextRectangleY :: MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleY :: forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleY TextRectangle
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO ()) -> IO ())
-> (Ptr TextRectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data TextRectangleYFieldInfo
instance AttrInfo TextRectangleYFieldInfo where
type AttrBaseTypeConstraint TextRectangleYFieldInfo = (~) TextRectangle
type AttrAllowedOps TextRectangleYFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TextRectangleYFieldInfo = (~) Int32
type AttrTransferTypeConstraint TextRectangleYFieldInfo = (~)Int32
type AttrTransferType TextRectangleYFieldInfo = Int32
type AttrGetType TextRectangleYFieldInfo = Int32
type AttrLabel TextRectangleYFieldInfo = "y"
type AttrOrigin TextRectangleYFieldInfo = TextRectangle
attrGet :: forall o.
AttrBaseTypeConstraint TextRectangleYFieldInfo o =>
o -> IO (AttrGetType TextRectangleYFieldInfo)
attrGet = o -> IO (AttrGetType TextRectangleYFieldInfo)
TextRectangle -> IO Int32
forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleY
attrSet :: forall o b.
(AttrBaseTypeConstraint TextRectangleYFieldInfo o,
AttrSetTypeConstraint TextRectangleYFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
TextRectangle -> Int32 -> IO ()
forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleY
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TextRectangleYFieldInfo o,
AttrSetTypeConstraint TextRectangleYFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint TextRectangleYFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TextRectangleYFieldInfo o,
AttrTransferTypeConstraint TextRectangleYFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType TextRectangleYFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Atk.Structs.TextRectangle.y"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-atk-2.0.29/docs/GI-Atk-Structs-TextRectangle.html#g:attr:y"
})
textRectangle_y :: AttrLabelProxy "y"
textRectangle_y :: AttrLabelProxy "y"
textRectangle_y = AttrLabelProxy "y"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getTextRectangleWidth :: MonadIO m => TextRectangle -> m Int32
getTextRectangleWidth :: forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleWidth TextRectangle
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO Int32) -> IO Int32)
-> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int32
return val
setTextRectangleWidth :: MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleWidth :: forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleWidth TextRectangle
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO ()) -> IO ())
-> (Ptr TextRectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data TextRectangleWidthFieldInfo
instance AttrInfo TextRectangleWidthFieldInfo where
type AttrBaseTypeConstraint TextRectangleWidthFieldInfo = (~) TextRectangle
type AttrAllowedOps TextRectangleWidthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TextRectangleWidthFieldInfo = (~) Int32
type AttrTransferTypeConstraint TextRectangleWidthFieldInfo = (~)Int32
type AttrTransferType TextRectangleWidthFieldInfo = Int32
type AttrGetType TextRectangleWidthFieldInfo = Int32
type AttrLabel TextRectangleWidthFieldInfo = "width"
type AttrOrigin TextRectangleWidthFieldInfo = TextRectangle
attrGet :: forall o.
AttrBaseTypeConstraint TextRectangleWidthFieldInfo o =>
o -> IO (AttrGetType TextRectangleWidthFieldInfo)
attrGet = o -> IO (AttrGetType TextRectangleWidthFieldInfo)
TextRectangle -> IO Int32
forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleWidth
attrSet :: forall o b.
(AttrBaseTypeConstraint TextRectangleWidthFieldInfo o,
AttrSetTypeConstraint TextRectangleWidthFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
TextRectangle -> Int32 -> IO ()
forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleWidth
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TextRectangleWidthFieldInfo o,
AttrSetTypeConstraint TextRectangleWidthFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint TextRectangleWidthFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TextRectangleWidthFieldInfo o,
AttrTransferTypeConstraint TextRectangleWidthFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType TextRectangleWidthFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Atk.Structs.TextRectangle.width"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-atk-2.0.29/docs/GI-Atk-Structs-TextRectangle.html#g:attr:width"
})
textRectangle_width :: AttrLabelProxy "width"
textRectangle_width :: AttrLabelProxy "width"
textRectangle_width = AttrLabelProxy "width"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
getTextRectangleHeight :: MonadIO m => TextRectangle -> m Int32
getTextRectangleHeight :: forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleHeight TextRectangle
s = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO Int32) -> IO Int32)
-> (Ptr TextRectangle -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO Int32
return val
setTextRectangleHeight :: MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleHeight :: forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleHeight TextRectangle
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TextRectangle -> (Ptr TextRectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TextRectangle
s ((Ptr TextRectangle -> IO ()) -> IO ())
-> (Ptr TextRectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TextRectangle
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TextRectangle
ptr Ptr TextRectangle -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data TextRectangleHeightFieldInfo
instance AttrInfo TextRectangleHeightFieldInfo where
type AttrBaseTypeConstraint TextRectangleHeightFieldInfo = (~) TextRectangle
type AttrAllowedOps TextRectangleHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TextRectangleHeightFieldInfo = (~) Int32
type AttrTransferTypeConstraint TextRectangleHeightFieldInfo = (~)Int32
type AttrTransferType TextRectangleHeightFieldInfo = Int32
type AttrGetType TextRectangleHeightFieldInfo = Int32
type AttrLabel TextRectangleHeightFieldInfo = "height"
type AttrOrigin TextRectangleHeightFieldInfo = TextRectangle
attrGet :: forall o.
AttrBaseTypeConstraint TextRectangleHeightFieldInfo o =>
o -> IO (AttrGetType TextRectangleHeightFieldInfo)
attrGet = o -> IO (AttrGetType TextRectangleHeightFieldInfo)
TextRectangle -> IO Int32
forall (m :: * -> *). MonadIO m => TextRectangle -> m Int32
getTextRectangleHeight
attrSet :: forall o b.
(AttrBaseTypeConstraint TextRectangleHeightFieldInfo o,
AttrSetTypeConstraint TextRectangleHeightFieldInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
TextRectangle -> Int32 -> IO ()
forall (m :: * -> *). MonadIO m => TextRectangle -> Int32 -> m ()
setTextRectangleHeight
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TextRectangleHeightFieldInfo o,
AttrSetTypeConstraint TextRectangleHeightFieldInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint TextRectangleHeightFieldInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TextRectangleHeightFieldInfo o,
AttrTransferTypeConstraint TextRectangleHeightFieldInfo b) =>
Proxy o -> b -> IO (AttrTransferType TextRectangleHeightFieldInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Atk.Structs.TextRectangle.height"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-atk-2.0.29/docs/GI-Atk-Structs-TextRectangle.html#g:attr:height"
})
textRectangle_height :: AttrLabelProxy "height"
textRectangle_height :: AttrLabelProxy "height"
textRectangle_height = AttrLabelProxy "height"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextRectangle
type instance O.AttributeList TextRectangle = TextRectangleAttributeList
type TextRectangleAttributeList = ('[ '("x", TextRectangleXFieldInfo), '("y", TextRectangleYFieldInfo), '("width", TextRectangleWidthFieldInfo), '("height", TextRectangleHeightFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTextRectangleMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveTextRectangleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextRectangleMethod t TextRectangle, O.OverloadedMethod info TextRectangle p) => OL.IsLabel t (TextRectangle -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: TextRectangle -> p
fromLabel = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTextRectangleMethod t TextRectangle, O.OverloadedMethod info TextRectangle p, R.HasField t TextRectangle p) => R.HasField t TextRectangle p where
getField :: TextRectangle -> p
getField = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#endif
instance (info ~ ResolveTextRectangleMethod t TextRectangle, O.OverloadedMethodInfo info TextRectangle) => OL.IsLabel t (O.MethodProxy info TextRectangle) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: MethodProxy info TextRectangle
fromLabel = MethodProxy info TextRectangle
forall info obj. MethodProxy info obj
O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif