{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GES.Objects.Asset
(
Asset(..) ,
IsAsset ,
toAsset ,
#if defined(ENABLE_OVERLOADING)
ResolveAssetMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AssetExtractMethodInfo ,
#endif
assetExtract ,
#if defined(ENABLE_OVERLOADING)
AssetGetErrorMethodInfo ,
#endif
assetGetError ,
#if defined(ENABLE_OVERLOADING)
AssetGetExtractableTypeMethodInfo ,
#endif
assetGetExtractableType ,
#if defined(ENABLE_OVERLOADING)
AssetGetIdMethodInfo ,
#endif
assetGetId ,
#if defined(ENABLE_OVERLOADING)
AssetGetProxyMethodInfo ,
#endif
assetGetProxy ,
#if defined(ENABLE_OVERLOADING)
AssetGetProxyTargetMethodInfo ,
#endif
assetGetProxyTarget ,
#if defined(ENABLE_OVERLOADING)
AssetListProxiesMethodInfo ,
#endif
assetListProxies ,
assetNeedsReload ,
assetRequest ,
assetRequestAsync ,
assetRequestFinish ,
#if defined(ENABLE_OVERLOADING)
AssetSetProxyMethodInfo ,
#endif
assetSetProxy ,
#if defined(ENABLE_OVERLOADING)
AssetUnproxyMethodInfo ,
#endif
assetUnproxy ,
#if defined(ENABLE_OVERLOADING)
AssetExtractableTypePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
assetExtractableType ,
#endif
constructAssetExtractableType ,
getAssetExtractableType ,
#if defined(ENABLE_OVERLOADING)
AssetIdPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
assetId ,
#endif
constructAssetId ,
getAssetId ,
#if defined(ENABLE_OVERLOADING)
AssetProxyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
assetProxy ,
#endif
clearAssetProxy ,
constructAssetProxy ,
getAssetProxy ,
setAssetProxy ,
#if defined(ENABLE_OVERLOADING)
AssetProxyTargetPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
assetProxyTarget ,
#endif
getAssetProxyTarget ,
) 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 {-# SOURCE #-} qualified GI.GES.Interfaces.Extractable as GES.Extractable
import {-# SOURCE #-} qualified GI.GES.Interfaces.MetaContainer as GES.MetaContainer
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
newtype Asset = Asset (SP.ManagedPtr Asset)
deriving (Asset -> Asset -> Bool
(Asset -> Asset -> Bool) -> (Asset -> Asset -> Bool) -> Eq Asset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Asset -> Asset -> Bool
== :: Asset -> Asset -> Bool
$c/= :: Asset -> Asset -> Bool
/= :: Asset -> Asset -> Bool
Eq)
instance SP.ManagedPtrNewtype Asset where
toManagedPtr :: Asset -> ManagedPtr Asset
toManagedPtr (Asset ManagedPtr Asset
p) = ManagedPtr Asset
p
foreign import ccall "ges_asset_get_type"
c_ges_asset_get_type :: IO B.Types.GType
instance B.Types.TypedObject Asset where
glibType :: IO GType
glibType = IO GType
c_ges_asset_get_type
instance B.Types.GObject Asset
class (SP.GObject o, O.IsDescendantOf Asset o) => IsAsset o
instance (SP.GObject o, O.IsDescendantOf Asset o) => IsAsset o
instance O.HasParentTypes Asset
type instance O.ParentTypes Asset = '[GObject.Object.Object, GES.MetaContainer.MetaContainer, Gio.AsyncInitable.AsyncInitable, Gio.Initable.Initable]
toAsset :: (MIO.MonadIO m, IsAsset o) => o -> m Asset
toAsset :: forall (m :: * -> *) o. (MonadIO m, IsAsset o) => o -> m Asset
toAsset = IO Asset -> m Asset
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Asset -> m Asset) -> (o -> IO Asset) -> o -> m Asset
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Asset -> Asset) -> o -> IO Asset
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Asset -> Asset
Asset
instance B.GValue.IsGValue (Maybe Asset) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_asset_get_type
gvalueSet_ :: Ptr GValue -> Maybe Asset -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Asset
P.Nothing = Ptr GValue -> Ptr Asset -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Asset
forall a. Ptr a
FP.nullPtr :: FP.Ptr Asset)
gvalueSet_ Ptr GValue
gv (P.Just Asset
obj) = Asset -> (Ptr Asset -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Asset
obj (Ptr GValue -> Ptr Asset -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Asset)
gvalueGet_ Ptr GValue
gv = do
Ptr Asset
ptr <- Ptr GValue -> IO (Ptr Asset)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Asset)
if Ptr Asset
ptr Ptr Asset -> Ptr Asset -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Asset
forall a. Ptr a
FP.nullPtr
then Asset -> Maybe Asset
forall a. a -> Maybe a
P.Just (Asset -> Maybe Asset) -> IO Asset -> IO (Maybe Asset)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Asset -> Asset
Asset Ptr Asset
ptr
else Maybe Asset -> IO (Maybe Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Asset
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAssetMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveAssetMethod "addMetasFromString" o = GES.MetaContainer.MetaContainerAddMetasFromStringMethodInfo
ResolveAssetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAssetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAssetMethod "checkMetaRegistered" o = GES.MetaContainer.MetaContainerCheckMetaRegisteredMethodInfo
ResolveAssetMethod "extract" o = AssetExtractMethodInfo
ResolveAssetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAssetMethod "foreach" o = GES.MetaContainer.MetaContainerForeachMethodInfo
ResolveAssetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAssetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAssetMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveAssetMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo
ResolveAssetMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo
ResolveAssetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAssetMethod "listProxies" o = AssetListProxiesMethodInfo
ResolveAssetMethod "metasToString" o = GES.MetaContainer.MetaContainerMetasToStringMethodInfo
ResolveAssetMethod "newFinish" o = Gio.AsyncInitable.AsyncInitableNewFinishMethodInfo
ResolveAssetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAssetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAssetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAssetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAssetMethod "registerMeta" o = GES.MetaContainer.MetaContainerRegisterMetaMethodInfo
ResolveAssetMethod "registerMetaBoolean" o = GES.MetaContainer.MetaContainerRegisterMetaBooleanMethodInfo
ResolveAssetMethod "registerMetaDate" o = GES.MetaContainer.MetaContainerRegisterMetaDateMethodInfo
ResolveAssetMethod "registerMetaDateTime" o = GES.MetaContainer.MetaContainerRegisterMetaDateTimeMethodInfo
ResolveAssetMethod "registerMetaDouble" o = GES.MetaContainer.MetaContainerRegisterMetaDoubleMethodInfo
ResolveAssetMethod "registerMetaFloat" o = GES.MetaContainer.MetaContainerRegisterMetaFloatMethodInfo
ResolveAssetMethod "registerMetaInt" o = GES.MetaContainer.MetaContainerRegisterMetaIntMethodInfo
ResolveAssetMethod "registerMetaInt64" o = GES.MetaContainer.MetaContainerRegisterMetaInt64MethodInfo
ResolveAssetMethod "registerMetaString" o = GES.MetaContainer.MetaContainerRegisterMetaStringMethodInfo
ResolveAssetMethod "registerMetaUint" o = GES.MetaContainer.MetaContainerRegisterMetaUintMethodInfo
ResolveAssetMethod "registerMetaUint64" o = GES.MetaContainer.MetaContainerRegisterMetaUint64MethodInfo
ResolveAssetMethod "registerStaticMeta" o = GES.MetaContainer.MetaContainerRegisterStaticMetaMethodInfo
ResolveAssetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAssetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAssetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAssetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAssetMethod "unproxy" o = AssetUnproxyMethodInfo
ResolveAssetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAssetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAssetMethod "getBoolean" o = GES.MetaContainer.MetaContainerGetBooleanMethodInfo
ResolveAssetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAssetMethod "getDate" o = GES.MetaContainer.MetaContainerGetDateMethodInfo
ResolveAssetMethod "getDateTime" o = GES.MetaContainer.MetaContainerGetDateTimeMethodInfo
ResolveAssetMethod "getDouble" o = GES.MetaContainer.MetaContainerGetDoubleMethodInfo
ResolveAssetMethod "getError" o = AssetGetErrorMethodInfo
ResolveAssetMethod "getExtractableType" o = AssetGetExtractableTypeMethodInfo
ResolveAssetMethod "getFloat" o = GES.MetaContainer.MetaContainerGetFloatMethodInfo
ResolveAssetMethod "getId" o = AssetGetIdMethodInfo
ResolveAssetMethod "getInt" o = GES.MetaContainer.MetaContainerGetIntMethodInfo
ResolveAssetMethod "getInt64" o = GES.MetaContainer.MetaContainerGetInt64MethodInfo
ResolveAssetMethod "getMarkerList" o = GES.MetaContainer.MetaContainerGetMarkerListMethodInfo
ResolveAssetMethod "getMeta" o = GES.MetaContainer.MetaContainerGetMetaMethodInfo
ResolveAssetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAssetMethod "getProxy" o = AssetGetProxyMethodInfo
ResolveAssetMethod "getProxyTarget" o = AssetGetProxyTargetMethodInfo
ResolveAssetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAssetMethod "getString" o = GES.MetaContainer.MetaContainerGetStringMethodInfo
ResolveAssetMethod "getUint" o = GES.MetaContainer.MetaContainerGetUintMethodInfo
ResolveAssetMethod "getUint64" o = GES.MetaContainer.MetaContainerGetUint64MethodInfo
ResolveAssetMethod "setBoolean" o = GES.MetaContainer.MetaContainerSetBooleanMethodInfo
ResolveAssetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAssetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAssetMethod "setDate" o = GES.MetaContainer.MetaContainerSetDateMethodInfo
ResolveAssetMethod "setDateTime" o = GES.MetaContainer.MetaContainerSetDateTimeMethodInfo
ResolveAssetMethod "setDouble" o = GES.MetaContainer.MetaContainerSetDoubleMethodInfo
ResolveAssetMethod "setFloat" o = GES.MetaContainer.MetaContainerSetFloatMethodInfo
ResolveAssetMethod "setInt" o = GES.MetaContainer.MetaContainerSetIntMethodInfo
ResolveAssetMethod "setInt64" o = GES.MetaContainer.MetaContainerSetInt64MethodInfo
ResolveAssetMethod "setMarkerList" o = GES.MetaContainer.MetaContainerSetMarkerListMethodInfo
ResolveAssetMethod "setMeta" o = GES.MetaContainer.MetaContainerSetMetaMethodInfo
ResolveAssetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAssetMethod "setProxy" o = AssetSetProxyMethodInfo
ResolveAssetMethod "setString" o = GES.MetaContainer.MetaContainerSetStringMethodInfo
ResolveAssetMethod "setUint" o = GES.MetaContainer.MetaContainerSetUintMethodInfo
ResolveAssetMethod "setUint64" o = GES.MetaContainer.MetaContainerSetUint64MethodInfo
ResolveAssetMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAssetMethod t Asset, O.OverloadedMethod info Asset p) => OL.IsLabel t (Asset -> 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 ~ ResolveAssetMethod t Asset, O.OverloadedMethod info Asset p, R.HasField t Asset p) => R.HasField t Asset p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAssetMethod t Asset, O.OverloadedMethodInfo info Asset) => OL.IsLabel t (O.MethodProxy info Asset) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getAssetExtractableType :: (MonadIO m, IsAsset o) => o -> m GType
o
obj = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO GType
forall a. GObject a => a -> String -> IO GType
B.Properties.getObjectPropertyGType o
obj String
"extractable-type"
constructAssetExtractableType :: (IsAsset o, MIO.MonadIO m) => GType -> m (GValueConstruct o)
GType
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 -> GType -> IO (GValueConstruct o)
forall o. String -> GType -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyGType String
"extractable-type" GType
val
#if defined(ENABLE_OVERLOADING)
data AssetExtractableTypePropertyInfo
instance AttrInfo AssetExtractableTypePropertyInfo where
type AttrAllowedOps AssetExtractableTypePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AssetExtractableTypePropertyInfo = IsAsset
type AttrSetTypeConstraint AssetExtractableTypePropertyInfo = (~) GType
type AttrTransferTypeConstraint AssetExtractableTypePropertyInfo = (~) GType
type AttrTransferType AssetExtractableTypePropertyInfo = GType
type AttrGetType AssetExtractableTypePropertyInfo = GType
type AttrLabel AssetExtractableTypePropertyInfo = "extractable-type"
type AttrOrigin AssetExtractableTypePropertyInfo = Asset
attrGet = getAssetExtractableType
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructAssetExtractableType
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.extractableType"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#g:attr:extractableType"
})
#endif
getAssetId :: (MonadIO m, IsAsset o) => o -> m T.Text
getAssetId :: forall (m :: * -> *) o. (MonadIO m, IsAsset o) => o -> m Text
getAssetId o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getAssetId" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO 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
"id"
constructAssetId :: (IsAsset o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructAssetId :: forall o (m :: * -> *).
(IsAsset o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructAssetId 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
"id" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data AssetIdPropertyInfo
instance AttrInfo AssetIdPropertyInfo where
type AttrAllowedOps AssetIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AssetIdPropertyInfo = IsAsset
type AttrSetTypeConstraint AssetIdPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint AssetIdPropertyInfo = (~) T.Text
type AttrTransferType AssetIdPropertyInfo = T.Text
type AttrGetType AssetIdPropertyInfo = T.Text
type AttrLabel AssetIdPropertyInfo = "id"
type AttrOrigin AssetIdPropertyInfo = Asset
attrGet = getAssetId
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructAssetId
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.id"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#g:attr:id"
})
#endif
getAssetProxy :: (MonadIO m, IsAsset o) => o -> m (Maybe Asset)
getAssetProxy :: forall (m :: * -> *) o.
(MonadIO m, IsAsset o) =>
o -> m (Maybe Asset)
getAssetProxy o
obj = IO (Maybe Asset) -> m (Maybe Asset)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Asset) -> m (Maybe Asset))
-> IO (Maybe Asset) -> m (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Asset -> Asset) -> IO (Maybe Asset)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"proxy" ManagedPtr Asset -> Asset
Asset
setAssetProxy :: (MonadIO m, IsAsset o, IsAsset a) => o -> a -> m ()
setAssetProxy :: forall (m :: * -> *) o a.
(MonadIO m, IsAsset o, IsAsset a) =>
o -> a -> m ()
setAssetProxy o
obj a
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 a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"proxy" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructAssetProxy :: (IsAsset o, MIO.MonadIO m, IsAsset a) => a -> m (GValueConstruct o)
constructAssetProxy :: forall o (m :: * -> *) a.
(IsAsset o, MonadIO m, IsAsset a) =>
a -> m (GValueConstruct o)
constructAssetProxy a
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 a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"proxy" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearAssetProxy :: (MonadIO m, IsAsset o) => o -> m ()
clearAssetProxy :: forall (m :: * -> *) o. (MonadIO m, IsAsset o) => o -> m ()
clearAssetProxy 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 Asset -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"proxy" (Maybe Asset
forall a. Maybe a
Nothing :: Maybe Asset)
#if defined(ENABLE_OVERLOADING)
data AssetProxyPropertyInfo
instance AttrInfo AssetProxyPropertyInfo where
type AttrAllowedOps AssetProxyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AssetProxyPropertyInfo = IsAsset
type AttrSetTypeConstraint AssetProxyPropertyInfo = IsAsset
type AttrTransferTypeConstraint AssetProxyPropertyInfo = IsAsset
type AttrTransferType AssetProxyPropertyInfo = Asset
type AttrGetType AssetProxyPropertyInfo = (Maybe Asset)
type AttrLabel AssetProxyPropertyInfo = "proxy"
type AttrOrigin AssetProxyPropertyInfo = Asset
attrGet = getAssetProxy
attrSet = setAssetProxy
attrTransfer _ v = do
unsafeCastTo Asset v
attrConstruct = constructAssetProxy
attrClear = clearAssetProxy
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.proxy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#g:attr:proxy"
})
#endif
getAssetProxyTarget :: (MonadIO m, IsAsset o) => o -> m (Maybe Asset)
getAssetProxyTarget :: forall (m :: * -> *) o.
(MonadIO m, IsAsset o) =>
o -> m (Maybe Asset)
getAssetProxyTarget o
obj = IO (Maybe Asset) -> m (Maybe Asset)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Asset) -> m (Maybe Asset))
-> IO (Maybe Asset) -> m (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Asset -> Asset) -> IO (Maybe Asset)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"proxy-target" ManagedPtr Asset -> Asset
Asset
#if defined(ENABLE_OVERLOADING)
data AssetProxyTargetPropertyInfo
instance AttrInfo AssetProxyTargetPropertyInfo where
type AttrAllowedOps AssetProxyTargetPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AssetProxyTargetPropertyInfo = IsAsset
type AttrSetTypeConstraint AssetProxyTargetPropertyInfo = (~) ()
type AttrTransferTypeConstraint AssetProxyTargetPropertyInfo = (~) ()
type AttrTransferType AssetProxyTargetPropertyInfo = ()
type AttrGetType AssetProxyTargetPropertyInfo = (Maybe Asset)
type AttrLabel AssetProxyTargetPropertyInfo = "proxy-target"
type AttrOrigin AssetProxyTargetPropertyInfo = Asset
attrGet = getAssetProxyTarget
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.proxyTarget"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#g:attr:proxyTarget"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Asset
type instance O.AttributeList Asset = AssetAttributeList
type AssetAttributeList = ('[ '("extractableType", AssetExtractableTypePropertyInfo), '("id", AssetIdPropertyInfo), '("proxy", AssetProxyPropertyInfo), '("proxyTarget", AssetProxyTargetPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
assetExtractableType :: AttrLabelProxy "extractableType"
assetExtractableType = AttrLabelProxy
assetId :: AttrLabelProxy "id"
assetId = AttrLabelProxy
assetProxy :: AttrLabelProxy "proxy"
assetProxy = AttrLabelProxy
assetProxyTarget :: AttrLabelProxy "proxyTarget"
assetProxyTarget = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Asset = AssetSignalList
type AssetSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("notifyMeta", GES.MetaContainer.MetaContainerNotifyMetaSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "ges_asset_extract" ::
Ptr Asset ->
Ptr (Ptr GError) ->
IO (Ptr GES.Extractable.Extractable)
assetExtract ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m GES.Extractable.Extractable
a
self = IO Extractable -> m Extractable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Extractable -> m Extractable)
-> IO Extractable -> m Extractable
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
self' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
IO Extractable -> IO () -> IO Extractable
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Extractable
result <- (Ptr (Ptr GError) -> IO (Ptr Extractable)) -> IO (Ptr Extractable)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Extractable))
-> IO (Ptr Extractable))
-> (Ptr (Ptr GError) -> IO (Ptr Extractable))
-> IO (Ptr Extractable)
forall a b. (a -> b) -> a -> b
$ Ptr Asset -> Ptr (Ptr GError) -> IO (Ptr Extractable)
ges_asset_extract Ptr Asset
self'
Text -> Ptr Extractable -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"assetExtract" Ptr Extractable
result
Extractable
result' <- ((ManagedPtr Extractable -> Extractable)
-> Ptr Extractable -> IO Extractable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Extractable -> Extractable
GES.Extractable.Extractable) Ptr Extractable
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Extractable -> IO Extractable
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Extractable
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data AssetExtractMethodInfo
instance (signature ~ (m GES.Extractable.Extractable), MonadIO m, IsAsset a) => O.OverloadedMethod AssetExtractMethodInfo a signature where
overloadedMethod = assetExtract
instance O.OverloadedMethodInfo AssetExtractMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetExtract",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetExtract"
})
#endif
foreign import ccall "ges_asset_get_error" ges_asset_get_error ::
Ptr Asset ->
IO (Ptr GError)
assetGetError ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m (Maybe GError)
assetGetError :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsset a) =>
a -> m (Maybe GError)
assetGetError a
self = IO (Maybe GError) -> m (Maybe GError)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GError) -> m (Maybe GError))
-> IO (Maybe GError) -> m (Maybe GError)
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
self' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr GError
result <- Ptr Asset -> IO (Ptr GError)
ges_asset_get_error Ptr Asset
self'
Maybe GError
maybeResult <- Ptr GError -> (Ptr GError -> IO GError) -> IO (Maybe GError)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GError
result ((Ptr GError -> IO GError) -> IO (Maybe GError))
-> (Ptr GError -> IO GError) -> IO (Maybe GError)
forall a b. (a -> b) -> a -> b
$ \Ptr GError
result' -> do
GError
result'' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
result'
GError -> IO GError
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GError
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe GError -> IO (Maybe GError)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GError
maybeResult
#if defined(ENABLE_OVERLOADING)
data AssetGetErrorMethodInfo
instance (signature ~ (m (Maybe GError)), MonadIO m, IsAsset a) => O.OverloadedMethod AssetGetErrorMethodInfo a signature where
overloadedMethod = assetGetError
instance O.OverloadedMethodInfo AssetGetErrorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetGetError",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetGetError"
})
#endif
foreign import ccall "ges_asset_get_extractable_type" ::
Ptr Asset ->
IO CGType
assetGetExtractableType ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m GType
a
self = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
self' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CGType
result <- Ptr Asset -> IO CGType
ges_asset_get_extractable_type Ptr Asset
self'
let result' :: GType
result' = CGType -> GType
GType CGType
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
#if defined(ENABLE_OVERLOADING)
data AssetGetExtractableTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsAsset a) => O.OverloadedMethod AssetGetExtractableTypeMethodInfo a signature where
overloadedMethod = assetGetExtractableType
instance O.OverloadedMethodInfo AssetGetExtractableTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetGetExtractableType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetGetExtractableType"
})
#endif
foreign import ccall "ges_asset_get_id" ges_asset_get_id ::
Ptr Asset ->
IO CString
assetGetId ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m T.Text
assetGetId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsset a) =>
a -> m Text
assetGetId a
self = 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 Asset
self' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
result <- Ptr Asset -> IO CString
ges_asset_get_id Ptr Asset
self'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"assetGetId" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data AssetGetIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAsset a) => O.OverloadedMethod AssetGetIdMethodInfo a signature where
overloadedMethod = assetGetId
instance O.OverloadedMethodInfo AssetGetIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetGetId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetGetId"
})
#endif
foreign import ccall "ges_asset_get_proxy" ges_asset_get_proxy ::
Ptr Asset ->
IO (Ptr Asset)
assetGetProxy ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m (Maybe Asset)
assetGetProxy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsset a) =>
a -> m (Maybe Asset)
assetGetProxy a
asset = IO (Maybe Asset) -> m (Maybe Asset)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Asset) -> m (Maybe Asset))
-> IO (Maybe Asset) -> m (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
asset' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr Asset
result <- Ptr Asset -> IO (Ptr Asset)
ges_asset_get_proxy Ptr Asset
asset'
Maybe Asset
maybeResult <- Ptr Asset -> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Asset
result ((Ptr Asset -> IO Asset) -> IO (Maybe Asset))
-> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ \Ptr Asset
result' -> do
Asset
result'' <- ((ManagedPtr Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Asset -> Asset
Asset) Ptr Asset
result'
Asset -> IO Asset
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Asset
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
asset
Maybe Asset -> IO (Maybe Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Asset
maybeResult
#if defined(ENABLE_OVERLOADING)
data AssetGetProxyMethodInfo
instance (signature ~ (m (Maybe Asset)), MonadIO m, IsAsset a) => O.OverloadedMethod AssetGetProxyMethodInfo a signature where
overloadedMethod = assetGetProxy
instance O.OverloadedMethodInfo AssetGetProxyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetGetProxy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetGetProxy"
})
#endif
foreign import ccall "ges_asset_get_proxy_target" ges_asset_get_proxy_target ::
Ptr Asset ->
IO (Ptr Asset)
assetGetProxyTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m (Maybe Asset)
assetGetProxyTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsset a) =>
a -> m (Maybe Asset)
assetGetProxyTarget a
proxy = IO (Maybe Asset) -> m (Maybe Asset)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Asset) -> m (Maybe Asset))
-> IO (Maybe Asset) -> m (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
proxy' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
Ptr Asset
result <- Ptr Asset -> IO (Ptr Asset)
ges_asset_get_proxy_target Ptr Asset
proxy'
Maybe Asset
maybeResult <- Ptr Asset -> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Asset
result ((Ptr Asset -> IO Asset) -> IO (Maybe Asset))
-> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ \Ptr Asset
result' -> do
Asset
result'' <- ((ManagedPtr Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Asset -> Asset
Asset) Ptr Asset
result'
Asset -> IO Asset
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Asset
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
proxy
Maybe Asset -> IO (Maybe Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Asset
maybeResult
#if defined(ENABLE_OVERLOADING)
data AssetGetProxyTargetMethodInfo
instance (signature ~ (m (Maybe Asset)), MonadIO m, IsAsset a) => O.OverloadedMethod AssetGetProxyTargetMethodInfo a signature where
overloadedMethod = assetGetProxyTarget
instance O.OverloadedMethodInfo AssetGetProxyTargetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetGetProxyTarget",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetGetProxyTarget"
})
#endif
foreign import ccall "ges_asset_list_proxies" ges_asset_list_proxies ::
Ptr Asset ->
IO (Ptr (GList (Ptr Asset)))
assetListProxies ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a) =>
a
-> m [Asset]
assetListProxies :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsset a) =>
a -> m [Asset]
assetListProxies a
asset = IO [Asset] -> m [Asset]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Asset] -> m [Asset]) -> IO [Asset] -> m [Asset]
forall a b. (a -> b) -> a -> b
$ do
Ptr Asset
asset' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr (GList (Ptr Asset))
result <- Ptr Asset -> IO (Ptr (GList (Ptr Asset)))
ges_asset_list_proxies Ptr Asset
asset'
[Ptr Asset]
result' <- Ptr (GList (Ptr Asset)) -> IO [Ptr Asset]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Asset))
result
[Asset]
result'' <- (Ptr Asset -> IO Asset) -> [Ptr Asset] -> IO [Asset]
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 Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Asset -> Asset
Asset) [Ptr Asset]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
asset
[Asset] -> IO [Asset]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Asset]
result''
#if defined(ENABLE_OVERLOADING)
data AssetListProxiesMethodInfo
instance (signature ~ (m [Asset]), MonadIO m, IsAsset a) => O.OverloadedMethod AssetListProxiesMethodInfo a signature where
overloadedMethod = assetListProxies
instance O.OverloadedMethodInfo AssetListProxiesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetListProxies",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetListProxies"
})
#endif
foreign import ccall "ges_asset_set_proxy" ges_asset_set_proxy ::
Ptr Asset ->
Ptr Asset ->
IO CInt
assetSetProxy ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a, IsAsset b) =>
a
-> Maybe (b)
-> m Bool
assetSetProxy :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAsset a, IsAsset b) =>
a -> Maybe b -> m Bool
assetSetProxy a
asset Maybe b
proxy = 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 Asset
asset' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr Asset
maybeProxy <- case Maybe b
proxy of
Maybe b
Nothing -> Ptr Asset -> IO (Ptr Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Asset
forall a. Ptr a
nullPtr
Just b
jProxy -> do
Ptr Asset
jProxy' <- b -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jProxy
Ptr Asset -> IO (Ptr Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Asset
jProxy'
CInt
result <- Ptr Asset -> Ptr Asset -> IO CInt
ges_asset_set_proxy Ptr Asset
asset' Ptr Asset
maybeProxy
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
asset
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
proxy b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AssetSetProxyMethodInfo
instance (signature ~ (Maybe (b) -> m Bool), MonadIO m, IsAsset a, IsAsset b) => O.OverloadedMethod AssetSetProxyMethodInfo a signature where
overloadedMethod = assetSetProxy
instance O.OverloadedMethodInfo AssetSetProxyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetSetProxy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetSetProxy"
})
#endif
foreign import ccall "ges_asset_unproxy" ges_asset_unproxy ::
Ptr Asset ->
Ptr Asset ->
IO CInt
assetUnproxy ::
(B.CallStack.HasCallStack, MonadIO m, IsAsset a, IsAsset b) =>
a
-> b
-> m Bool
assetUnproxy :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAsset a, IsAsset b) =>
a -> b -> m Bool
assetUnproxy a
asset b
proxy = 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 Asset
asset' <- a -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr Asset
proxy' <- b -> IO (Ptr Asset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
proxy
CInt
result <- Ptr Asset -> Ptr Asset -> IO CInt
ges_asset_unproxy Ptr Asset
asset' Ptr Asset
proxy'
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
asset
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
proxy
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AssetUnproxyMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsAsset a, IsAsset b) => O.OverloadedMethod AssetUnproxyMethodInfo a signature where
overloadedMethod = assetUnproxy
instance O.OverloadedMethodInfo AssetUnproxyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.Asset.assetUnproxy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Asset.html#v:assetUnproxy"
})
#endif
foreign import ccall "ges_asset_needs_reload" ges_asset_needs_reload ::
CGType ->
CString ->
IO CInt
assetNeedsReload ::
(B.CallStack.HasCallStack, MonadIO m) =>
GType
-> Maybe (T.Text)
-> m Bool
assetNeedsReload :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GType -> Maybe Text -> m Bool
assetNeedsReload GType
extractableType Maybe Text
id = 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
let extractableType' :: CGType
extractableType' = GType -> CGType
gtypeToCGType GType
extractableType
CString
maybeId <- case Maybe Text
id of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jId -> do
CString
jId' <- Text -> IO CString
textToCString Text
jId
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jId'
CInt
result <- CGType -> CString -> IO CInt
ges_asset_needs_reload CGType
extractableType' CString
maybeId
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeId
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ges_asset_request" ges_asset_request ::
CGType ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Asset)
assetRequest ::
(B.CallStack.HasCallStack, MonadIO m) =>
GType
-> Maybe (T.Text)
-> m (Maybe Asset)
assetRequest :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GType -> Maybe Text -> m (Maybe Asset)
assetRequest GType
extractableType Maybe Text
id = IO (Maybe Asset) -> m (Maybe Asset)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Asset) -> m (Maybe Asset))
-> IO (Maybe Asset) -> m (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ do
let extractableType' :: CGType
extractableType' = GType -> CGType
gtypeToCGType GType
extractableType
CString
maybeId <- case Maybe Text
id of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jId -> do
CString
jId' <- Text -> IO CString
textToCString Text
jId
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jId'
IO (Maybe Asset) -> IO () -> IO (Maybe Asset)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Asset
result <- (Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset))
-> (Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset)
forall a b. (a -> b) -> a -> b
$ CGType -> CString -> Ptr (Ptr GError) -> IO (Ptr Asset)
ges_asset_request CGType
extractableType' CString
maybeId
Maybe Asset
maybeResult <- Ptr Asset -> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Asset
result ((Ptr Asset -> IO Asset) -> IO (Maybe Asset))
-> (Ptr Asset -> IO Asset) -> IO (Maybe Asset)
forall a b. (a -> b) -> a -> b
$ \Ptr Asset
result' -> do
Asset
result'' <- ((ManagedPtr Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Asset -> Asset
Asset) Ptr Asset
result'
Asset -> IO Asset
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Asset
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeId
Maybe Asset -> IO (Maybe Asset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Asset
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeId
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ges_asset_request_async" ges_asset_request_async ::
CGType ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
assetRequestAsync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
GType
-> Maybe (T.Text)
-> Maybe (a)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
assetRequestAsync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
GType -> Maybe Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
assetRequestAsync GType
extractableType Maybe Text
id Maybe a
cancellable Maybe AsyncReadyCallback
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
let extractableType' :: CGType
extractableType' = GType -> CGType
gtypeToCGType GType
extractableType
CString
maybeId <- case Maybe Text
id of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jId -> do
CString
jId' <- Text -> IO CString
textToCString Text
jId
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jId'
Ptr Cancellable
maybeCancellable <- case Maybe a
cancellable of
Maybe a
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just a
jCancellable -> do
Ptr Cancellable
jCancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) AsyncReadyCallback
jCallback)
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CGType
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
ges_asset_request_async CGType
extractableType' CString
maybeId Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
cancellable a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeId
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ges_asset_request_finish" ges_asset_request_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Asset)
assetRequestFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m Asset
assetRequestFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncResult a) =>
a -> m Asset
assetRequestFinish a
res = IO Asset -> m Asset
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Asset -> m Asset) -> IO Asset -> m Asset
forall a b. (a -> b) -> a -> b
$ do
Ptr AsyncResult
res' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
IO Asset -> IO () -> IO Asset
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Asset
result <- (Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset))
-> (Ptr (Ptr GError) -> IO (Ptr Asset)) -> IO (Ptr Asset)
forall a b. (a -> b) -> a -> b
$ Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr Asset)
ges_asset_request_finish Ptr AsyncResult
res'
Text -> Ptr Asset -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"assetRequestFinish" Ptr Asset
result
Asset
result' <- ((ManagedPtr Asset -> Asset) -> Ptr Asset -> IO Asset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Asset -> Asset
Asset) Ptr Asset
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
res
Asset -> IO Asset
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Asset
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif