{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Clutter.Objects.PathConstraint.PathConstraint' is an opaque structure
-- whose members cannot be directly accessed
-- 
-- /Since: 1.6/

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

module GI.Clutter.Objects.PathConstraint
    ( 

-- * Exported types
    PathConstraint(..)                      ,
    IsPathConstraint                        ,
    toPathConstraint                        ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActor]("GI.Clutter.Objects.ActorMeta#g:method:getActor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getEnabled]("GI.Clutter.Objects.ActorMeta#g:method:getEnabled"), [getName]("GI.Clutter.Objects.ActorMeta#g:method:getName"), [getOffset]("GI.Clutter.Objects.PathConstraint#g:method:getOffset"), [getPath]("GI.Clutter.Objects.PathConstraint#g:method:getPath"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setEnabled]("GI.Clutter.Objects.ActorMeta#g:method:setEnabled"), [setName]("GI.Clutter.Objects.ActorMeta#g:method:setName"), [setOffset]("GI.Clutter.Objects.PathConstraint#g:method:setOffset"), [setPath]("GI.Clutter.Objects.PathConstraint#g:method:setPath"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolvePathConstraintMethod             ,
#endif

-- ** getOffset #method:getOffset#

#if defined(ENABLE_OVERLOADING)
    PathConstraintGetOffsetMethodInfo       ,
#endif
    pathConstraintGetOffset                 ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    PathConstraintGetPathMethodInfo         ,
#endif
    pathConstraintGetPath                   ,


-- ** new #method:new#

    pathConstraintNew                       ,


-- ** setOffset #method:setOffset#

#if defined(ENABLE_OVERLOADING)
    PathConstraintSetOffsetMethodInfo       ,
#endif
    pathConstraintSetOffset                 ,


-- ** setPath #method:setPath#

#if defined(ENABLE_OVERLOADING)
    PathConstraintSetPathMethodInfo         ,
#endif
    pathConstraintSetPath                   ,




 -- * Properties


-- ** offset #attr:offset#
-- | The offset along the t'GI.Clutter.Objects.PathConstraint.PathConstraint':@/path/@, between -1.0 and 2.0.
-- 
-- /Since: 1.6/

#if defined(ENABLE_OVERLOADING)
    PathConstraintOffsetPropertyInfo        ,
#endif
    constructPathConstraintOffset           ,
    getPathConstraintOffset                 ,
#if defined(ENABLE_OVERLOADING)
    pathConstraintOffset                    ,
#endif
    setPathConstraintOffset                 ,


-- ** path #attr:path#
-- | The t'GI.Clutter.Objects.Path.Path' used to constrain the position of an actor.
-- 
-- /Since: 1.6/

#if defined(ENABLE_OVERLOADING)
    PathConstraintPathPropertyInfo          ,
#endif
    clearPathConstraintPath                 ,
    constructPathConstraintPath             ,
    getPathConstraintPath                   ,
#if defined(ENABLE_OVERLOADING)
    pathConstraintPath                      ,
#endif
    setPathConstraintPath                   ,




 -- * Signals


-- ** nodeReached #signal:nodeReached#

    PathConstraintNodeReachedCallback       ,
#if defined(ENABLE_OVERLOADING)
    PathConstraintNodeReachedSignalInfo     ,
#endif
    afterPathConstraintNodeReached          ,
    onPathConstraintNodeReached             ,




    ) 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.Objects.Actor as Clutter.Actor
import {-# SOURCE #-} qualified GI.Clutter.Objects.ActorMeta as Clutter.ActorMeta
import {-# SOURCE #-} qualified GI.Clutter.Objects.Constraint as Clutter.Constraint
import {-# SOURCE #-} qualified GI.Clutter.Objects.Path as Clutter.Path
import qualified GI.GObject.Objects.Object as GObject.Object

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

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

foreign import ccall "clutter_path_constraint_get_type"
    c_clutter_path_constraint_get_type :: IO B.Types.GType

instance B.Types.TypedObject PathConstraint where
    glibType :: IO GType
glibType = IO GType
c_clutter_path_constraint_get_type

instance B.Types.GObject PathConstraint

-- | Type class for types which can be safely cast to `PathConstraint`, for instance with `toPathConstraint`.
class (SP.GObject o, O.IsDescendantOf PathConstraint o) => IsPathConstraint o
instance (SP.GObject o, O.IsDescendantOf PathConstraint o) => IsPathConstraint o

instance O.HasParentTypes PathConstraint
type instance O.ParentTypes PathConstraint = '[Clutter.Constraint.Constraint, Clutter.ActorMeta.ActorMeta, GObject.Object.Object]

-- | Cast to `PathConstraint`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toPathConstraint :: (MIO.MonadIO m, IsPathConstraint o) => o -> m PathConstraint
toPathConstraint :: forall (m :: * -> *) o.
(MonadIO m, IsPathConstraint o) =>
o -> m PathConstraint
toPathConstraint = IO PathConstraint -> m PathConstraint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PathConstraint -> m PathConstraint)
-> (o -> IO PathConstraint) -> o -> m PathConstraint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PathConstraint -> PathConstraint)
-> o -> IO PathConstraint
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr PathConstraint -> PathConstraint
PathConstraint

-- | Convert 'PathConstraint' 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 PathConstraint) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_path_constraint_get_type
    gvalueSet_ :: Ptr GValue -> Maybe PathConstraint -> IO ()
gvalueSet_ Ptr GValue
gv Maybe PathConstraint
P.Nothing = Ptr GValue -> Ptr PathConstraint -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr PathConstraint
forall a. Ptr a
FP.nullPtr :: FP.Ptr PathConstraint)
    gvalueSet_ Ptr GValue
