{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Structs.Geometry
(
Geometry(..) ,
newZeroGeometry ,
#if defined(ENABLE_OVERLOADING)
ResolveGeometryMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
geometry_baseHeight ,
#endif
getGeometryBaseHeight ,
setGeometryBaseHeight ,
#if defined(ENABLE_OVERLOADING)
geometry_baseWidth ,
#endif
getGeometryBaseWidth ,
setGeometryBaseWidth ,
#if defined(ENABLE_OVERLOADING)
geometry_heightInc ,
#endif
getGeometryHeightInc ,
setGeometryHeightInc ,
#if defined(ENABLE_OVERLOADING)
geometry_maxAspect ,
#endif
getGeometryMaxAspect ,
setGeometryMaxAspect ,
#if defined(ENABLE_OVERLOADING)
geometry_maxHeight ,
#endif
getGeometryMaxHeight ,
setGeometryMaxHeight ,
#if defined(ENABLE_OVERLOADING)
geometry_maxWidth ,
#endif
getGeometryMaxWidth ,
setGeometryMaxWidth ,
#if defined(ENABLE_OVERLOADING)
geometry_minAspect ,
#endif
getGeometryMinAspect ,
setGeometryMinAspect ,
#if defined(ENABLE_OVERLOADING)
geometry_minHeight ,
#endif
getGeometryMinHeight ,
setGeometryMinHeight ,
#if defined(ENABLE_OVERLOADING)
geometry_minWidth ,
#endif
getGeometryMinWidth ,
setGeometryMinWidth ,
#if defined(ENABLE_OVERLOADING)
geometry_widthInc ,
#endif
getGeometryWidthInc ,
setGeometryWidthInc ,
#if defined(ENABLE_OVERLOADING)
geometry_winGravity ,
#endif
getGeometryWinGravity ,
setGeometryWinGravity ,
) 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.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 Control.Monad.IO.Class as MIO
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.Gdk.Enums as Gdk.Enums
newtype Geometry = Geometry (SP.ManagedPtr Geometry)
deriving (Geometry -> Geometry -> Bool
(Geometry -> Geometry -> Bool)
-> (Geometry -> Geometry -> Bool) -> Eq Geometry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Geometry -> Geometry -> Bool
$c/= :: Geometry -> Geometry -> Bool
== :: Geometry -> Geometry -> Bool
$c== :: Geometry -> Geometry -> Bool
Eq)
instance SP.ManagedPtrNewtype Geometry where
toManagedPtr :: Geometry -> ManagedPtr Geometry
toManagedPtr (Geometry ManagedPtr Geometry
p) = ManagedPtr Geometry
p
instance BoxedPtr Geometry where
boxedPtrCopy :: Geometry -> IO Geometry
boxedPtrCopy = \Geometry
p -> Geometry -> (Ptr Geometry -> IO Geometry) -> IO Geometry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Geometry
p (Int -> Ptr Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
56 (Ptr Geometry -> IO (Ptr Geometry))
-> (Ptr Geometry -> IO Geometry) -> Ptr Geometry -> IO Geometry
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr Geometry -> Geometry) -> Ptr Geometry -> IO Geometry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr Geometry -> Geometry
Geometry)
boxedPtrFree :: Geometry -> IO ()
boxedPtrFree = \Geometry
x -> Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr Geometry
x Ptr Geometry -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr Geometry where
boxedPtrCalloc :: IO (Ptr Geometry)
boxedPtrCalloc = Int -> IO (Ptr Geometry)
forall a. Int -> IO (Ptr a)
callocBytes Int
56
newZeroGeometry :: MonadIO m => m Geometry
newZeroGeometry :: m Geometry
newZeroGeometry = IO Geometry -> m Geometry
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Geometry -> m Geometry) -> IO Geometry -> m Geometry
forall a b. (a -> b) -> a -> b
$ IO (Ptr Geometry)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr Geometry) -> (Ptr Geometry -> IO Geometry) -> IO Geometry
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Geometry -> Geometry) -> Ptr Geometry -> IO Geometry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Geometry -> Geometry
Geometry
instance tag ~ 'AttrSet => Constructible Geometry tag where
new :: (ManagedPtr Geometry -> Geometry)
-> [AttrOp Geometry tag] -> m Geometry
new ManagedPtr Geometry -> Geometry
_ [AttrOp Geometry tag]
attrs = do
Geometry
o <- m Geometry
forall (m :: * -> *). MonadIO m => m Geometry
newZeroGeometry
Geometry -> [AttrOp Geometry 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Geometry
o [AttrOp Geometry tag]
[AttrOp Geometry 'AttrSet]
attrs
Geometry -> m Geometry
forall (m :: * -> *) a. Monad m => a -> m a
return Geometry
o
getGeometryMinWidth :: MonadIO m => Geometry -> m Int32
getGeometryMinWidth :: Geometry -> m Int32
getGeometryMinWidth Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryMinWidth :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryMinWidth :: Geometry -> Int32 -> m ()
setGeometryMinWidth Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryMinWidthFieldInfo
instance AttrInfo GeometryMinWidthFieldInfo where
type AttrBaseTypeConstraint GeometryMinWidthFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMinWidthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMinWidthFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryMinWidthFieldInfo = (~)Int32
type AttrTransferType GeometryMinWidthFieldInfo = Int32
type AttrGetType GeometryMinWidthFieldInfo = Int32
type AttrLabel GeometryMinWidthFieldInfo = "min_width"
type AttrOrigin GeometryMinWidthFieldInfo = Geometry
attrGet = getGeometryMinWidth
attrSet = setGeometryMinWidth
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_minWidth :: AttrLabelProxy "minWidth"
geometry_minWidth = AttrLabelProxy
#endif
getGeometryMinHeight :: MonadIO m => Geometry -> m Int32
getGeometryMinHeight :: Geometry -> m Int32
getGeometryMinHeight Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryMinHeight :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryMinHeight :: Geometry -> Int32 -> m ()
setGeometryMinHeight Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryMinHeightFieldInfo
instance AttrInfo GeometryMinHeightFieldInfo where
type AttrBaseTypeConstraint GeometryMinHeightFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMinHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMinHeightFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryMinHeightFieldInfo = (~)Int32
type AttrTransferType GeometryMinHeightFieldInfo = Int32
type AttrGetType GeometryMinHeightFieldInfo = Int32
type AttrLabel GeometryMinHeightFieldInfo = "min_height"
type AttrOrigin GeometryMinHeightFieldInfo = Geometry
attrGet = getGeometryMinHeight
attrSet = setGeometryMinHeight
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_minHeight :: AttrLabelProxy "minHeight"
geometry_minHeight = AttrLabelProxy
#endif
getGeometryMaxWidth :: MonadIO m => Geometry -> m Int32
getGeometryMaxWidth :: Geometry -> m Int32
getGeometryMaxWidth Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryMaxWidth :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryMaxWidth :: Geometry -> Int32 -> m ()
setGeometryMaxWidth Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryMaxWidthFieldInfo
instance AttrInfo GeometryMaxWidthFieldInfo where
type AttrBaseTypeConstraint GeometryMaxWidthFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMaxWidthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMaxWidthFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryMaxWidthFieldInfo = (~)Int32
type AttrTransferType GeometryMaxWidthFieldInfo = Int32
type AttrGetType GeometryMaxWidthFieldInfo = Int32
type AttrLabel GeometryMaxWidthFieldInfo = "max_width"
type AttrOrigin GeometryMaxWidthFieldInfo = Geometry
attrGet = getGeometryMaxWidth
attrSet = setGeometryMaxWidth
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_maxWidth :: AttrLabelProxy "maxWidth"
geometry_maxWidth = AttrLabelProxy
#endif
getGeometryMaxHeight :: MonadIO m => Geometry -> m Int32
getGeometryMaxHeight :: Geometry -> m Int32
getGeometryMaxHeight Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryMaxHeight :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryMaxHeight :: Geometry -> Int32 -> m ()
setGeometryMaxHeight Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryMaxHeightFieldInfo
instance AttrInfo GeometryMaxHeightFieldInfo where
type AttrBaseTypeConstraint GeometryMaxHeightFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMaxHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMaxHeightFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryMaxHeightFieldInfo = (~)Int32
type AttrTransferType GeometryMaxHeightFieldInfo = Int32
type AttrGetType GeometryMaxHeightFieldInfo = Int32
type AttrLabel GeometryMaxHeightFieldInfo = "max_height"
type AttrOrigin GeometryMaxHeightFieldInfo = Geometry
attrGet = getGeometryMaxHeight
attrSet = setGeometryMaxHeight
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_maxHeight :: AttrLabelProxy "maxHeight"
geometry_maxHeight = AttrLabelProxy
#endif
getGeometryBaseWidth :: MonadIO m => Geometry -> m Int32
getGeometryBaseWidth :: Geometry -> m Int32
getGeometryBaseWidth Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryBaseWidth :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryBaseWidth :: Geometry -> Int32 -> m ()
setGeometryBaseWidth Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryBaseWidthFieldInfo
instance AttrInfo GeometryBaseWidthFieldInfo where
type AttrBaseTypeConstraint GeometryBaseWidthFieldInfo = (~) Geometry
type AttrAllowedOps GeometryBaseWidthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryBaseWidthFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryBaseWidthFieldInfo = (~)Int32
type AttrTransferType GeometryBaseWidthFieldInfo = Int32
type AttrGetType GeometryBaseWidthFieldInfo = Int32
type AttrLabel GeometryBaseWidthFieldInfo = "base_width"
type AttrOrigin GeometryBaseWidthFieldInfo = Geometry
attrGet = getGeometryBaseWidth
attrSet = setGeometryBaseWidth
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_baseWidth :: AttrLabelProxy "baseWidth"
geometry_baseWidth = AttrLabelProxy
#endif
getGeometryBaseHeight :: MonadIO m => Geometry -> m Int32
getGeometryBaseHeight :: Geometry -> m Int32
getGeometryBaseHeight Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryBaseHeight :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryBaseHeight :: Geometry -> Int32 -> m ()
setGeometryBaseHeight Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryBaseHeightFieldInfo
instance AttrInfo GeometryBaseHeightFieldInfo where
type AttrBaseTypeConstraint GeometryBaseHeightFieldInfo = (~) Geometry
type AttrAllowedOps GeometryBaseHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryBaseHeightFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryBaseHeightFieldInfo = (~)Int32
type AttrTransferType GeometryBaseHeightFieldInfo = Int32
type AttrGetType GeometryBaseHeightFieldInfo = Int32
type AttrLabel GeometryBaseHeightFieldInfo = "base_height"
type AttrOrigin GeometryBaseHeightFieldInfo = Geometry
attrGet = getGeometryBaseHeight
attrSet = setGeometryBaseHeight
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_baseHeight :: AttrLabelProxy "baseHeight"
geometry_baseHeight = AttrLabelProxy
#endif
getGeometryWidthInc :: MonadIO m => Geometry -> m Int32
getGeometryWidthInc :: Geometry -> m Int32
getGeometryWidthInc Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryWidthInc :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryWidthInc :: Geometry -> Int32 -> m ()
setGeometryWidthInc Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryWidthIncFieldInfo
instance AttrInfo GeometryWidthIncFieldInfo where
type AttrBaseTypeConstraint GeometryWidthIncFieldInfo = (~) Geometry
type AttrAllowedOps GeometryWidthIncFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryWidthIncFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryWidthIncFieldInfo = (~)Int32
type AttrTransferType GeometryWidthIncFieldInfo = Int32
type AttrGetType GeometryWidthIncFieldInfo = Int32
type AttrLabel GeometryWidthIncFieldInfo = "width_inc"
type AttrOrigin GeometryWidthIncFieldInfo = Geometry
attrGet = getGeometryWidthInc
attrSet = setGeometryWidthInc
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_widthInc :: AttrLabelProxy "widthInc"
geometry_widthInc = AttrLabelProxy
#endif
getGeometryHeightInc :: MonadIO m => Geometry -> m Int32
getGeometryHeightInc :: Geometry -> m Int32
getGeometryHeightInc Geometry
s = IO Int32 -> m Int32
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
$ Geometry -> (Ptr Geometry -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Int32) -> IO Int32)
-> (Ptr Geometry -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setGeometryHeightInc :: MonadIO m => Geometry -> Int32 -> m ()
setGeometryHeightInc :: Geometry -> Int32 -> m ()
setGeometryHeightInc Geometry
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data GeometryHeightIncFieldInfo
instance AttrInfo GeometryHeightIncFieldInfo where
type AttrBaseTypeConstraint GeometryHeightIncFieldInfo = (~) Geometry
type AttrAllowedOps GeometryHeightIncFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryHeightIncFieldInfo = (~) Int32
type AttrTransferTypeConstraint GeometryHeightIncFieldInfo = (~)Int32
type AttrTransferType GeometryHeightIncFieldInfo = Int32
type AttrGetType GeometryHeightIncFieldInfo = Int32
type AttrLabel GeometryHeightIncFieldInfo = "height_inc"
type AttrOrigin GeometryHeightIncFieldInfo = Geometry
attrGet = getGeometryHeightInc
attrSet = setGeometryHeightInc
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_heightInc :: AttrLabelProxy "heightInc"
geometry_heightInc = AttrLabelProxy
#endif
getGeometryMinAspect :: MonadIO m => Geometry -> m Double
getGeometryMinAspect :: Geometry -> m Double
getGeometryMinAspect Geometry
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Double) -> IO Double)
-> (Ptr Geometry -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setGeometryMinAspect :: MonadIO m => Geometry -> Double -> m ()
setGeometryMinAspect :: Geometry -> Double -> m ()
setGeometryMinAspect Geometry
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data GeometryMinAspectFieldInfo
instance AttrInfo GeometryMinAspectFieldInfo where
type AttrBaseTypeConstraint GeometryMinAspectFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMinAspectFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMinAspectFieldInfo = (~) Double
type AttrTransferTypeConstraint GeometryMinAspectFieldInfo = (~)Double
type AttrTransferType GeometryMinAspectFieldInfo = Double
type AttrGetType GeometryMinAspectFieldInfo = Double
type AttrLabel GeometryMinAspectFieldInfo = "min_aspect"
type AttrOrigin GeometryMinAspectFieldInfo = Geometry
attrGet = getGeometryMinAspect
attrSet = setGeometryMinAspect
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_minAspect :: AttrLabelProxy "minAspect"
geometry_minAspect = AttrLabelProxy
#endif
getGeometryMaxAspect :: MonadIO m => Geometry -> m Double
getGeometryMaxAspect :: Geometry -> m Double
getGeometryMaxAspect Geometry
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Double) -> IO Double)
-> (Ptr Geometry -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setGeometryMaxAspect :: MonadIO m => Geometry -> Double -> m ()
setGeometryMaxAspect :: Geometry -> Double -> m ()
setGeometryMaxAspect Geometry
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data GeometryMaxAspectFieldInfo
instance AttrInfo GeometryMaxAspectFieldInfo where
type AttrBaseTypeConstraint GeometryMaxAspectFieldInfo = (~) Geometry
type AttrAllowedOps GeometryMaxAspectFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryMaxAspectFieldInfo = (~) Double
type AttrTransferTypeConstraint GeometryMaxAspectFieldInfo = (~)Double
type AttrTransferType GeometryMaxAspectFieldInfo = Double
type AttrGetType GeometryMaxAspectFieldInfo = Double
type AttrLabel GeometryMaxAspectFieldInfo = "max_aspect"
type AttrOrigin GeometryMaxAspectFieldInfo = Geometry
attrGet = getGeometryMaxAspect
attrSet = setGeometryMaxAspect
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_maxAspect :: AttrLabelProxy "maxAspect"
geometry_maxAspect = AttrLabelProxy
#endif
getGeometryWinGravity :: MonadIO m => Geometry -> m Gdk.Enums.Gravity
getGeometryWinGravity :: Geometry -> m Gravity
getGeometryWinGravity Geometry
s = IO Gravity -> m Gravity
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Gravity -> m Gravity) -> IO Gravity -> m Gravity
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO Gravity) -> IO Gravity
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO Gravity) -> IO Gravity)
-> (Ptr Geometry -> IO Gravity) -> IO Gravity
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) :: IO CUInt
let val' :: Gravity
val' = (Int -> Gravity
forall a. Enum a => Int -> a
toEnum (Int -> Gravity) -> (CUInt -> Int) -> CUInt -> Gravity
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
Gravity -> IO Gravity
forall (m :: * -> *) a. Monad m => a -> m a
return Gravity
val'
setGeometryWinGravity :: MonadIO m => Geometry -> Gdk.Enums.Gravity -> m ()
setGeometryWinGravity :: Geometry -> Gravity -> m ()
setGeometryWinGravity Geometry
s Gravity
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Geometry -> (Ptr Geometry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Geometry
s ((Ptr Geometry -> IO ()) -> IO ())
-> (Ptr Geometry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Geometry
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Gravity -> Int) -> Gravity -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Gravity -> Int
forall a. Enum a => a -> Int
fromEnum) Gravity
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Geometry
ptr Ptr Geometry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data GeometryWinGravityFieldInfo
instance AttrInfo GeometryWinGravityFieldInfo where
type AttrBaseTypeConstraint GeometryWinGravityFieldInfo = (~) Geometry
type AttrAllowedOps GeometryWinGravityFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint GeometryWinGravityFieldInfo = (~) Gdk.Enums.Gravity
type AttrTransferTypeConstraint GeometryWinGravityFieldInfo = (~)Gdk.Enums.Gravity
type AttrTransferType GeometryWinGravityFieldInfo = Gdk.Enums.Gravity
type AttrGetType GeometryWinGravityFieldInfo = Gdk.Enums.Gravity
type AttrLabel GeometryWinGravityFieldInfo = "win_gravity"
type AttrOrigin GeometryWinGravityFieldInfo = Geometry
attrGet = getGeometryWinGravity
attrSet = setGeometryWinGravity
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
geometry_winGravity :: AttrLabelProxy "winGravity"
geometry_winGravity = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Geometry
type instance O.AttributeList Geometry = GeometryAttributeList
type GeometryAttributeList = ('[ '("minWidth", GeometryMinWidthFieldInfo), '("minHeight", GeometryMinHeightFieldInfo), '("maxWidth", GeometryMaxWidthFieldInfo), '("maxHeight", GeometryMaxHeightFieldInfo), '("baseWidth", GeometryBaseWidthFieldInfo), '("baseHeight", GeometryBaseHeightFieldInfo), '("widthInc", GeometryWidthIncFieldInfo), '("heightInc", GeometryHeightIncFieldInfo), '("minAspect", GeometryMinAspectFieldInfo), '("maxAspect", GeometryMaxAspectFieldInfo), '("winGravity", GeometryWinGravityFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveGeometryMethod (t :: Symbol) (o :: *) :: * where
ResolveGeometryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveGeometryMethod t Geometry, O.MethodInfo info Geometry p) => OL.IsLabel t (Geometry -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif