{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Represents a single node of a t'GI.Clutter.Objects.Path.Path'.
-- 
-- Some of the coordinates in /@points@/ may be unused for some node
-- types. 'GI.Clutter.Enums.PathNodeTypeMoveTo' and 'GI.Clutter.Enums.PathNodeTypeLineTo' use only one
-- pair of coordinates, 'GI.Clutter.Enums.PathNodeTypeCurveTo' uses all three and
-- 'GI.Clutter.Enums.PathNodeTypeClose' uses none.
-- 
-- /Since: 1.0/

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

module GI.Clutter.Structs.PathNode
    ( 

-- * Exported types
    PathNode(..)                            ,
    newZeroPathNode                         ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [copy]("GI.Clutter.Structs.PathNode#g:method:copy"), [equal]("GI.Clutter.Structs.PathNode#g:method:equal"), [free]("GI.Clutter.Structs.PathNode#g:method:free").
-- 
-- ==== Getters
-- /None/.
-- 
-- ==== Setters
-- /None/.

#if defined(ENABLE_OVERLOADING)
    ResolvePathNodeMethod                   ,
#endif

-- ** copy #method:copy#

#if defined(ENABLE_OVERLOADING)
    PathNodeCopyMethodInfo                  ,
#endif
    pathNodeCopy                            ,


-- ** equal #method:equal#

#if defined(ENABLE_OVERLOADING)
    PathNodeEqualMethodInfo                 ,
#endif
    pathNodeEqual                           ,


-- ** free #method:free#

#if defined(ENABLE_OVERLOADING)
    PathNodeFreeMethodInfo                  ,
#endif
    pathNodeFree                            ,




 -- * Properties


-- ** type #attr:type#
-- | the node\'s type

    getPathNodeType                         ,
#if defined(ENABLE_OVERLOADING)
    pathNode_type                           ,
#endif
    setPathNodeType                         ,




    ) 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.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.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 {-# SOURCE #-} qualified GI.Clutter.Enums as Clutter.Enums

-- | Memory-managed wrapper type.
newtype PathNode = PathNode (SP.ManagedPtr PathNode)
    deriving (PathNode -> PathNode -> Bool
(PathNode -> PathNode -> Bool)
-> (PathNode -> PathNode -> Bool) -> Eq PathNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PathNode -> PathNode -> Bool
$c/= :: PathNode -> PathNode -> Bool
== :: PathNode -> PathNode -> Bool
$c== :: PathNode -> PathNode -> Bool
Eq)

instance SP.ManagedPtrNewtype PathNode where
    toManagedPtr :: PathNode -> ManagedPtr PathNode
toManagedPtr (PathNode ManagedPtr PathNode
p) = ManagedPtr PathNode
p

foreign import ccall "clutter_path_node_get_type" c_clutter_path_node_get_type :: 
    IO GType

type instance O.ParentTypes PathNode = '[]
instance O.HasParentTypes PathNode

instance B.Types.TypedObject PathNode where
    glibType :: IO GType
glibType = IO GType
c_clutter_path_node_get_type

instance B.Types.GBoxed PathNode

-- | Convert 'PathNode' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe PathNode) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_path_node_get_type
    gvalueSet_ :: Ptr GValue -> Maybe PathNode -> IO ()
gvalueSet_ Ptr GValue
gv Maybe PathNode
P.Nothing = Ptr GValue -> Ptr PathNode -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr PathNode
forall a. Ptr a
FP.nullPtr :: FP.Ptr PathNode)
    gvalueSet_ Ptr GValue
gv (P.Just PathNode
obj) = PathNode -> (Ptr PathNode -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PathNode
obj (Ptr GValue -> Ptr PathNode -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe PathNode)
gvalueGet_ Ptr GValue
gv = do
        Ptr PathNode
ptr <- Ptr GValue -> IO (Ptr PathNode)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr PathNode)
        if Ptr PathNode
ptr Ptr PathNode -> Ptr PathNode -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr PathNode
forall a. Ptr a
FP.nullPtr
        then PathNode -> Maybe PathNode
forall a. a -> Maybe a
P.Just (PathNode -> Maybe PathNode) -> IO PathNode -> IO (Maybe PathNode)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr PathNode -> PathNode) -> Ptr PathNode -> IO PathNode
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr PathNode -> PathNode
PathNode Ptr PathNode
ptr
        else Maybe PathNode -> IO (Maybe PathNode)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PathNode
forall a. Maybe a
P.Nothing
        
    

-- | Construct a `PathNode` struct initialized to zero.
newZeroPathNode :: MonadIO m => m PathNode
newZeroPathNode :: forall (m :: * -> *). MonadIO m => m PathNode
newZeroPathNode = IO PathNode -> m PathNode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PathNode -> m PathNode) -> IO PathNode -> m PathNode
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr PathNode)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
28 IO (Ptr PathNode) -> (Ptr PathNode -> IO PathNode) -> IO PathNode
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr PathNode -> PathNode) -> Ptr PathNode -> IO PathNode
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr PathNode -> PathNode
PathNode

