{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.PathConstraint
(
PathConstraint(..) ,
IsPathConstraint ,
toPathConstraint ,
#if defined(ENABLE_OVERLOADING)
ResolvePathConstraintMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PathConstraintGetOffsetMethodInfo ,
#endif
pathConstraintGetOffset ,
#if defined(ENABLE_OVERLOADING)
PathConstraintGetPathMethodInfo ,
#endif
pathConstraintGetPath ,
pathConstraintNew ,
#if defined(ENABLE_OVERLOADING)
PathConstraintSetOffsetMethodInfo ,
#endif
pathConstraintSetOffset ,
#if defined(ENABLE_OVERLOADING)
PathConstraintSetPathMethodInfo ,
#endif
pathConstraintSetPath ,
#if defined(ENABLE_OVERLOADING)
PathConstraintOffsetPropertyInfo ,
#endif
constructPathConstraintOffset ,
getPathConstraintOffset ,
#if defined(ENABLE_OVERLOADING)
pathConstraintOffset ,
#endif
setPathConstraintOffset ,
#if defined(ENABLE_OVERLOADING)
PathConstraintPathPropertyInfo ,
#endif
clearPathConstraintPath ,
constructPathConstraintPath ,
getPathConstraintPath ,
#if defined(ENABLE_OVERLOADING)
pathConstraintPath ,
#endif
setPathConstraintPath ,
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
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
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]
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
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
type PathConstraintNodeReachedCallback =
Clutter.Actor.Actor
-> Word32
-> IO ()
type C_PathConstraintNodeReachedCallback =
Ptr PathConstraint ->
Ptr Clutter.Actor.Actor ->
Word32 ->
Ptr () ->
IO ()
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
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
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
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"
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
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
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
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)
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)
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
foreign import ccall "clutter_path_constraint_new" clutter_path_constraint_new ::
Ptr Clutter.Path.Path ->
CFloat ->
IO (Ptr PathConstraint)
pathConstraintNew ::
(B.CallStack.HasCallStack, MonadIO m, Clutter.Path.IsPath a) =>
Maybe (a)
-> Float
-> m 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
foreign import ccall "clutter_path_constraint_get_offset" clutter_path_constraint_get_offset ::
Ptr PathConstraint ->
IO CFloat
pathConstraintGetOffset ::
(B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
a
-> m Float
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
foreign import ccall "clutter_path_constraint_get_path" clutter_path_constraint_get_path ::
Ptr PathConstraint ->
IO (Ptr Clutter.Path.Path)
pathConstraintGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
a
-> m Clutter.Path.Path
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
foreign import ccall "clutter_path_constraint_set_offset" clutter_path_constraint_set_offset ::
Ptr PathConstraint ->
CFloat ->
IO ()
pathConstraintSetOffset ::
(B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a) =>
a
-> Float
-> 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
foreign import ccall "clutter_path_constraint_set_path" clutter_path_constraint_set_path ::
Ptr PathConstraint ->
Ptr Clutter.Path.Path ->
IO ()
pathConstraintSetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsPathConstraint a, Clutter.Path.IsPath b) =>
a
-> Maybe (b)
-> 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