gv (P.Just PathConstraint
obj) = PathConstraint -> (Ptr PathConstraint -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PathConstraint
obj (Ptr GValue -> Ptr PathConstraint -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe PathConstraint)
gvalueGet_ Ptr GValue
gv = do
        Ptr PathConstraint
ptr <- Ptr GValue -> IO (Ptr PathConstraint)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr PathConstraint)
        if Ptr PathConstraint
ptr Ptr PathConstraint -> Ptr PathConstraint -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr PathConstraint
forall a. Ptr a
FP.nullPtr
        then PathConstraint -> Maybe PathConstraint
forall a. a -> Maybe a
P.Just (PathConstraint -> Maybe PathConstraint)
-> IO PathConstraint -> IO (Maybe PathConstraint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr PathConstraint -> PathConstraint)
-> Ptr PathConstraint -> IO PathConstraint
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PathConstraint -> PathConstraint
PathConstraint Ptr PathConstraint
ptr
        else Maybe PathConstraint -> IO (Maybe PathConstraint)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PathConstraint
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolvePathConstraintMethod (t :: Symbol) (o :: *) :: * where
    ResolvePathConstraintMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePathConstraintMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePathConstraintMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePathConstraintMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePathConstraintMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePathConstraintMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePathConstraintMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePathConstraintMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePathConstraintMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolvePathConstraintMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePathConstraintMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePathConstraintMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePathConstraintMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePathConstraintMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePathConstraintMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolvePathConstraintMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePathConstraintMethod "getActor" o = Clutter.ActorMeta.ActorMetaGetActorMethodInfo
    ResolvePathConstraintMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePathConstraintMethod "getEnabled" o = Clutter.ActorMeta.ActorMetaGetEnabledMethodInfo
    ResolvePathConstraintMethod "getName" o = Clutter.ActorMeta.ActorMetaGetNameMethodInfo
    ResolvePathConstraintMethod "getOffset" o = PathConstraintGetOffsetMethodInfo
    ResolvePathConstraintMethod "getPath" o = PathConstraintGetPathMethodInfo
    ResolvePathConstraintMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolvePathConstraintMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePathConstraintMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePathConstraintMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePathConstraintMethod "setEnabled" o = Clutter.ActorMeta.ActorMetaSetEnabledMethodInfo
    ResolvePathConstraintMethod "setName" o = Clutter.ActorMeta.ActorMetaSetNameMethodInfo
    ResolvePathConstraintMethod "setOffset" o = PathConstraintSetOffsetMethodInfo
    ResolvePathConstraintMethod "setPath" o = PathConstraintSetPathMethodInfo
    ResolvePathConstraintMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePathConstraintMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