instance tag ~ 'AttrSet => Constructible PathNode tag where
    new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr PathNode -> PathNode)
-> [AttrOp PathNode tag] -> m PathNode
new ManagedPtr PathNode -> PathNode
_ [AttrOp PathNode tag]
attrs = do
        PathNode
o <- m PathNode
forall (m :: * -> *). MonadIO m => m PathNode
newZeroPathNode
        PathNode -> [AttrOp PathNode 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set PathNode
o [AttrOp PathNode tag]
[AttrOp PathNode 'AttrSet]
attrs
        PathNode -> m PathNode
forall (m :: * -> *) a. Monad m => a -> m a
return PathNode
o


-- | Get the value of the “@type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pathNode #type
-- @
getPathNodeType :: MonadIO m => PathNode -> m Clutter.Enums.PathNodeType
getPathNodeType :: forall (m :: * -> *). MonadIO m => PathNode -> m PathNodeType
getPathNodeType PathNode
s = IO PathNodeType -> m PathNodeType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PathNodeType -> m PathNodeType)
-> IO PathNodeType -> m PathNodeType
forall a b. (a -> b) -> a -> b
$ PathNode -> (Ptr PathNode -> IO PathNodeType) -> IO PathNodeType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PathNode
s ((Ptr PathNode -> IO PathNodeType) -> IO PathNodeType)
-> (Ptr PathNode -> IO PathNodeType) -> IO PathNodeType
forall a b. (a -> b) -> a -> b
$ \Ptr PathNode
ptr -> do
    CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr PathNode
ptr Ptr PathNode -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CUInt
    let val' :: PathNodeType
val' = (Int -> PathNodeType
forall a. Enum a => Int -> a
toEnum (Int -> PathNodeType) -> (CUInt -> Int) -> CUInt -> PathNodeType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
    PathNodeType -> IO PathNodeType
forall (m :: * -> *) a. Monad m => a -> m a
return PathNodeType
val'

-- | Set the value of the “@type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' pathNode [ #type 'Data.GI.Base.Attributes.:=' value ]
-- @
setPathNodeType :: MonadIO m => PathNode -> Clutter.Enums.PathNodeType -> m ()
setPathNodeType :: forall (m :: * -> *). MonadIO m => PathNode -> PathNodeType -> m ()
setPathNodeType PathNode
s PathNodeType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ PathNode -> (Ptr PathNode -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr PathNode
s ((Ptr PathNode -> IO ()) -> IO ())
-> (Ptr PathNode -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PathNode
ptr -> do
    let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PathNodeType -> Int) -> PathNodeType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PathNodeType -> Int
forall a. Enum a => a -> Int
fromEnum) PathNodeType
val
    Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PathNode
ptr Ptr PathNode -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CUInt
val' :: CUInt)

#if defined(ENABLE_OVERLOADING)
data PathNodeTypeFieldInfo
instance AttrInfo PathNodeTypeFieldInfo where
    type AttrBaseTypeConstraint PathNodeTypeFieldInfo = (~) PathNode
    type AttrAllowedOps PathNodeTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint PathNodeTypeFieldInfo = (~) Clutter.Enums.PathNodeType
    type AttrTransferTypeConstraint PathNodeTypeFieldInfo = (~)Clutter.Enums.PathNodeType
    type AttrTransferType PathNodeTypeFieldInfo = Clutter.Enums.PathNodeType
    type AttrGetType PathNodeTypeFieldInfo = Clutter.Enums.PathNodeType
    type AttrLabel PathNodeTypeFieldInfo = "type"
    type AttrOrigin PathNodeTypeFieldInfo = PathNode
    attrGet = getPathNodeType
    attrSet = setPathNodeType
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Structs.PathNode.type"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Structs-PathNode.html#g:attr:type"
        })

pathNode_type :: AttrLabelProxy "type"
pathNode_type = AttrLabelProxy

#endif


-- XXX Skipped attribute for "PathNode:points"
-- Not implemented: Don't know how to unpack C array of type TCArray False 3 (-1) (TInterface (Name {namespace = "Clutter", name = "Knot"}))

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PathNode
type instance O.AttributeList PathNode = PathNodeAttributeList
type PathNodeAttributeList = ('[ '("type", PathNodeTypeFieldInfo)] :: [(Symbol, *)])
#endif

-- method PathNode::copy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPathNode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Clutter" , name = "PathNode" })
-- throws : False
-- Skip return : False

foreign import ccall "clutter_path_node_copy" clutter_path_node_copy :: 
    Ptr PathNode ->                         -- node : TInterface (Name {namespace = "Clutter", name = "PathNode"})
    IO (Ptr PathNode)

-- | Makes an allocated copy of a node.
-- 
-- /Since: 1.0/
pathNodeCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    PathNode
    -- ^ /@node@/: a t'GI.Clutter.Structs.PathNode.PathNode'
    -> m PathNode
    -- ^ __Returns:__ the copied node.
pathNodeCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
PathNode -> m PathNode
pathNodeCopy PathNode
node = IO PathNode -> m PathNode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PathNode -> m PathNode) -> IO PathNode -> m PathNode
forall a b. (a -> b) -> a -> b
$ do
    Ptr PathNode
node' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
node
    Ptr PathNode
result <- Ptr PathNode -> IO (Ptr PathNode)
clutter_path_node_copy Ptr PathNode
node'
    Text -> Ptr PathNode -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathNodeCopy" Ptr PathNode
result
    PathNode
result' <- ((ManagedPtr PathNode -> PathNode) -> Ptr PathNode -> IO PathNode
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr PathNode -> PathNode
PathNode) Ptr PathNode
result
    PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
node
    PathNode -> IO PathNode
forall (m :: * -> *) a. Monad m => a -> m a
return PathNode
result'

#if defined(ENABLE_OVERLOADING)
data PathNodeCopyMethodInfo
instance (signature ~ (m PathNode), MonadIO m) => O.OverloadedMethod PathNodeCopyMethodInfo PathNode signature where
    overloadedMethod = pathNodeCopy

instance O.OverloadedMethodInfo PathNodeCopyMethodInfo PathNode where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Structs.PathNode.pathNodeCopy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Structs-PathNode.html#v:pathNodeCopy"
        })


#endif

-- method PathNode::equal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node_a"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "First node" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "node_b"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Second node" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "clutter_path_node_equal" clutter_path_node_equal :: 
    Ptr PathNode ->                         -- node_a : TInterface (Name {namespace = "Clutter", name = "PathNode"})
    Ptr PathNode ->                         -- node_b : TInterface (Name {namespace = "Clutter", name = "PathNode"})
    IO CInt

-- | Compares two nodes and checks if they are the same type with the
-- same coordinates.
-- 
-- /Since: 1.0/
pathNodeEqual ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    PathNode
    -- ^ /@nodeA@/: First node
    -> PathNode
    -- ^ /@nodeB@/: Second node
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the nodes are the same.
pathNodeEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
PathNode -> PathNode -> m Bool
pathNodeEqual PathNode
nodeA PathNode
nodeB = IO Bool -> m Bool
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
    Ptr PathNode
nodeA' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
nodeA
    Ptr PathNode
nodeB' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
nodeB
    CInt
result <- Ptr PathNode -> Ptr PathNode -> IO CInt
clutter_path_node_equal Ptr PathNode
nodeA' Ptr PathNode
nodeB'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
nodeA
    PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
nodeB
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data PathNodeEqualMethodInfo
instance (signature ~ (PathNode -> m Bool), MonadIO m) => O.OverloadedMethod PathNodeEqualMethodInfo PathNode signature where
    overloadedMethod = pathNodeEqual

instance O.OverloadedMethodInfo PathNodeEqualMethodInfo PathNode where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Structs.PathNode.pathNodeEqual",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Structs-PathNode.html#v:pathNodeEqual"
        })


#endif

-- method PathNode::free
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "node"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathNode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPathNode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "clutter_path_node_free" clutter_path_node_free :: 
    Ptr PathNode ->                         -- node : TInterface (Name {namespace = "Clutter", name = "PathNode"})
    IO ()

-- | Frees the memory of an allocated node.
-- 
-- /Since: 1.0/
pathNodeFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    PathNode
    -- ^ /@node@/: a t'GI.Clutter.Structs.PathNode.PathNode'
    -> m ()
pathNodeFree :: forall (m :: * -> *). (HasCallStack, MonadIO m) => PathNode -> m ()
pathNodeFree PathNode
node = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr PathNode
node' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
node
    Ptr PathNode -> IO ()
clutter_path_node_free Ptr PathNode
node'
    PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
node
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data PathNodeFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod PathNodeFreeMethodInfo PathNode signature where
    overloadedMethod = pathNodeFree

instance O.OverloadedMethodInfo PathNodeFreeMethodInfo PathNode where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Structs.PathNode.pathNodeFree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Structs-PathNode.html#v:pathNodeFree"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolvePathNodeMethod (t :: Symbol) (o :: *) :: * where
    ResolvePathNodeMethod "copy" o = PathNodeCopyMethodInfo
    ResolvePathNodeMethod "equal" o = PathNodeEqualMethodInfo
    ResolvePathNodeMethod "free" o = PathNodeFreeMethodInfo
    ResolvePathNodeMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolvePathNodeMethod t PathNode, O.OverloadedMethod info PathNode p) => OL.IsLabel t (PathNode -> 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 ~ ResolvePathNodeMethod t PathNode, O.OverloadedMethod info PathNode p, R.HasField t PathNode p) => R.HasField t PathNode p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolvePathNodeMethod t PathNode, O.OverloadedMethodInfo info PathNode) => OL.IsLabel t (O.MethodProxy info PathNode) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif