{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gsk.Objects.InsetShadowNode
(
InsetShadowNode(..) ,
IsInsetShadowNode ,
toInsetShadowNode ,
#if defined(ENABLE_OVERLOADING)
ResolveInsetShadowNodeMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
InsetShadowNodeGetBlurRadiusMethodInfo ,
#endif
insetShadowNodeGetBlurRadius ,
#if defined(ENABLE_OVERLOADING)
InsetShadowNodeGetDxMethodInfo ,
#endif
insetShadowNodeGetDx ,
#if defined(ENABLE_OVERLOADING)
InsetShadowNodeGetDyMethodInfo ,
#endif
insetShadowNodeGetDy ,
#if defined(ENABLE_OVERLOADING)
InsetShadowNodeGetSpreadMethodInfo ,
#endif
insetShadowNodeGetSpread ,
insetShadowNodeNew ,
#if defined(ENABLE_OVERLOADING)
InsetShadowNodePeekColorMethodInfo ,
#endif
insetShadowNodePeekColor ,
#if defined(ENABLE_OVERLOADING)
InsetShadowNodePeekOutlineMethodInfo ,
#endif
insetShadowNodePeekOutline ,
) 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 qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import {-# SOURCE #-} qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
newtype InsetShadowNode = InsetShadowNode (SP.ManagedPtr InsetShadowNode)
deriving (InsetShadowNode -> InsetShadowNode -> Bool
(InsetShadowNode -> InsetShadowNode -> Bool)
-> (InsetShadowNode -> InsetShadowNode -> Bool)
-> Eq InsetShadowNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InsetShadowNode -> InsetShadowNode -> Bool
$c/= :: InsetShadowNode -> InsetShadowNode -> Bool
== :: InsetShadowNode -> InsetShadowNode -> Bool
$c== :: InsetShadowNode -> InsetShadowNode -> Bool
Eq)
instance SP.ManagedPtrNewtype InsetShadowNode where
toManagedPtr :: InsetShadowNode -> ManagedPtr InsetShadowNode
toManagedPtr (InsetShadowNode ManagedPtr InsetShadowNode
p) = ManagedPtr InsetShadowNode
p
foreign import ccall "gsk_inset_shadow_node_get_type"
c_gsk_inset_shadow_node_get_type :: IO B.Types.GType
instance B.Types.TypedObject InsetShadowNode where
glibType :: IO GType
glibType = IO GType
c_gsk_inset_shadow_node_get_type
class (SP.BoxedPtr o, SP.TypedObject o, O.IsDescendantOf InsetShadowNode o) => IsInsetShadowNode o
instance (SP.BoxedPtr o, SP.TypedObject o, O.IsDescendantOf InsetShadowNode o) => IsInsetShadowNode o
instance O.HasParentTypes InsetShadowNode
type instance O.ParentTypes InsetShadowNode = '[Gsk.RenderNode.RenderNode]
toInsetShadowNode :: (MonadIO m, IsInsetShadowNode o) => o -> m InsetShadowNode
toInsetShadowNode :: o -> m InsetShadowNode
toInsetShadowNode = IO InsetShadowNode -> m InsetShadowNode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InsetShadowNode -> m InsetShadowNode)
-> (o -> IO InsetShadowNode) -> o -> m InsetShadowNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr InsetShadowNode -> InsetShadowNode)
-> o -> IO InsetShadowNode
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr InsetShadowNode -> InsetShadowNode
InsetShadowNode
#if defined(ENABLE_OVERLOADING)
type family ResolveInsetShadowNodeMethod (t :: Symbol) (o :: *) :: * where
ResolveInsetShadowNodeMethod "draw" o = Gsk.RenderNode.RenderNodeDrawMethodInfo
ResolveInsetShadowNodeMethod "peekColor" o = InsetShadowNodePeekColorMethodInfo
ResolveInsetShadowNodeMethod "peekOutline" o = InsetShadowNodePeekOutlineMethodInfo
ResolveInsetShadowNodeMethod "ref" o = Gsk.RenderNode.RenderNodeRefMethodInfo
ResolveInsetShadowNodeMethod "serialize" o = Gsk.RenderNode.RenderNodeSerializeMethodInfo
ResolveInsetShadowNodeMethod "unref" o = Gsk.RenderNode.RenderNodeUnrefMethodInfo
ResolveInsetShadowNodeMethod "writeToFile" o = Gsk.RenderNode.RenderNodeWriteToFileMethodInfo
ResolveInsetShadowNodeMethod "getBlurRadius" o = InsetShadowNodeGetBlurRadiusMethodInfo
ResolveInsetShadowNodeMethod "getBounds" o = Gsk.RenderNode.RenderNodeGetBoundsMethodInfo
ResolveInsetShadowNodeMethod "getDx" o = InsetShadowNodeGetDxMethodInfo
ResolveInsetShadowNodeMethod "getDy" o = InsetShadowNodeGetDyMethodInfo
ResolveInsetShadowNodeMethod "getNodeType" o = Gsk.RenderNode.RenderNodeGetNodeTypeMethodInfo
ResolveInsetShadowNodeMethod "getSpread" o = InsetShadowNodeGetSpreadMethodInfo
ResolveInsetShadowNodeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveInsetShadowNodeMethod t InsetShadowNode, O.MethodInfo info InsetShadowNode p) => OL.IsLabel t (InsetShadowNode -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
instance BoxedPtr InsetShadowNode where
boxedPtrCopy :: InsetShadowNode -> IO InsetShadowNode
boxedPtrCopy = InsetShadowNode -> IO InsetShadowNode
forall (m :: * -> *) a. Monad m => a -> m a
return
boxedPtrFree :: InsetShadowNode -> IO ()
boxedPtrFree = \InsetShadowNode
_x -> () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "gsk_inset_shadow_node_new" gsk_inset_shadow_node_new ::
Ptr Gsk.RoundedRect.RoundedRect ->
Ptr Gdk.RGBA.RGBA ->
CFloat ->
CFloat ->
CFloat ->
CFloat ->
IO (Ptr InsetShadowNode)
insetShadowNodeNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gsk.RoundedRect.RoundedRect
-> Gdk.RGBA.RGBA
-> Float
-> Float
-> Float
-> Float
-> m InsetShadowNode
insetShadowNodeNew :: RoundedRect
-> RGBA -> Float -> Float -> Float -> Float -> m InsetShadowNode
insetShadowNodeNew RoundedRect
outline RGBA
color Float
dx Float
dy Float
spread Float
blurRadius = IO InsetShadowNode -> m InsetShadowNode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InsetShadowNode -> m InsetShadowNode)
-> IO InsetShadowNode -> m InsetShadowNode
forall a b. (a -> b) -> a -> b
$ do
Ptr RoundedRect
outline' <- RoundedRect -> IO (Ptr RoundedRect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RoundedRect
outline
Ptr RGBA
color' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
color
let dx' :: CFloat
dx' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
dx
let dy' :: CFloat
dy' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
dy
let spread' :: CFloat
spread' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
spread
let blurRadius' :: CFloat
blurRadius' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
blurRadius
Ptr InsetShadowNode
result <- Ptr RoundedRect
-> Ptr RGBA
-> CFloat
-> CFloat
-> CFloat
-> CFloat
-> IO (Ptr InsetShadowNode)
gsk_inset_shadow_node_new Ptr RoundedRect
outline' Ptr RGBA
color' CFloat
dx' CFloat
dy' CFloat
spread' CFloat
blurRadius'
Text -> Ptr InsetShadowNode -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"insetShadowNodeNew" Ptr InsetShadowNode
result
InsetShadowNode
result' <- ((ManagedPtr InsetShadowNode -> InsetShadowNode)
-> Ptr InsetShadowNode -> IO InsetShadowNode
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr InsetShadowNode -> InsetShadowNode
InsetShadowNode) Ptr InsetShadowNode
result
RoundedRect -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RoundedRect
outline
RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RGBA
color
InsetShadowNode -> IO InsetShadowNode
forall (m :: * -> *) a. Monad m => a -> m a
return InsetShadowNode
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gsk_inset_shadow_node_get_blur_radius" gsk_inset_shadow_node_get_blur_radius ::
Ptr InsetShadowNode ->
IO CFloat
insetShadowNodeGetBlurRadius ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Float
insetShadowNodeGetBlurRadius :: a -> m Float
insetShadowNodeGetBlurRadius a
node = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
CFloat
result <- Ptr InsetShadowNode -> IO CFloat
gsk_inset_shadow_node_get_blur_radius Ptr InsetShadowNode
node'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodeGetBlurRadiusMethodInfo
instance (signature ~ (m Float), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodeGetBlurRadiusMethodInfo a signature where
overloadedMethod = insetShadowNodeGetBlurRadius
#endif
foreign import ccall "gsk_inset_shadow_node_get_dx" gsk_inset_shadow_node_get_dx ::
Ptr InsetShadowNode ->
IO CFloat
insetShadowNodeGetDx ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Float
insetShadowNodeGetDx :: a -> m Float
insetShadowNodeGetDx a
node = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
CFloat
result <- Ptr InsetShadowNode -> IO CFloat
gsk_inset_shadow_node_get_dx Ptr InsetShadowNode
node'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodeGetDxMethodInfo
instance (signature ~ (m Float), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodeGetDxMethodInfo a signature where
overloadedMethod = insetShadowNodeGetDx
#endif
foreign import ccall "gsk_inset_shadow_node_get_dy" gsk_inset_shadow_node_get_dy ::
Ptr InsetShadowNode ->
IO CFloat
insetShadowNodeGetDy ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Float
insetShadowNodeGetDy :: a -> m Float
insetShadowNodeGetDy a
node = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
CFloat
result <- Ptr InsetShadowNode -> IO CFloat
gsk_inset_shadow_node_get_dy Ptr InsetShadowNode
node'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodeGetDyMethodInfo
instance (signature ~ (m Float), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodeGetDyMethodInfo a signature where
overloadedMethod = insetShadowNodeGetDy
#endif
foreign import ccall "gsk_inset_shadow_node_get_spread" gsk_inset_shadow_node_get_spread ::
Ptr InsetShadowNode ->
IO CFloat
insetShadowNodeGetSpread ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Float
insetShadowNodeGetSpread :: a -> m Float
insetShadowNodeGetSpread a
node = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
CFloat
result <- Ptr InsetShadowNode -> IO CFloat
gsk_inset_shadow_node_get_spread Ptr InsetShadowNode
node'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodeGetSpreadMethodInfo
instance (signature ~ (m Float), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodeGetSpreadMethodInfo a signature where
overloadedMethod = insetShadowNodeGetSpread
#endif
foreign import ccall "gsk_inset_shadow_node_peek_color" gsk_inset_shadow_node_peek_color ::
Ptr InsetShadowNode ->
IO (Ptr Gdk.RGBA.RGBA)
insetShadowNodePeekColor ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Gdk.RGBA.RGBA
insetShadowNodePeekColor :: a -> m RGBA
insetShadowNodePeekColor a
node = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
Ptr RGBA
result <- Ptr InsetShadowNode -> IO (Ptr RGBA)
gsk_inset_shadow_node_peek_color Ptr InsetShadowNode
node'
Text -> Ptr RGBA -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"insetShadowNodePeekColor" Ptr RGBA
result
RGBA
result' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodePeekColorMethodInfo
instance (signature ~ (m Gdk.RGBA.RGBA), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodePeekColorMethodInfo a signature where
overloadedMethod = insetShadowNodePeekColor
#endif
foreign import ccall "gsk_inset_shadow_node_peek_outline" gsk_inset_shadow_node_peek_outline ::
Ptr InsetShadowNode ->
IO (Ptr Gsk.RoundedRect.RoundedRect)
insetShadowNodePeekOutline ::
(B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
a
-> m Gsk.RoundedRect.RoundedRect
insetShadowNodePeekOutline :: a -> m RoundedRect
insetShadowNodePeekOutline a
node = IO RoundedRect -> m RoundedRect
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
Ptr InsetShadowNode
node' <- a -> IO (Ptr InsetShadowNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
node
Ptr RoundedRect
result <- Ptr InsetShadowNode -> IO (Ptr RoundedRect)
gsk_inset_shadow_node_peek_outline Ptr InsetShadowNode
node'
Text -> Ptr RoundedRect -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"insetShadowNodePeekOutline" Ptr RoundedRect
result
RoundedRect
result' <- ((ManagedPtr RoundedRect -> RoundedRect)
-> Ptr RoundedRect -> IO RoundedRect
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr RoundedRect -> RoundedRect
Gsk.RoundedRect.RoundedRect) Ptr RoundedRect
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
node
RoundedRect -> IO RoundedRect
forall (m :: * -> *) a. Monad m => a -> m a
return RoundedRect
result'
#if defined(ENABLE_OVERLOADING)
data InsetShadowNodePeekOutlineMethodInfo
instance (signature ~ (m Gsk.RoundedRect.RoundedRect), MonadIO m, IsInsetShadowNode a) => O.MethodInfo InsetShadowNodePeekOutlineMethodInfo a signature where
overloadedMethod = insetShadowNodePeekOutline
#endif