{-# LANGUAGE TypeApplications #-}
#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.Gsk.Structs.RoundedRect
(
RoundedRect(..) ,
newZeroRoundedRect ,
#if defined(ENABLE_OVERLOADING)
ResolveRoundedRectMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RoundedRectContainsPointMethodInfo ,
#endif
roundedRectContainsPoint ,
#if defined(ENABLE_OVERLOADING)
RoundedRectContainsRectMethodInfo ,
#endif
roundedRectContainsRect ,
#if defined(ENABLE_OVERLOADING)
RoundedRectInitMethodInfo ,
#endif
roundedRectInit ,
#if defined(ENABLE_OVERLOADING)
RoundedRectInitCopyMethodInfo ,
#endif
roundedRectInitCopy ,
#if defined(ENABLE_OVERLOADING)
RoundedRectInitFromRectMethodInfo ,
#endif
roundedRectInitFromRect ,
#if defined(ENABLE_OVERLOADING)
RoundedRectIntersectsRectMethodInfo ,
#endif
roundedRectIntersectsRect ,
#if defined(ENABLE_OVERLOADING)
RoundedRectIsRectilinearMethodInfo ,
#endif
roundedRectIsRectilinear ,
#if defined(ENABLE_OVERLOADING)
RoundedRectNormalizeMethodInfo ,
#endif
roundedRectNormalize ,
#if defined(ENABLE_OVERLOADING)
RoundedRectOffsetMethodInfo ,
#endif
roundedRectOffset ,
#if defined(ENABLE_OVERLOADING)
RoundedRectShrinkMethodInfo ,
#endif
roundedRectShrink ,
getRoundedRectBounds ,
#if defined(ENABLE_OVERLOADING)
roundedRect_bounds ,
#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 System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
#else
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
#endif
newtype RoundedRect = RoundedRect (SP.ManagedPtr RoundedRect)
deriving (RoundedRect -> RoundedRect -> Bool
(RoundedRect -> RoundedRect -> Bool)
-> (RoundedRect -> RoundedRect -> Bool) -> Eq RoundedRect
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoundedRect -> RoundedRect -> Bool
== :: RoundedRect -> RoundedRect -> Bool
$c/= :: RoundedRect -> RoundedRect -> Bool
/= :: RoundedRect -> RoundedRect -> Bool
Eq)
instance SP.ManagedPtrNewtype RoundedRect where
toManagedPtr :: RoundedRect -> ManagedPtr RoundedRect
toManagedPtr (RoundedRect ManagedPtr RoundedRect
p) = ManagedPtr RoundedRect
p
instance BoxedPtr RoundedRect where
boxedPtrCopy :: RoundedRect -> IO RoundedRect
boxedPtrCopy = \RoundedRect
p -> RoundedRect
-> (Ptr RoundedRect -> IO RoundedRect) -> IO RoundedRect
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RoundedRect
p (Int -> Ptr RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
48 (Ptr RoundedRect -> IO (Ptr RoundedRect))
-> (Ptr RoundedRect -> IO RoundedRect)
-> Ptr RoundedRect
-> IO RoundedRect
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr RoundedRect -> RoundedRect)
-> Ptr RoundedRect -> IO RoundedRect
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr RoundedRect -> RoundedRect
RoundedRect)
boxedPtrFree :: RoundedRect -> IO ()
boxedPtrFree = \RoundedRect
x -> RoundedRect -> (Ptr RoundedRect -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr RoundedRect
x Ptr RoundedRect -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr RoundedRect where
boxedPtrCalloc :: IO (Ptr RoundedRect)
boxedPtrCalloc = Int -> IO (Ptr RoundedRect)
forall a. Int -> IO (Ptr a)
callocBytes Int
48
newZeroRoundedRect :: MonadIO m => m RoundedRect
newZeroRoundedRect :: forall (m :: * -> *). MonadIO m => m RoundedRect
newZeroRoundedRect = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ IO (Ptr RoundedRect)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr RoundedRect)
-> (Ptr RoundedRect -> IO RoundedRect) -> IO RoundedRect
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr RoundedRect -> RoundedRect)
-> Ptr RoundedRect -> IO RoundedRect
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RoundedRect -> RoundedRect
RoundedRect
instance tag ~ 'AttrSet => Constructible RoundedRect tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr RoundedRect -> RoundedRect)
-> [AttrOp RoundedRect tag] -> m RoundedRect
new ManagedPtr RoundedRect -> RoundedRect
_ [AttrOp RoundedRect tag]
attrs = do
o <- m RoundedRect
forall (m :: * -> *). MonadIO m => m RoundedRect
newZeroRoundedRect
GI.Attributes.set o attrs
return o
getRoundedRectBounds :: MonadIO m => RoundedRect -> m Graphene.Rect.Rect
getRoundedRectBounds :: forall (m :: * -> *). MonadIO m => RoundedRect -> m Rect
getRoundedRectBounds RoundedRect
s = IO Rect -> m Rect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rect -> m Rect) -> IO Rect -> m Rect
forall a b. (a -> b) -> a -> b
$ RoundedRect -> (Ptr RoundedRect -> IO Rect) -> IO Rect
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RoundedRect
s ((Ptr RoundedRect -> IO Rect) -> IO Rect)
-> (Ptr RoundedRect -> IO Rect) -> IO Rect
forall a b. (a -> b) -> a -> b
$ \Ptr RoundedRect
ptr -> do
let val :: Ptr Rect
val = Ptr RoundedRect
ptr Ptr RoundedRect -> Int -> Ptr Rect
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Graphene.Rect.Rect)
val' <- ((ManagedPtr Rect -> Rect) -> Ptr Rect -> IO Rect
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Rect -> Rect
Graphene.Rect.Rect) Ptr Rect
val
return val'
#if defined(ENABLE_OVERLOADING)
data RoundedRectBoundsFieldInfo
instance AttrInfo RoundedRectBoundsFieldInfo where
type AttrBaseTypeConstraint RoundedRectBoundsFieldInfo = (~) RoundedRect
type AttrAllowedOps RoundedRectBoundsFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint RoundedRectBoundsFieldInfo = (~) (Ptr Graphene.Rect.Rect)
type AttrTransferTypeConstraint RoundedRectBoundsFieldInfo = (~)(Ptr Graphene.Rect.Rect)
type AttrTransferType RoundedRectBoundsFieldInfo = (Ptr Graphene.Rect.Rect)
type AttrGetType RoundedRectBoundsFieldInfo = Graphene.Rect.Rect
type AttrLabel RoundedRectBoundsFieldInfo = "bounds"
type AttrOrigin RoundedRectBoundsFieldInfo = RoundedRect
attrGet = getRoundedRectBounds
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.bounds"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#g:attr:bounds"
})
roundedRect_bounds :: AttrLabelProxy "bounds"
roundedRect_bounds = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RoundedRect
type instance O.AttributeList RoundedRect = RoundedRectAttributeList
type RoundedRectAttributeList = ('[ '("bounds", RoundedRectBoundsFieldInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gsk_rounded_rect_contains_point" gsk_rounded_rect_contains_point ::
Ptr RoundedRect ->
Ptr Graphene.Point.Point ->
IO CInt
roundedRectContainsPoint ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Graphene.Point.Point
-> m Bool
roundedRectContainsPoint :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Point -> m Bool
roundedRectContainsPoint RoundedRect
self Point
point = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
point' <- unsafeManagedPtrGetPtr point
result <- gsk_rounded_rect_contains_point self' point'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
touchManagedPtr point
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectContainsPointMethodInfo
instance (signature ~ (Graphene.Point.Point -> m Bool), MonadIO m) => O.OverloadedMethod RoundedRectContainsPointMethodInfo RoundedRect signature where
overloadedMethod = roundedRectContainsPoint
instance O.OverloadedMethodInfo RoundedRectContainsPointMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectContainsPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectContainsPoint"
})
#endif
foreign import ccall "gsk_rounded_rect_contains_rect" gsk_rounded_rect_contains_rect ::
Ptr RoundedRect ->
Ptr Graphene.Rect.Rect ->
IO CInt
roundedRectContainsRect ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Graphene.Rect.Rect
-> m Bool
roundedRectContainsRect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Rect -> m Bool
roundedRectContainsRect RoundedRect
self Rect
rect = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
rect' <- unsafeManagedPtrGetPtr rect
result <- gsk_rounded_rect_contains_rect self' rect'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
touchManagedPtr rect
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectContainsRectMethodInfo
instance (signature ~ (Graphene.Rect.Rect -> m Bool), MonadIO m) => O.OverloadedMethod RoundedRectContainsRectMethodInfo RoundedRect signature where
overloadedMethod = roundedRectContainsRect
instance O.OverloadedMethodInfo RoundedRectContainsRectMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectContainsRect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectContainsRect"
})
#endif
foreign import ccall "gsk_rounded_rect_init" gsk_rounded_rect_init ::
Ptr RoundedRect ->
Ptr Graphene.Rect.Rect ->
Ptr Graphene.Size.Size ->
Ptr Graphene.Size.Size ->
Ptr Graphene.Size.Size ->
Ptr Graphene.Size.Size ->
IO (Ptr RoundedRect)
roundedRectInit ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Graphene.Rect.Rect
-> Graphene.Size.Size
-> Graphene.Size.Size
-> Graphene.Size.Size
-> Graphene.Size.Size
-> m RoundedRect
roundedRectInit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect
-> Rect -> Size -> Size -> Size -> Size -> m RoundedRect
roundedRectInit RoundedRect
self Rect
bounds Size
topLeft Size
topRight Size
bottomRight Size
bottomLeft = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
bounds' <- unsafeManagedPtrGetPtr bounds
topLeft' <- unsafeManagedPtrGetPtr topLeft
topRight' <- unsafeManagedPtrGetPtr topRight
bottomRight' <- unsafeManagedPtrGetPtr bottomRight
bottomLeft' <- unsafeManagedPtrGetPtr bottomLeft
result <- gsk_rounded_rect_init self' bounds' topLeft' topRight' bottomRight' bottomLeft'
checkUnexpectedReturnNULL "roundedRectInit" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
touchManagedPtr bounds
touchManagedPtr topLeft
touchManagedPtr topRight
touchManagedPtr bottomRight
touchManagedPtr bottomLeft
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectInitMethodInfo
instance (signature ~ (Graphene.Rect.Rect -> Graphene.Size.Size -> Graphene.Size.Size -> Graphene.Size.Size -> Graphene.Size.Size -> m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectInitMethodInfo RoundedRect signature where
overloadedMethod = roundedRectInit
instance O.OverloadedMethodInfo RoundedRectInitMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectInit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectInit"
})
#endif
foreign import ccall "gsk_rounded_rect_init_copy" gsk_rounded_rect_init_copy ::
Ptr RoundedRect ->
Ptr RoundedRect ->
IO (Ptr RoundedRect)
roundedRectInitCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> RoundedRect
-> m RoundedRect
roundedRectInitCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> RoundedRect -> m RoundedRect
roundedRectInitCopy RoundedRect
self RoundedRect
src = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
src' <- unsafeManagedPtrGetPtr src
result <- gsk_rounded_rect_init_copy self' src'
checkUnexpectedReturnNULL "roundedRectInitCopy" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
touchManagedPtr src
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectInitCopyMethodInfo
instance (signature ~ (RoundedRect -> m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectInitCopyMethodInfo RoundedRect signature where
overloadedMethod = roundedRectInitCopy
instance O.OverloadedMethodInfo RoundedRectInitCopyMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectInitCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectInitCopy"
})
#endif
foreign import ccall "gsk_rounded_rect_init_from_rect" gsk_rounded_rect_init_from_rect ::
Ptr RoundedRect ->
Ptr Graphene.Rect.Rect ->
CFloat ->
IO (Ptr RoundedRect)
roundedRectInitFromRect ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Graphene.Rect.Rect
-> Float
-> m RoundedRect
roundedRectInitFromRect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Rect -> Float -> m RoundedRect
roundedRectInitFromRect RoundedRect
self Rect
bounds Float
radius = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
bounds' <- unsafeManagedPtrGetPtr bounds
let radius' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
radius
result <- gsk_rounded_rect_init_from_rect self' bounds' radius'
checkUnexpectedReturnNULL "roundedRectInitFromRect" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
touchManagedPtr bounds
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectInitFromRectMethodInfo
instance (signature ~ (Graphene.Rect.Rect -> Float -> m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectInitFromRectMethodInfo RoundedRect signature where
overloadedMethod = roundedRectInitFromRect
instance O.OverloadedMethodInfo RoundedRectInitFromRectMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectInitFromRect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectInitFromRect"
})
#endif
foreign import ccall "gsk_rounded_rect_intersects_rect" gsk_rounded_rect_intersects_rect ::
Ptr RoundedRect ->
Ptr Graphene.Rect.Rect ->
IO CInt
roundedRectIntersectsRect ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Graphene.Rect.Rect
-> m Bool
roundedRectIntersectsRect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Rect -> m Bool
roundedRectIntersectsRect RoundedRect
self Rect
rect = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
rect' <- unsafeManagedPtrGetPtr rect
result <- gsk_rounded_rect_intersects_rect self' rect'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
touchManagedPtr rect
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectIntersectsRectMethodInfo
instance (signature ~ (Graphene.Rect.Rect -> m Bool), MonadIO m) => O.OverloadedMethod RoundedRectIntersectsRectMethodInfo RoundedRect signature where
overloadedMethod = roundedRectIntersectsRect
instance O.OverloadedMethodInfo RoundedRectIntersectsRectMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectIntersectsRect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectIntersectsRect"
})
#endif
foreign import ccall "gsk_rounded_rect_is_rectilinear" gsk_rounded_rect_is_rectilinear ::
Ptr RoundedRect ->
IO CInt
roundedRectIsRectilinear ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> m Bool
roundedRectIsRectilinear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> m Bool
roundedRectIsRectilinear RoundedRect
self = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
result <- gsk_rounded_rect_is_rectilinear self'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectIsRectilinearMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod RoundedRectIsRectilinearMethodInfo RoundedRect signature where
overloadedMethod = roundedRectIsRectilinear
instance O.OverloadedMethodInfo RoundedRectIsRectilinearMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectIsRectilinear",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectIsRectilinear"
})
#endif
foreign import ccall "gsk_rounded_rect_normalize" gsk_rounded_rect_normalize ::
Ptr RoundedRect ->
IO (Ptr RoundedRect)
roundedRectNormalize ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> m RoundedRect
roundedRectNormalize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> m RoundedRect
roundedRectNormalize RoundedRect
self = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
result <- gsk_rounded_rect_normalize self'
checkUnexpectedReturnNULL "roundedRectNormalize" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectNormalizeMethodInfo
instance (signature ~ (m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectNormalizeMethodInfo RoundedRect signature where
overloadedMethod = roundedRectNormalize
instance O.OverloadedMethodInfo RoundedRectNormalizeMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectNormalize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectNormalize"
})
#endif
foreign import ccall "gsk_rounded_rect_offset" gsk_rounded_rect_offset ::
Ptr RoundedRect ->
CFloat ->
CFloat ->
IO (Ptr RoundedRect)
roundedRectOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Float
-> Float
-> m RoundedRect
roundedRectOffset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Float -> Float -> m RoundedRect
roundedRectOffset RoundedRect
self Float
dx Float
dy = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
let dx' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
dx
let dy' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
dy
result <- gsk_rounded_rect_offset self' dx' dy'
checkUnexpectedReturnNULL "roundedRectOffset" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectOffsetMethodInfo
instance (signature ~ (Float -> Float -> m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectOffsetMethodInfo RoundedRect signature where
overloadedMethod = roundedRectOffset
instance O.OverloadedMethodInfo RoundedRectOffsetMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectOffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectOffset"
})
#endif
foreign import ccall "gsk_rounded_rect_shrink" gsk_rounded_rect_shrink ::
Ptr RoundedRect ->
CFloat ->
CFloat ->
CFloat ->
CFloat ->
IO (Ptr RoundedRect)
roundedRectShrink ::
(B.CallStack.HasCallStack, MonadIO m) =>
RoundedRect
-> Float
-> Float
-> Float
-> Float
-> m RoundedRect
roundedRectShrink :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RoundedRect -> Float -> Float -> Float -> Float -> m RoundedRect
roundedRectShrink RoundedRect
self Float
top Float
right Float
bottom Float
left = IO RoundedRect -> m RoundedRect
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RoundedRect -> m RoundedRect)
-> IO RoundedRect -> m RoundedRect
forall a b. (a -> b) -> a -> b
$ do
self' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
self
let top' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
top
let right' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
right
let bottom' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
bottom
let left' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
left
result <- gsk_rounded_rect_shrink self' top' right' bottom' left'
checkUnexpectedReturnNULL "roundedRectShrink" result
result' <- (newPtr RoundedRect) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data RoundedRectShrinkMethodInfo
instance (signature ~ (Float -> Float -> Float -> Float -> m RoundedRect), MonadIO m) => O.OverloadedMethod RoundedRectShrinkMethodInfo RoundedRect signature where
overloadedMethod = roundedRectShrink
instance O.OverloadedMethodInfo RoundedRectShrinkMethodInfo RoundedRect where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gsk.Structs.RoundedRect.roundedRectShrink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gsk-4.0.9/docs/GI-Gsk-Structs-RoundedRect.html#v:roundedRectShrink"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveRoundedRectMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveRoundedRectMethod "containsPoint" o = RoundedRectContainsPointMethodInfo
ResolveRoundedRectMethod "containsRect" o = RoundedRectContainsRectMethodInfo
ResolveRoundedRectMethod "init" o = RoundedRectInitMethodInfo
ResolveRoundedRectMethod "initCopy" o = RoundedRectInitCopyMethodInfo
ResolveRoundedRectMethod "initFromRect" o = RoundedRectInitFromRectMethodInfo
ResolveRoundedRectMethod "intersectsRect" o = RoundedRectIntersectsRectMethodInfo
ResolveRoundedRectMethod "isRectilinear" o = RoundedRectIsRectilinearMethodInfo
ResolveRoundedRectMethod "normalize" o = RoundedRectNormalizeMethodInfo
ResolveRoundedRectMethod "offset" o = RoundedRectOffsetMethodInfo
ResolveRoundedRectMethod "shrink" o = RoundedRectShrinkMethodInfo
ResolveRoundedRectMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRoundedRectMethod t RoundedRect, O.OverloadedMethod info RoundedRect p) => OL.IsLabel t (RoundedRect -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveRoundedRectMethod t RoundedRect, O.OverloadedMethod info RoundedRect p, R.HasField t RoundedRect p) => R.HasField t RoundedRect p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveRoundedRectMethod t RoundedRect, O.OverloadedMethodInfo info RoundedRect) => OL.IsLabel t (O.MethodProxy info RoundedRect) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif