{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.Path
(
Path(..) ,
IsPath ,
toPath ,
#if defined(ENABLE_OVERLOADING)
ResolvePathMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PathAddCairoPathMethodInfo ,
#endif
pathAddCairoPath ,
#if defined(ENABLE_OVERLOADING)
PathAddCloseMethodInfo ,
#endif
pathAddClose ,
#if defined(ENABLE_OVERLOADING)
PathAddCurveToMethodInfo ,
#endif
pathAddCurveTo ,
#if defined(ENABLE_OVERLOADING)
PathAddLineToMethodInfo ,
#endif
pathAddLineTo ,
#if defined(ENABLE_OVERLOADING)
PathAddMoveToMethodInfo ,
#endif
pathAddMoveTo ,
#if defined(ENABLE_OVERLOADING)
PathAddNodeMethodInfo ,
#endif
pathAddNode ,
#if defined(ENABLE_OVERLOADING)
PathAddRelCurveToMethodInfo ,
#endif
pathAddRelCurveTo ,
#if defined(ENABLE_OVERLOADING)
PathAddRelLineToMethodInfo ,
#endif
pathAddRelLineTo ,
#if defined(ENABLE_OVERLOADING)
PathAddRelMoveToMethodInfo ,
#endif
pathAddRelMoveTo ,
#if defined(ENABLE_OVERLOADING)
PathAddStringMethodInfo ,
#endif
pathAddString ,
#if defined(ENABLE_OVERLOADING)
PathClearMethodInfo ,
#endif
pathClear ,
#if defined(ENABLE_OVERLOADING)
PathForeachMethodInfo ,
#endif
pathForeach ,
#if defined(ENABLE_OVERLOADING)
PathGetDescriptionMethodInfo ,
#endif
pathGetDescription ,
#if defined(ENABLE_OVERLOADING)
PathGetLengthMethodInfo ,
#endif
pathGetLength ,
#if defined(ENABLE_OVERLOADING)
PathGetNNodesMethodInfo ,
#endif
pathGetNNodes ,
#if defined(ENABLE_OVERLOADING)
PathGetNodeMethodInfo ,
#endif
pathGetNode ,
#if defined(ENABLE_OVERLOADING)
PathGetNodesMethodInfo ,
#endif
pathGetNodes ,
#if defined(ENABLE_OVERLOADING)
PathGetPositionMethodInfo ,
#endif
pathGetPosition ,
#if defined(ENABLE_OVERLOADING)
PathInsertNodeMethodInfo ,
#endif
pathInsertNode ,
pathNew ,
pathNewWithDescription ,
#if defined(ENABLE_OVERLOADING)
PathRemoveNodeMethodInfo ,
#endif
pathRemoveNode ,
#if defined(ENABLE_OVERLOADING)
PathReplaceNodeMethodInfo ,
#endif
pathReplaceNode ,
#if defined(ENABLE_OVERLOADING)
PathSetDescriptionMethodInfo ,
#endif
pathSetDescription ,
#if defined(ENABLE_OVERLOADING)
PathToCairoPathMethodInfo ,
#endif
pathToCairoPath ,
#if defined(ENABLE_OVERLOADING)
PathDescriptionPropertyInfo ,
#endif
clearPathDescription ,
constructPathDescription ,
getPathDescription ,
#if defined(ENABLE_OVERLOADING)
pathDescription ,
#endif
setPathDescription ,
#if defined(ENABLE_OVERLOADING)
PathLengthPropertyInfo ,
#endif
getPathLength ,
#if defined(ENABLE_OVERLOADING)
pathLength ,
#endif
) 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.GHashTable as B.GHT
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.Kind as DK
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 qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Path as Cairo.Path
import qualified GI.Clutter.Callbacks as Clutter.Callbacks
import {-# SOURCE #-} qualified GI.Clutter.Structs.Knot as Clutter.Knot
import {-# SOURCE #-} qualified GI.Clutter.Structs.PathNode as Clutter.PathNode
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Path = Path (SP.ManagedPtr Path)
deriving (Path -> Path -> Bool
(Path -> Path -> Bool) -> (Path -> Path -> Bool) -> Eq Path
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Path -> Path -> Bool
== :: Path -> Path -> Bool
$c/= :: Path -> Path -> Bool
/= :: Path -> Path -> Bool
Eq)
instance SP.ManagedPtrNewtype Path where
toManagedPtr :: Path -> ManagedPtr Path
toManagedPtr (Path ManagedPtr Path
p) = ManagedPtr Path
p
foreign import ccall "clutter_path_get_type"
c_clutter_path_get_type :: IO B.Types.GType
instance B.Types.TypedObject Path where
glibType :: IO GType
glibType = IO GType
c_clutter_path_get_type
instance B.Types.GObject Path
class (SP.GObject o, O.IsDescendantOf Path o) => IsPath o
instance (SP.GObject o, O.IsDescendantOf Path o) => IsPath o
instance O.HasParentTypes Path
type instance O.ParentTypes Path = '[GObject.Object.Object]
toPath :: (MIO.MonadIO m, IsPath o) => o -> m Path
toPath :: forall (m :: * -> *) o. (MonadIO m, IsPath o) => o -> m Path
toPath = IO Path -> m Path
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Path -> m Path) -> (o -> IO Path) -> o -> m Path
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Path -> Path) -> o -> IO Path
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Path -> Path
Path
instance B.GValue.IsGValue (Maybe Path) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_path_get_type
gvalueSet_ :: Ptr GValue -> Maybe Path -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Path
P.Nothing = Ptr GValue -> Ptr Path -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Path
forall a. Ptr a
FP.nullPtr :: FP.Ptr Path)
gvalueSet_ Ptr GValue
gv (P.Just Path
obj) = Path -> (Ptr Path -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Path
obj (Ptr GValue -> Ptr Path -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Path)
gvalueGet_ Ptr GValue
gv = do
Ptr Path
ptr <- Ptr GValue -> IO (Ptr Path)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Path)
if Ptr Path
ptr Ptr Path -> Ptr Path -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Path
forall a. Ptr a
FP.nullPtr
then Path -> Maybe Path
forall a. a -> Maybe a
P.Just (Path -> Maybe Path) -> IO Path -> IO (Maybe Path)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Path -> Path) -> Ptr Path -> IO Path
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Path -> Path
Path Ptr Path
ptr
else Maybe Path -> IO (Maybe Path)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Path
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolvePathMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolvePathMethod "addCairoPath" o = PathAddCairoPathMethodInfo
ResolvePathMethod "addClose" o = PathAddCloseMethodInfo
ResolvePathMethod "addCurveTo" o = PathAddCurveToMethodInfo
ResolvePathMethod "addLineTo" o = PathAddLineToMethodInfo
ResolvePathMethod "addMoveTo" o = PathAddMoveToMethodInfo
ResolvePathMethod "addNode" o = PathAddNodeMethodInfo
ResolvePathMethod "addRelCurveTo" o = PathAddRelCurveToMethodInfo
ResolvePathMethod "addRelLineTo" o = PathAddRelLineToMethodInfo
ResolvePathMethod "addRelMoveTo" o = PathAddRelMoveToMethodInfo
ResolvePathMethod "addString" o = PathAddStringMethodInfo
ResolvePathMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePathMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePathMethod "clear" o = PathClearMethodInfo
ResolvePathMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePathMethod "foreach" o = PathForeachMethodInfo
ResolvePathMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePathMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePathMethod "insertNode" o = PathInsertNodeMethodInfo
ResolvePathMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePathMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePathMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePathMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePathMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePathMethod "removeNode" o = PathRemoveNodeMethodInfo
ResolvePathMethod "replaceNode" o = PathReplaceNodeMethodInfo
ResolvePathMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePathMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePathMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePathMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePathMethod "toCairoPath" o = PathToCairoPathMethodInfo
ResolvePathMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePathMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePathMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePathMethod "getDescription" o = PathGetDescriptionMethodInfo
ResolvePathMethod "getLength" o = PathGetLengthMethodInfo
ResolvePathMethod "getNNodes" o = PathGetNNodesMethodInfo
ResolvePathMethod "getNode" o = PathGetNodeMethodInfo
ResolvePathMethod "getNodes" o = PathGetNodesMethodInfo
ResolvePathMethod "getPosition" o = PathGetPositionMethodInfo
ResolvePathMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePathMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePathMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePathMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePathMethod "setDescription" o = PathSetDescriptionMethodInfo
ResolvePathMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePathMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePathMethod t Path, O.OverloadedMethod info Path p) => OL.IsLabel t (Path -> 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 ~ ResolvePathMethod t Path, O.OverloadedMethod info Path p, R.HasField t Path p) => R.HasField t Path p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePathMethod t Path, O.OverloadedMethodInfo info Path) => OL.IsLabel t (O.MethodProxy info Path) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getPathDescription :: (MonadIO m, IsPath o) => o -> m (Maybe T.Text)
getPathDescription :: forall (m :: * -> *) o.
(MonadIO m, IsPath o) =>
o -> m (Maybe Text)
getPathDescription o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"description"
setPathDescription :: (MonadIO m, IsPath o) => o -> T.Text -> m ()
setPathDescription :: forall (m :: * -> *) o. (MonadIO m, IsPath o) => o -> Text -> m ()
setPathDescription o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"description" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructPathDescription :: (IsPath o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructPathDescription :: forall o (m :: * -> *).
(IsPath o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructPathDescription Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"description" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearPathDescription :: (MonadIO m, IsPath o) => o -> m ()
clearPathDescription :: forall (m :: * -> *) o. (MonadIO m, IsPath o) => o -> m ()
clearPathDescription o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"description" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data PathDescriptionPropertyInfo
instance AttrInfo PathDescriptionPropertyInfo where
type AttrAllowedOps PathDescriptionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint PathDescriptionPropertyInfo = IsPath
type AttrSetTypeConstraint PathDescriptionPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint PathDescriptionPropertyInfo = (~) T.Text
type AttrTransferType PathDescriptionPropertyInfo = T.Text
type AttrGetType PathDescriptionPropertyInfo = (Maybe T.Text)
type AttrLabel PathDescriptionPropertyInfo = "description"
type AttrOrigin PathDescriptionPropertyInfo = Path
attrGet = getPathDescription
attrSet = setPathDescription
attrTransfer _ v = do
return v
attrConstruct = constructPathDescription
attrClear = clearPathDescription
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.description"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#g:attr:description"
})
#endif
getPathLength :: (MonadIO m, IsPath o) => o -> m Word32
getPathLength :: forall (m :: * -> *) o. (MonadIO m, IsPath o) => o -> m Word32
getPathLength o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"length"
#if defined(ENABLE_OVERLOADING)
data PathLengthPropertyInfo
instance AttrInfo PathLengthPropertyInfo where
type AttrAllowedOps PathLengthPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint PathLengthPropertyInfo = IsPath
type AttrSetTypeConstraint PathLengthPropertyInfo = (~) ()
type AttrTransferTypeConstraint PathLengthPropertyInfo = (~) ()
type AttrTransferType PathLengthPropertyInfo = ()
type AttrGetType PathLengthPropertyInfo = Word32
type AttrLabel PathLengthPropertyInfo = "length"
type AttrOrigin PathLengthPropertyInfo = Path
attrGet = getPathLength
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.length"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#g:attr:length"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Path
type instance O.AttributeList Path = PathAttributeList
type PathAttributeList = ('[ '("description", PathDescriptionPropertyInfo), '("length", PathLengthPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
pathDescription :: AttrLabelProxy "description"
pathDescription = AttrLabelProxy
pathLength :: AttrLabelProxy "length"
pathLength = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Path = PathSignalList
type PathSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "clutter_path_new" clutter_path_new ::
IO (Ptr Path)
pathNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Path
pathNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Path
pathNew = IO Path -> m Path
forall a. IO a -> m a
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 Path
result <- IO (Ptr Path)
clutter_path_new
Text -> Ptr Path -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathNew" 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
Path) Ptr Path
result
Path -> IO Path
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Path
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "clutter_path_new_with_description" clutter_path_new_with_description ::
CString ->
IO (Ptr Path)
pathNewWithDescription ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Path
pathNewWithDescription :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Path
pathNewWithDescription Text
desc = IO Path -> m Path
forall a. IO a -> m a
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
CString
desc' <- Text -> IO CString
textToCString Text
desc
Ptr Path
result <- CString -> IO (Ptr Path)
clutter_path_new_with_description CString
desc'
Text -> Ptr Path -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathNewWithDescription" 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
Path) Ptr Path
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
desc'
Path -> IO Path
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Path
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "clutter_path_add_cairo_path" clutter_path_add_cairo_path ::
Ptr Path ->
Ptr Cairo.Path.Path ->
IO ()
pathAddCairoPath ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Cairo.Path.Path
-> m ()
pathAddCairoPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Path -> m ()
pathAddCairoPath a
path Path
cpath = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path
cpath' <- Path -> IO (Ptr Path)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Path
cpath
Ptr Path -> Ptr Path -> IO ()
clutter_path_add_cairo_path Ptr Path
path' Ptr Path
cpath'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
Path -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Path
cpath
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddCairoPathMethodInfo
instance (signature ~ (Cairo.Path.Path -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddCairoPathMethodInfo a signature where
overloadedMethod = pathAddCairoPath
instance O.OverloadedMethodInfo PathAddCairoPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddCairoPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddCairoPath"
})
#endif
foreign import ccall "clutter_path_add_close" clutter_path_add_close ::
Ptr Path ->
IO ()
pathAddClose ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m ()
pathAddClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m ()
pathAddClose a
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> IO ()
clutter_path_add_close Ptr Path
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddCloseMethodInfo a signature where
overloadedMethod = pathAddClose
instance O.OverloadedMethodInfo PathAddCloseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddClose",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddClose"
})
#endif
foreign import ccall "clutter_path_add_curve_to" clutter_path_add_curve_to ::
Ptr Path ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
pathAddCurveTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
pathAddCurveTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
pathAddCurveTo a
path Int32
x1 Int32
y1 Int32
x2 Int32
y2 Int32
x3 Int32
y3 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path
-> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
clutter_path_add_curve_to Ptr Path
path' Int32
x1 Int32
y1 Int32
x2 Int32
y2 Int32
x3 Int32
y3
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddCurveToMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddCurveToMethodInfo a signature where
overloadedMethod = pathAddCurveTo
instance O.OverloadedMethodInfo PathAddCurveToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddCurveTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddCurveTo"
})
#endif
foreign import ccall "clutter_path_add_line_to" clutter_path_add_line_to ::
Ptr Path ->
Int32 ->
Int32 ->
IO ()
pathAddLineTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> m ()
pathAddLineTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> m ()
pathAddLineTo a
path Int32
x Int32
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> Int32 -> Int32 -> IO ()
clutter_path_add_line_to Ptr Path
path' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddLineToMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddLineToMethodInfo a signature where
overloadedMethod = pathAddLineTo
instance O.OverloadedMethodInfo PathAddLineToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddLineTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddLineTo"
})
#endif
foreign import ccall "clutter_path_add_move_to" clutter_path_add_move_to ::
Ptr Path ->
Int32 ->
Int32 ->
IO ()
pathAddMoveTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> m ()
pathAddMoveTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> m ()
pathAddMoveTo a
path Int32
x Int32
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> Int32 -> Int32 -> IO ()
clutter_path_add_move_to Ptr Path
path' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddMoveToMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddMoveToMethodInfo a signature where
overloadedMethod = pathAddMoveTo
instance O.OverloadedMethodInfo PathAddMoveToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddMoveTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddMoveTo"
})
#endif
foreign import ccall "clutter_path_add_node" clutter_path_add_node ::
Ptr Path ->
Ptr Clutter.PathNode.PathNode ->
IO ()
pathAddNode ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Clutter.PathNode.PathNode
-> m ()
pathAddNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> PathNode -> m ()
pathAddNode a
path PathNode
node = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr PathNode
node' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
node
Ptr Path -> Ptr PathNode -> IO ()
clutter_path_add_node Ptr Path
path' Ptr PathNode
node'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
node
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddNodeMethodInfo
instance (signature ~ (Clutter.PathNode.PathNode -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddNodeMethodInfo a signature where
overloadedMethod = pathAddNode
instance O.OverloadedMethodInfo PathAddNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddNode"
})
#endif
foreign import ccall "clutter_path_add_rel_curve_to" clutter_path_add_rel_curve_to ::
Ptr Path ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
pathAddRelCurveTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
pathAddRelCurveTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
pathAddRelCurveTo a
path Int32
x1 Int32
y1 Int32
x2 Int32
y2 Int32
x3 Int32
y3 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path
-> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
clutter_path_add_rel_curve_to Ptr Path
path' Int32
x1 Int32
y1 Int32
x2 Int32
y2 Int32
x3 Int32
y3
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddRelCurveToMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddRelCurveToMethodInfo a signature where
overloadedMethod = pathAddRelCurveTo
instance O.OverloadedMethodInfo PathAddRelCurveToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddRelCurveTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddRelCurveTo"
})
#endif
foreign import ccall "clutter_path_add_rel_line_to" clutter_path_add_rel_line_to ::
Ptr Path ->
Int32 ->
Int32 ->
IO ()
pathAddRelLineTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> m ()
pathAddRelLineTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> m ()
pathAddRelLineTo a
path Int32
x Int32
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> Int32 -> Int32 -> IO ()
clutter_path_add_rel_line_to Ptr Path
path' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddRelLineToMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddRelLineToMethodInfo a signature where
overloadedMethod = pathAddRelLineTo
instance O.OverloadedMethodInfo PathAddRelLineToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddRelLineTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddRelLineTo"
})
#endif
foreign import ccall "clutter_path_add_rel_move_to" clutter_path_add_rel_move_to ::
Ptr Path ->
Int32 ->
Int32 ->
IO ()
pathAddRelMoveTo ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Int32
-> m ()
pathAddRelMoveTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> Int32 -> m ()
pathAddRelMoveTo a
path Int32
x Int32
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> Int32 -> Int32 -> IO ()
clutter_path_add_rel_move_to Ptr Path
path' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathAddRelMoveToMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathAddRelMoveToMethodInfo a signature where
overloadedMethod = pathAddRelMoveTo
instance O.OverloadedMethodInfo PathAddRelMoveToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddRelMoveTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddRelMoveTo"
})
#endif
foreign import ccall "clutter_path_add_string" clutter_path_add_string ::
Ptr Path ->
CString ->
IO CInt
pathAddString ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> T.Text
-> m Bool
pathAddString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Text -> m Bool
pathAddString a
path Text
str = IO Bool -> m Bool
forall a. IO a -> m a
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 Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
CString
str' <- Text -> IO CString
textToCString Text
str
CInt
result <- Ptr Path -> CString -> IO CInt
clutter_path_add_string Ptr Path
path' CString
str'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PathAddStringMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsPath a) => O.OverloadedMethod PathAddStringMethodInfo a signature where
overloadedMethod = pathAddString
instance O.OverloadedMethodInfo PathAddStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathAddString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathAddString"
})
#endif
foreign import ccall "clutter_path_clear" clutter_path_clear ::
Ptr Path ->
IO ()
pathClear ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m ()
pathClear :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m ()
pathClear a
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> IO ()
clutter_path_clear Ptr Path
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathClearMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathClearMethodInfo a signature where
overloadedMethod = pathClear
instance O.OverloadedMethodInfo PathClearMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathClear",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathClear"
})
#endif
foreign import ccall "clutter_path_foreach" clutter_path_foreach ::
Ptr Path ->
FunPtr Clutter.Callbacks.C_PathCallback ->
Ptr () ->
IO ()
pathForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Clutter.Callbacks.PathCallback
-> m ()
pathForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> (PathNode -> IO ()) -> m ()
pathForeach a
path PathNode -> IO ()
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
FunPtr C_PathCallback
callback' <- C_PathCallback -> IO (FunPtr C_PathCallback)
Clutter.Callbacks.mk_PathCallback (Maybe (Ptr (FunPtr C_PathCallback))
-> PathCallback_WithClosures -> C_PathCallback
Clutter.Callbacks.wrap_PathCallback Maybe (Ptr (FunPtr C_PathCallback))
forall a. Maybe a
Nothing ((PathNode -> IO ()) -> PathCallback_WithClosures
Clutter.Callbacks.drop_closures_PathCallback PathNode -> IO ()
callback))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Path -> FunPtr C_PathCallback -> Ptr () -> IO ()
clutter_path_foreach Ptr Path
path' FunPtr C_PathCallback
callback' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_PathCallback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_PathCallback
callback'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathForeachMethodInfo
instance (signature ~ (Clutter.Callbacks.PathCallback -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathForeachMethodInfo a signature where
overloadedMethod = pathForeach
instance O.OverloadedMethodInfo PathForeachMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathForeach",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathForeach"
})
#endif
foreign import ccall "clutter_path_get_description" clutter_path_get_description ::
Ptr Path ->
IO CString
pathGetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m T.Text
pathGetDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m Text
pathGetDescription a
path = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
CString
result <- Ptr Path -> IO CString
clutter_path_get_description Ptr Path
path'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pathGetDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PathGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPath a) => O.OverloadedMethod PathGetDescriptionMethodInfo a signature where
overloadedMethod = pathGetDescription
instance O.OverloadedMethodInfo PathGetDescriptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetDescription"
})
#endif
foreign import ccall "clutter_path_get_length" clutter_path_get_length ::
Ptr Path ->
IO Word32
pathGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m Word32
pathGetLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m Word32
pathGetLength a
path = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Word32
result <- Ptr Path -> IO Word32
clutter_path_get_length Ptr Path
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data PathGetLengthMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsPath a) => O.OverloadedMethod PathGetLengthMethodInfo a signature where
overloadedMethod = pathGetLength
instance O.OverloadedMethodInfo PathGetLengthMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetLength",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetLength"
})
#endif
foreign import ccall "clutter_path_get_n_nodes" clutter_path_get_n_nodes ::
Ptr Path ->
IO Word32
pathGetNNodes ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m Word32
pathGetNNodes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m Word32
pathGetNNodes a
path = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Word32
result <- Ptr Path -> IO Word32
clutter_path_get_n_nodes Ptr Path
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data PathGetNNodesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsPath a) => O.OverloadedMethod PathGetNNodesMethodInfo a signature where
overloadedMethod = pathGetNNodes
instance O.OverloadedMethodInfo PathGetNNodesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetNNodes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetNNodes"
})
#endif
foreign import ccall "clutter_path_get_node" clutter_path_get_node ::
Ptr Path ->
Word32 ->
Ptr Clutter.PathNode.PathNode ->
IO ()
pathGetNode ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Word32
-> m (Clutter.PathNode.PathNode)
pathGetNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Word32 -> m PathNode
pathGetNode a
path Word32
index_ = IO PathNode -> m PathNode
forall a. IO a -> m a
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 Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr PathNode
node <- Int -> IO (Ptr PathNode)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
28 :: IO (Ptr Clutter.PathNode.PathNode)
Ptr Path -> Word32 -> Ptr PathNode -> IO ()
clutter_path_get_node Ptr Path
path' Word32
index_ Ptr PathNode
node
PathNode
node' <- ((ManagedPtr PathNode -> PathNode) -> Ptr PathNode -> IO PathNode
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr PathNode -> PathNode
Clutter.PathNode.PathNode) Ptr PathNode
node
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
PathNode -> IO PathNode
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return PathNode
node'
#if defined(ENABLE_OVERLOADING)
data PathGetNodeMethodInfo
instance (signature ~ (Word32 -> m (Clutter.PathNode.PathNode)), MonadIO m, IsPath a) => O.OverloadedMethod PathGetNodeMethodInfo a signature where
overloadedMethod = pathGetNode
instance O.OverloadedMethodInfo PathGetNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetNode"
})
#endif
foreign import ccall "clutter_path_get_nodes" clutter_path_get_nodes ::
Ptr Path ->
IO (Ptr (GSList (Ptr Clutter.PathNode.PathNode)))
pathGetNodes ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> m [Clutter.PathNode.PathNode]
pathGetNodes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> m [PathNode]
pathGetNodes a
path = IO [PathNode] -> m [PathNode]
forall a. IO a -> m a
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 Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr (GSList (Ptr PathNode))
result <- Ptr Path -> IO (Ptr (GSList (Ptr PathNode)))
clutter_path_get_nodes Ptr Path
path'
[Ptr PathNode]
result' <- Ptr (GSList (Ptr PathNode)) -> IO [Ptr PathNode]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr PathNode))
result
[PathNode]
result'' <- (Ptr PathNode -> IO PathNode) -> [Ptr PathNode] -> IO [PathNode]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr PathNode -> PathNode) -> Ptr PathNode -> IO PathNode
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr PathNode -> PathNode
Clutter.PathNode.PathNode) [Ptr PathNode]
result'
Ptr (GSList (Ptr PathNode)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr PathNode))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
[PathNode] -> IO [PathNode]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [PathNode]
result''
#if defined(ENABLE_OVERLOADING)
data PathGetNodesMethodInfo
instance (signature ~ (m [Clutter.PathNode.PathNode]), MonadIO m, IsPath a) => O.OverloadedMethod PathGetNodesMethodInfo a signature where
overloadedMethod = pathGetNodes
instance O.OverloadedMethodInfo PathGetNodesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetNodes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetNodes"
})
#endif
foreign import ccall "clutter_path_get_position" clutter_path_get_position ::
Ptr Path ->
CDouble ->
Ptr Clutter.Knot.Knot ->
IO Word32
pathGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Double
-> m ((Word32, Clutter.Knot.Knot))
pathGetPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Double -> m (Word32, Knot)
pathGetPosition a
path Double
progress = IO (Word32, Knot) -> m (Word32, Knot)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Knot) -> m (Word32, Knot))
-> IO (Word32, Knot) -> m (Word32, Knot)
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
let progress' :: CDouble
progress' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
progress
Ptr Knot
position <- Int -> IO (Ptr Knot)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Clutter.Knot.Knot)
Word32
result <- Ptr Path -> CDouble -> Ptr Knot -> IO Word32
clutter_path_get_position Ptr Path
path' CDouble
progress' Ptr Knot
position
Knot
position' <- ((ManagedPtr Knot -> Knot) -> Ptr Knot -> IO Knot
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Knot -> Knot
Clutter.Knot.Knot) Ptr Knot
position
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
(Word32, Knot) -> IO (Word32, Knot)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
result, Knot
position')
#if defined(ENABLE_OVERLOADING)
data PathGetPositionMethodInfo
instance (signature ~ (Double -> m ((Word32, Clutter.Knot.Knot))), MonadIO m, IsPath a) => O.OverloadedMethod PathGetPositionMethodInfo a signature where
overloadedMethod = pathGetPosition
instance O.OverloadedMethodInfo PathGetPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathGetPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathGetPosition"
})
#endif
foreign import ccall "clutter_path_insert_node" clutter_path_insert_node ::
Ptr Path ->
Int32 ->
Ptr Clutter.PathNode.PathNode ->
IO ()
pathInsertNode ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Int32
-> Clutter.PathNode.PathNode
-> m ()
pathInsertNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Int32 -> PathNode -> m ()
pathInsertNode a
path Int32
index_ PathNode
node = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr PathNode
node' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
node
Ptr Path -> Int32 -> Ptr PathNode -> IO ()
clutter_path_insert_node Ptr Path
path' Int32
index_ Ptr PathNode
node'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
node
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathInsertNodeMethodInfo
instance (signature ~ (Int32 -> Clutter.PathNode.PathNode -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathInsertNodeMethodInfo a signature where
overloadedMethod = pathInsertNode
instance O.OverloadedMethodInfo PathInsertNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathInsertNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathInsertNode"
})
#endif
foreign import ccall "clutter_path_remove_node" clutter_path_remove_node ::
Ptr Path ->
Word32 ->
IO ()
pathRemoveNode ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Word32
-> m ()
pathRemoveNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Word32 -> m ()
pathRemoveNode a
path Word32
index_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Path -> Word32 -> IO ()
clutter_path_remove_node Ptr Path
path' Word32
index_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathRemoveNodeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathRemoveNodeMethodInfo a signature where
overloadedMethod = pathRemoveNode
instance O.OverloadedMethodInfo PathRemoveNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathRemoveNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathRemoveNode"
})
#endif
foreign import ccall "clutter_path_replace_node" clutter_path_replace_node ::
Ptr Path ->
Word32 ->
Ptr Clutter.PathNode.PathNode ->
IO ()
pathReplaceNode ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Word32
-> Clutter.PathNode.PathNode
-> m ()
pathReplaceNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Word32 -> PathNode -> m ()
pathReplaceNode a
path Word32
index_ PathNode
node = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr PathNode
node' <- PathNode -> IO (Ptr PathNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PathNode
node
Ptr Path -> Word32 -> Ptr PathNode -> IO ()
clutter_path_replace_node Ptr Path
path' Word32
index_ Ptr PathNode
node'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
PathNode -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PathNode
node
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathReplaceNodeMethodInfo
instance (signature ~ (Word32 -> Clutter.PathNode.PathNode -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathReplaceNodeMethodInfo a signature where
overloadedMethod = pathReplaceNode
instance O.OverloadedMethodInfo PathReplaceNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathReplaceNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathReplaceNode"
})
#endif
foreign import ccall "clutter_path_set_description" clutter_path_set_description ::
Ptr Path ->
CString ->
IO CInt
pathSetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> T.Text
-> m Bool
pathSetDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Text -> m Bool
pathSetDescription a
path Text
str = IO Bool -> m Bool
forall a. IO a -> m a
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 Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
CString
str' <- Text -> IO CString
textToCString Text
str
CInt
result <- Ptr Path -> CString -> IO CInt
clutter_path_set_description Ptr Path
path' CString
str'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PathSetDescriptionMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsPath a) => O.OverloadedMethod PathSetDescriptionMethodInfo a signature where
overloadedMethod = pathSetDescription
instance O.OverloadedMethodInfo PathSetDescriptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathSetDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathSetDescription"
})
#endif
foreign import ccall "clutter_path_to_cairo_path" clutter_path_to_cairo_path ::
Ptr Path ->
Ptr Cairo.Context.Context ->
IO ()
pathToCairoPath ::
(B.CallStack.HasCallStack, MonadIO m, IsPath a) =>
a
-> Cairo.Context.Context
-> m ()
pathToCairoPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPath a) =>
a -> Context -> m ()
pathToCairoPath a
path Context
cr = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Path
path' <- a -> IO (Ptr Path)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
path
Ptr Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
Ptr Path -> Ptr Context -> IO ()
clutter_path_to_cairo_path Ptr Path
path' Ptr Context
cr'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
path
Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PathToCairoPathMethodInfo
instance (signature ~ (Cairo.Context.Context -> m ()), MonadIO m, IsPath a) => O.OverloadedMethod PathToCairoPathMethodInfo a signature where
overloadedMethod = pathToCairoPath
instance O.OverloadedMethodInfo PathToCairoPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Path.pathToCairoPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Path.html#v:pathToCairoPath"
})
#endif