{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gsk.Objects.InsetShadowNode
    ( 

-- * Exported types
    InsetShadowNode(..)                     ,
    IsInsetShadowNode                       ,
    toInsetShadowNode                       ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveInsetShadowNodeMethod            ,
#endif


-- ** getBlurRadius #method:getBlurRadius#

#if defined(ENABLE_OVERLOADING)
    InsetShadowNodeGetBlurRadiusMethodInfo  ,
#endif
    insetShadowNodeGetBlurRadius            ,


-- ** getDx #method:getDx#

#if defined(ENABLE_OVERLOADING)
    InsetShadowNodeGetDxMethodInfo          ,
#endif
    insetShadowNodeGetDx                    ,


-- ** getDy #method:getDy#

#if defined(ENABLE_OVERLOADING)
    InsetShadowNodeGetDyMethodInfo          ,
#endif
    insetShadowNodeGetDy                    ,


-- ** getSpread #method:getSpread#

#if defined(ENABLE_OVERLOADING)
    InsetShadowNodeGetSpreadMethodInfo      ,
#endif
    insetShadowNodeGetSpread                ,


-- ** new #method:new#

    insetShadowNodeNew                      ,


-- ** peekColor #method:peekColor#

#if defined(ENABLE_OVERLOADING)
    InsetShadowNodePeekColorMethodInfo      ,
#endif
    insetShadowNodePeekColor                ,


-- ** peekOutline #method:peekOutline#

#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

-- | Memory-managed wrapper type.
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

-- | Type class for types which can be safely cast to `InsetShadowNode`, for instance with `toInsetShadowNode`.
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]

-- | Cast to `InsetShadowNode`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
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

-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
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 ()


-- method InsetShadowNode::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "outline"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "RoundedRect" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "outline of the region containing the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "color of the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dx"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "horizontal offset of shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dy"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "vertical offset of shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "spread"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "how far the shadow spreads towards the inside"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "blur_radius"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "how much blur to apply to the shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" })
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_new" gsk_inset_shadow_node_new :: 
    Ptr Gsk.RoundedRect.RoundedRect ->      -- outline : TInterface (Name {namespace = "Gsk", name = "RoundedRect"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    CFloat ->                               -- dx : TBasicType TFloat
    CFloat ->                               -- dy : TBasicType TFloat
    CFloat ->                               -- spread : TBasicType TFloat
    CFloat ->                               -- blur_radius : TBasicType TFloat
    IO (Ptr InsetShadowNode)

-- | Creates a t'GI.Gsk.Objects.RenderNode.RenderNode' that will render an inset shadow
-- into the box given by /@outline@/.
insetShadowNodeNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gsk.RoundedRect.RoundedRect
    -- ^ /@outline@/: outline of the region containing the shadow
    -> Gdk.RGBA.RGBA
    -- ^ /@color@/: color of the shadow
    -> Float
    -- ^ /@dx@/: horizontal offset of shadow
    -> Float
    -- ^ /@dy@/: vertical offset of shadow
    -> Float
    -- ^ /@spread@/: how far the shadow spreads towards the inside
    -> Float
    -- ^ /@blurRadius@/: how much blur to apply to the shadow
    -> m InsetShadowNode
    -- ^ __Returns:__ A new t'GI.Gsk.Objects.RenderNode.RenderNode'
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

-- method InsetShadowNode::get_blur_radius
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_get_blur_radius" gsk_inset_shadow_node_get_blur_radius :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO CFloat

-- | Retrieves the blur radius to apply to the shadow.
insetShadowNodeGetBlurRadius ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Float
    -- ^ __Returns:__ the blur radius, in pixels
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

-- method InsetShadowNode::get_dx
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_get_dx" gsk_inset_shadow_node_get_dx :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO CFloat

-- | Retrieves the horizontal offset of the inset shadow.
insetShadowNodeGetDx ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Float
    -- ^ __Returns:__ an offset, in pixels
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

-- method InsetShadowNode::get_dy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_get_dy" gsk_inset_shadow_node_get_dy :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO CFloat

-- | Retrieves the vertical offset of the inset shadow.
insetShadowNodeGetDy ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Float
    -- ^ __Returns:__ an offset, in pixels
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

-- method InsetShadowNode::get_spread
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TFloat)
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_get_spread" gsk_inset_shadow_node_get_spread :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO CFloat

-- | Retrieves how much the shadow spreads inwards.
insetShadowNodeGetSpread ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Float
    -- ^ __Returns:__ the size of the shadow, in pixels
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

-- method InsetShadowNode::peek_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "RGBA" })
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_peek_color" gsk_inset_shadow_node_peek_color :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO (Ptr Gdk.RGBA.RGBA)

-- | Retrieves the color of the inset shadow.
insetShadowNodePeekColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Gdk.RGBA.RGBA
    -- ^ __Returns:__ the color of the shadow
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

-- method InsetShadowNode::peek_outline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "InsetShadowNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GskRenderNode for an inset shadow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gsk" , name = "RoundedRect" })
-- throws : False
-- Skip return : False

foreign import ccall "gsk_inset_shadow_node_peek_outline" gsk_inset_shadow_node_peek_outline :: 
    Ptr InsetShadowNode ->                  -- node : TInterface (Name {namespace = "Gsk", name = "InsetShadowNode"})
    IO (Ptr Gsk.RoundedRect.RoundedRect)

-- | Retrieves the outline rectangle of the inset shadow.
insetShadowNodePeekOutline ::
    (B.CallStack.HasCallStack, MonadIO m, IsInsetShadowNode a) =>
    a
    -- ^ /@node@/: a t'GI.Gsk.Objects.RenderNode.RenderNode' for an inset shadow
    -> m Gsk.RoundedRect.RoundedRect
    -- ^ __Returns:__ a rounded rectangle
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