-- signal PathConstraint::node-reached
-- | The [nodeReached](#g:signal:nodeReached) signal is emitted each time a
-- t'GI.Clutter.Objects.PathConstraint.PathConstraint':@/offset/@ value results in the actor
-- passing a t'GI.Clutter.Structs.PathNode.PathNode'
-- 
-- /Since: 1.6/
type PathConstraintNodeReachedCallback =
    Clutter.Actor.Actor
    -- ^ /@actor@/: the t'GI.Clutter.Objects.Actor.Actor' using the /@constraint@/
    -> Word32
    -- ^ /@index@/: the index of the node that has been reached
    -> IO ()

type C_PathConstraintNodeReachedCallback =
    Ptr PathConstraint ->                   -- object
    Ptr Clutter.Actor.Actor ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_PathConstraintNodeReachedCallback`.
foreign import ccall "wrapper"
    mk_PathConstraintNodeReachedCallback :: C_PathConstraintNodeReachedCallback -> IO (FunPtr C_PathConstraintNodeReachedCallback)

wrap_PathConstraintNodeReachedCallback :: 
    GObject a => (a -> PathConstraintNodeReachedCallback) ->
    C_PathConstraintNodeReachedCallback
wrap_PathConstraintNodeReachedCallback :: forall a.
GObject a =>
(a -> PathConstraintNodeReachedCallback)
-> C_PathConstraintNodeReachedCallback
wrap_PathConstraintNodeReachedCallback a -> PathConstraintNodeReachedCallback
gi'cb Ptr PathConstraint
gi'selfPtr Ptr Actor
actor Word32
index Ptr ()
_ = do
    Actor
actor' <- ((ManagedPtr Actor -> Actor) -> Ptr Actor -> IO Actor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Actor -> Actor
Clutter.Actor.Actor) Ptr Actor
actor
    Ptr PathConstraint -> (PathConstraint -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PathConstraint
gi'selfPtr ((PathConstraint -> IO ()) -> IO ())
-> (PathConstraint -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \PathConstraint
gi'self -> a -> PathConstraintNodeReachedCallback
gi'cb (PathConstraint -> a
Coerce.coerce PathConstraint
gi'self)  Actor
actor' Word32
index


-- | Connect a signal handler for the [nodeReached](#signal:nodeReached) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' pathConstraint #nodeReached callback
-- @
-- 
-- 
onPathConstraintNodeReached :: (IsPathConstraint a, MonadIO m) => a -> ((?self :: a) => PathConstraintNodeReachedCallback) -> m SignalHandlerId
onPathConstraintNodeReached :: forall a (m :: * -> *).
(IsPathConstraint a, MonadIO m) =>
a
-> ((?self::a) => PathConstraintNodeReachedCallback)
-> m SignalHandlerId
onPathConstraintNodeReached a
obj (?self::a) => PathConstraintNodeReachedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> PathConstraintNodeReachedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PathConstraintNodeReachedCallback
PathConstraintNodeReachedCallback
cb
    let wrapped' :: C_PathConstraintNodeReachedCallback
wrapped' = (a -> PathConstraintNodeReachedCallback)
-> C_PathConstraintNodeReachedCallback
forall a.
GObject a =>
(a -> PathConstraintNodeReachedCallback)
-> C_PathConstraintNodeReachedCallback
wrap_PathConstraintNodeReachedCallback a -> PathConstraintNodeReachedCallback
wrapped
    FunPtr C_PathConstraintNodeReachedCallback
wrapped'' <- C_PathConstraintNodeReachedCallback
-> IO (FunPtr C_PathConstraintNodeReachedCallback)
mk_PathConstraintNodeReachedCallback C_PathConstraintNodeReachedCallback
wrapped'
    a
-> Text
-> FunPtr C_PathConstraintNodeReachedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"node-reached" FunPtr C_PathConstraintNodeReachedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [nodeReached](#signal:nodeReached) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' pathConstraint #nodeReached callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterPathConstraintNodeReached :: (IsPathConstraint a, MonadIO m) => a -> ((?self :: a) => PathConstraintNodeReachedCallback) -> m SignalHandlerId
afterPathConstraintNodeReached :: forall a (m :: * -> *).
(IsPathConstraint a, MonadIO m) =>
a
-> ((?self::a) => PathConstraintNodeReachedCallback)
-> m SignalHandlerId
afterPathConstraintNodeReached a
obj (?self::a) => PathConstraintNodeReachedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> PathConstraintNodeReachedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PathConstraintNodeReachedCallback
PathConstraintNodeReachedCallback
cb
    let wrapped' :: C_PathConstraintNodeReachedCallback
wrapped' = (a -> PathConstraintNodeReachedCallback)
-> C_PathConstraintNodeReachedCallback
forall a.
GObject a =>
(a -> PathConstraintNodeReachedCallback)
-> C_PathConstraintNodeReachedCallback
wrap_PathConstraintNodeReachedCallback a -> PathConstraintNodeReachedCallback
wrapped
    FunPtr C_PathConstraintNodeReachedCallback
wrapped'' <- C_PathConstraintNodeReachedCallback
-> IO (FunPtr C_PathConstraintNodeReachedCallback)
mk_PathConstraintNodeReachedCallback C_PathConstraintNodeReachedCallback
wrapped'
    a
-> Text
-> FunPtr C_PathConstraintNodeReachedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"node-reached" FunPtr C_PathConstraintNodeReachedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data PathConstraintNodeReachedSignalInfo
instance SignalInfo PathConstraintNodeReachedSignalInfo where
    type HaskellCallbackType PathConstraintNodeReachedSignalInfo = PathConstraintNodeReachedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_PathConstraintNodeReachedCallback cb
        cb'' <- mk_PathConstraintNodeReachedCallback cb'
        connectSignalFunPtr obj "node-reached" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint::node-reached"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#g:signal:nodeReached"})

#endif

-- VVV Prop "offset"
   -- Type: TBasicType TFloat
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@offset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pathConstraint #offset
-- @
getPathConstraintOffset :: (MonadIO m, IsPathConstraint o) => o -> m Float
getPathConstraintOffset :: forall (m :: * -> *) o.
(MonadIO m, IsPathConstraint o) =>
o -> m Float
getPathConstraintOffset o
obj = IO Float -> m Float
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Float
forall a. GObject a => a -> String -> IO Float
B.Properties.getObjectPropertyFloat o
obj String
"offset"

-- | Set the value of the “@offset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' pathConstraint [ #offset 'Data.GI.Base.Attributes.:=' value ]
-- @
setPathConstraintOffset :: (MonadIO m, IsPathConstraint o) => o -> Float -> m ()
setPathConstraintOffset :: forall (m :: * -> *) o.
(MonadIO m, IsPathConstraint o) =>
o -> Float -> m ()
setPathConstraintOffset o
obj Float
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Float -> IO ()
forall a. GObject a => a -> String -> Float -> IO ()
B.Properties.setObjectPropertyFloat o
obj String
"offset" Float
val

-- | Construct a `GValueConstruct` with valid value for the “@offset@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructPathConstraintOffset :: (IsPathConstraint o, MIO.MonadIO m) => Float -> m (GValueConstruct o)
constructPathConstraintOffset :: forall o (m :: * -> *).
(IsPathConstraint o, MonadIO m) =>
Float -> m (GValueConstruct o)
constructPathConstraintOffset Float
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Float -> IO (GValueConstruct o)
forall o. String -> Float -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFloat String
"offset" Float
val

#if defined(ENABLE_OVERLOADING)
data PathConstraintOffsetPropertyInfo
instance AttrInfo PathConstraintOffsetPropertyInfo where
    type AttrAllowedOps PathConstraintOffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint PathConstraintOffsetPropertyInfo = IsPathConstraint
    type AttrSetTypeConstraint PathConstraintOffsetPropertyInfo = (~) Float
    type AttrTransferTypeConstraint PathConstraintOffsetPropertyInfo = (~) Float
    type AttrTransferType PathConstraintOffsetPropertyInfo = Float
    type AttrGetType PathConstraintOffsetPropertyInfo = Float
    type AttrLabel PathConstraintOffsetPropertyInfo = "offset"
    type AttrOrigin PathConstraintOffsetPropertyInfo = PathConstraint
    attrGet = getPathConstraintOffset
    attrSet = setPathConstraintOffset
    attrTransfer _ v = do
        return v
    attrConstruct = constructPathConstraintOffset
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.offset"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#g:attr:offset"
        })
#endif

-- VVV Prop "path"
   -- Type: TInterface (Name {namespace = "Clutter", name = "Path"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just True)

-- | Get the value of the “@path@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pathConstraint #path
-- @
getPathConstraintPath :: (MonadIO m, IsPathConstraint o) => o -> m Clutter.Path.Path
getPathConstraintPath :: forall (m :: * -> *) o.
(MonadIO m, IsPathConstraint o) =>
o -> m Path
getPathConstraintPath o
obj = IO Path -> m Path
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Path -> m Path) -> IO Path -> m Path
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Path) -> IO Path
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPathConstraintPath" (IO (Maybe Path) -> IO Path) -> IO (Maybe Path) -> IO Path
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Path -> Path) -> IO (Maybe Path)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"path" ManagedPtr Path -> Path
Clutter.Path.Path

-- | Set the value of the “@path@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' pathConstraint [ #path 'Data.GI.Base.Attributes.:=' value ]
-- @
setPathConstraintPath :: (MonadIO m, IsPathConstraint o, Clutter.Path.IsPath a) => o -> a -> m ()
setPathConstraintPath :: forall (m :: * -> *) o a.
(MonadIO m, IsPathConstraint o, IsPath a) =>
o -> a -> m ()
setPathConstraintPath o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"path" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@path@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructPathConstraintPath :: (IsPathConstraint o, MIO.MonadIO m, Clutter.Path.IsPath a) => a -> m (GValueConstruct o)
constructPathConstraintPath :: forall o (m :: * -> *) a.
(IsPathConstraint o, MonadIO m, IsPath a) =>
a -> m (GValueConstruct o)
constructPathConstraintPath a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"path" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@path@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #path
-- @
clearPathConstraintPath :: (MonadIO m, IsPathConstraint o) => o -> m ()
clearPathConstraintPath :: forall (m :: * -> *) o.
(MonadIO m, IsPathConstraint o) =>
o -> m ()
clearPathConstraintPath o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Path -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"path" (Maybe Path
forall a. Maybe a
Nothing :: Maybe Clutter.Path.Path)

#if defined(ENABLE_OVERLOADING)
data PathConstraintPathPropertyInfo
instance AttrInfo PathConstraintPathPropertyInfo where
    type AttrAllowedOps PathConstraintPathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint PathConstraintPathPropertyInfo = IsPathConstraint
    type AttrSetTypeConstraint PathConstraintPathPropertyInfo = Clutter.Path.IsPath
    type AttrTransferTypeConstraint PathConstraintPathPropertyInfo = Clutter.Path.IsPath
    type AttrTransferType PathConstraintPathPropertyInfo = Clutter.Path.Path
    type AttrGetType PathConstraintPathPropertyInfo = Clutter.Path.Path
    type AttrLabel PathConstraintPathPropertyInfo = "path"
    type AttrOrigin PathConstraintPathPropertyInfo = PathConstraint
    attrGet = getPathConstraintPath
    attrSet = setPathConstraintPath
    attrTransfer _ v = do
        unsafeCastTo Clutter.Path.Path v
    attrConstruct = constructPathConstraintPath
    attrClear = clearPathConstraintPath
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.path"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#g:attr:path"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PathConstraint
type instance O.AttributeList PathConstraint = PathConstraintAttributeList
type PathConstraintAttributeList = ('[ '("actor", Clutter.ActorMeta.ActorMetaActorPropertyInfo), '("enabled", Clutter.ActorMeta.ActorMetaEnabledPropertyInfo), '("name", Clutter.ActorMeta.ActorMetaNamePropertyInfo), '("offset", PathConstraintOffsetPropertyInfo), '("path", PathConstraintPathPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
pathConstraintOffset :: AttrLabelProxy "offset"
pathConstraintOffset = AttrLabelProxy

pathConstraintPath :: AttrLabelProxy "path"
pathConstraintPath = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PathConstraint = PathConstraintSignalList
type PathConstraintSignalList = ('[ '("nodeReached", PathConstraintNodeReachedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method PathConstraint::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "Path" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPath, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the offset along the #ClutterPath"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Clutter" , name = "PathConstraint" })
-- throws : False
-- Skip return : False

foreign import ccall "clutter_path_constraint_new" clutter_path_constraint_new :: 
    Ptr Clutter.Path.Path ->                -- path : TInterface (Name {namespace = "Clutter", name = "Path"})
    CFloat ->                               -- offset : TBasicType TFloat
    IO (Ptr PathConstraint)

-- | Creates a new t'GI.Clutter.Objects.PathConstraint.PathConstraint' with the given /@path@/ and /@offset@/
-- 
-- /Since: 1.6/
pathConstraintNew ::
    (B.CallStack.HasCallStack, MonadIO m, Clutter.Path.IsPath a) =>
    Maybe (a)
    -- ^ /@path@/: a t'GI.Clutter.Objects.Path.Path', or 'P.Nothing'
    -> Float
    -- ^ /@offset@/: the offset along the t'GI.Clutter.Objects.Path.Path'
    -> m PathConstraint
    -- ^ __Returns:__ the newly created t'GI.Clutter.Objects.PathConstraint.PathConstraint'
pathConstraintNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
Maybe a -> Float -> m PathConstraint
pathConstraintNew Maybe a
path Float
offset = IO PathConstraint -> m PathConstraint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PathConstraint -> m PathConstraint)
-> IO PathConstraint -> m PathConstraint
forall a b. (a -> b) -> a -> b
$ do
    Ptr Path
maybePath <- case Maybe a
path of
        Maybe a
Nothing -> Ptr Path -> IO (Ptr Path)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Path
forall a. Ptr a
nullPtr
        Just a
jPath -> do
            Ptr Path
jPath' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPath
            Ptr Path -> IO (Ptr Path)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Path
jPath'
    let offset' :: CFloat
offset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
offset
    Ptr PathConstraint
result <- Ptr Path -> CFloat -> IO (Ptr PathConstraint)
clutter_path_constraint_new Ptr Path
maybePath CFloat
offset'
    Text -> Ptr PathConstraint -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathConstraintNew" Ptr PathConstraint
result
    PathConstraint
result' <- ((ManagedPtr PathConstraint -> PathConstraint)
-> Ptr PathConstraint -> IO PathConstraint
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PathConstraint -> PathConstraint
PathConstraint) Ptr PathConstraint
result
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
path a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    PathConstraint -> IO PathConstraint
forall (m :: * -> *) a. Monad m => a -> m a
return PathConstraint
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method PathConstraint::get_offset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "constraint"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathConstraint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPathConstraint"
--                 , 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 "clutter_path_constraint_get_offset" clutter_path_constraint_get_offset :: 
    Ptr PathConstraint ->                   -- constraint : TInterface (Name {namespace = "Clutter", name = "PathConstraint"})
    IO CFloat

-- | Retrieves the offset along the t'GI.Clutter.Objects.Path.Path' used by /@constraint@/.
-- 
-- /Since: 1.6/
pathConstraintGetOffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
    a
    -- ^ /@constraint@/: a t'GI.Clutter.Objects.PathConstraint.PathConstraint'
    -> m Float
    -- ^ __Returns:__ the offset
pathConstraintGetOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPathConstraint a) =>
a -> m Float
pathConstraintGetOffset a
constraint = 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 PathConstraint
constraint' <- a -> IO (Ptr PathConstraint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
constraint
    CFloat
result <- Ptr PathConstraint -> IO CFloat
clutter_path_constraint_get_offset Ptr PathConstraint
constraint'
    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
constraint
    Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'

#if defined(ENABLE_OVERLOADING)
data PathConstraintGetOffsetMethodInfo
instance (signature ~ (m Float), MonadIO m, IsPathConstraint a) => O.OverloadedMethod PathConstraintGetOffsetMethodInfo a signature where
    overloadedMethod = pathConstraintGetOffset

instance O.OverloadedMethodInfo PathConstraintGetOffsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.pathConstraintGetOffset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#v:pathConstraintGetOffset"
        })


#endif

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

foreign import ccall "clutter_path_constraint_get_path" clutter_path_constraint_get_path :: 
    Ptr PathConstraint ->                   -- constraint : TInterface (Name {namespace = "Clutter", name = "PathConstraint"})
    IO (Ptr Clutter.Path.Path)

-- | Retrieves a pointer to the t'GI.Clutter.Objects.Path.Path' used by /@constraint@/.
-- 
-- /Since: 1.6/
pathConstraintGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
    a
    -- ^ /@constraint@/: a t'GI.Clutter.Objects.PathConstraint.PathConstraint'
    -> m Clutter.Path.Path
    -- ^ __Returns:__ the t'GI.Clutter.Objects.Path.Path' used by the
    --   t'GI.Clutter.Objects.PathConstraint.PathConstraint', or 'P.Nothing'. The returned t'GI.Clutter.Objects.Path.Path' is owned
    --   by the constraint and it should not be unreferenced
pathConstraintGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPathConstraint a) =>
a -> m Path
pathConstraintGetPath a
constraint = IO Path -> m Path
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Path -> m Path) -> IO Path -> m Path
forall a b. (a -> b) -> a -> b
$ do
    Ptr PathConstraint
constraint' <- a -> IO (Ptr PathConstraint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
constraint
    Ptr Path
result <- Ptr PathConstraint -> IO (Ptr Path)
clutter_path_constraint_get_path Ptr PathConstraint
constraint'
    Text -> Ptr Path -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathConstraintGetPath" Ptr Path
result
    Path
result' <- ((ManagedPtr Path -> Path) -> Ptr Path -> IO Path
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Path -> Path
Clutter.Path.Path) Ptr Path
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
constraint
    Path -> IO Path
forall (m :: * -> *) a. Monad m => a -> m a
return Path
result'

#if defined(ENABLE_OVERLOADING)
data PathConstraintGetPathMethodInfo
instance (signature ~ (m Clutter.Path.Path), MonadIO m, IsPathConstraint a) => O.OverloadedMethod PathConstraintGetPathMethodInfo a signature where
    overloadedMethod = pathConstraintGetPath

instance O.OverloadedMethodInfo PathConstraintGetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.pathConstraintGetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#v:pathConstraintGetPath"
        })


#endif

-- method PathConstraint::set_offset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "constraint"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathConstraint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPathConstraint"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the offset along the path"
--                 , 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_constraint_set_offset" clutter_path_constraint_set_offset :: 
    Ptr PathConstraint ->                   -- constraint : TInterface (Name {namespace = "Clutter", name = "PathConstraint"})
    CFloat ->                               -- offset : TBasicType TFloat
    IO ()

-- | Sets the offset along the t'GI.Clutter.Objects.Path.Path' used by /@constraint@/.
-- 
-- /Since: 1.6/
pathConstraintSetOffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
    a
    -- ^ /@constraint@/: a t'GI.Clutter.Objects.PathConstraint.PathConstraint'
    -> Float
    -- ^ /@offset@/: the offset along the path
    -> m ()
pathConstraintSetOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPathConstraint a) =>
a -> Float -> m ()
pathConstraintSetOffset a
constraint Float
offset = 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 PathConstraint
constraint' <- a -> IO (Ptr PathConstraint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
constraint
    let offset' :: CFloat
offset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
offset
    Ptr PathConstraint -> CFloat -> IO ()
clutter_path_constraint_set_offset Ptr PathConstraint
constraint' CFloat
offset'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
constraint
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data PathConstraintSetOffsetMethodInfo
instance (signature ~ (Float -> m ()), MonadIO m, IsPathConstraint a) => O.OverloadedMethod PathConstraintSetOffsetMethodInfo a signature where
    overloadedMethod = pathConstraintSetOffset

instance O.OverloadedMethodInfo PathConstraintSetOffsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.pathConstraintSetOffset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#v:pathConstraintSetOffset"
        })


#endif

-- method PathConstraint::set_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "constraint"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "PathConstraint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPathConstraint"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "Path" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterPath" , 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_constraint_set_path" clutter_path_constraint_set_path :: 
    Ptr PathConstraint ->                   -- constraint : TInterface (Name {namespace = "Clutter", name = "PathConstraint"})
    Ptr Clutter.Path.Path ->                -- path : TInterface (Name {namespace = "Clutter", name = "Path"})
    IO ()

-- | Sets the /@path@/ to be followed by the t'GI.Clutter.Objects.PathConstraint.PathConstraint'.
-- 
-- The /@constraint@/ will take ownership of the t'GI.Clutter.Objects.Path.Path' passed to this
-- function.
-- 
-- /Since: 1.6/
pathConstraintSetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a, Clutter.Path.IsPath b) =>
    a
    -- ^ /@constraint@/: a t'GI.Clutter.Objects.PathConstraint.PathConstraint'
    -> Maybe (b)
    -- ^ /@path@/: a t'GI.Clutter.Objects.Path.Path'
    -> m ()
pathConstraintSetPath :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsPathConstraint a, IsPath b) =>
a -> Maybe b -> m ()
pathConstraintSetPath a
constraint Maybe b
path = 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 PathConstraint
constraint' <- a -> IO (Ptr PathConstraint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
constraint
    Ptr Path
maybePath <- case Maybe b
path of
        Maybe b
Nothing -> Ptr Path -> IO (Ptr Path)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Path
forall a. Ptr a
nullPtr
        Just b
jPath -> do
            Ptr Path
jPath' <- b -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jPath
            Ptr Path -> IO (Ptr Path)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Path
jPath'
    Ptr PathConstraint -> Ptr Path -> IO ()
clutter_path_constraint_set_path Ptr PathConstraint
constraint' Ptr Path
maybePath
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
constraint
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
path b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data PathConstraintSetPathMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsPathConstraint a, Clutter.Path.IsPath b) => O.OverloadedMethod PathConstraintSetPathMethodInfo a signature where
    overloadedMethod = pathConstraintSetPath

instance O.OverloadedMethodInfo PathConstraintSetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.PathConstraint.pathConstraintSetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-PathConstraint.html#v:pathConstraintSetPath"
        })


#endif