{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.ContentSerializer
(
ContentSerializer(..) ,
IsContentSerializer ,
toContentSerializer ,
#if defined(ENABLE_OVERLOADING)
ResolveContentSerializerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetCancellableMethodInfo,
#endif
contentSerializerGetCancellable ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetGtypeMethodInfo ,
#endif
contentSerializerGetGtype ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetMimeTypeMethodInfo ,
#endif
contentSerializerGetMimeType ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetOutputStreamMethodInfo,
#endif
contentSerializerGetOutputStream ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetPriorityMethodInfo ,
#endif
contentSerializerGetPriority ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetTaskDataMethodInfo ,
#endif
contentSerializerGetTaskData ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetUserDataMethodInfo ,
#endif
contentSerializerGetUserData ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerGetValueMethodInfo ,
#endif
contentSerializerGetValue ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerReturnErrorMethodInfo ,
#endif
contentSerializerReturnError ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerReturnSuccessMethodInfo,
#endif
contentSerializerReturnSuccess ,
#if defined(ENABLE_OVERLOADING)
ContentSerializerSetTaskDataMethodInfo ,
#endif
contentSerializerSetTaskData ,
) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
#else
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
#endif
newtype ContentSerializer = ContentSerializer (SP.ManagedPtr ContentSerializer)
deriving (ContentSerializer -> ContentSerializer -> Bool
(ContentSerializer -> ContentSerializer -> Bool)
-> (ContentSerializer -> ContentSerializer -> Bool)
-> Eq ContentSerializer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContentSerializer -> ContentSerializer -> Bool
== :: ContentSerializer -> ContentSerializer -> Bool
$c/= :: ContentSerializer -> ContentSerializer -> Bool
/= :: ContentSerializer -> ContentSerializer -> Bool
Eq)
instance SP.ManagedPtrNewtype ContentSerializer where
toManagedPtr :: ContentSerializer -> ManagedPtr ContentSerializer
toManagedPtr (ContentSerializer ManagedPtr ContentSerializer
p) = ManagedPtr ContentSerializer
p
foreign import ccall "gdk_content_serializer_get_type"
c_gdk_content_serializer_get_type :: IO B.Types.GType
instance B.Types.TypedObject ContentSerializer where
glibType :: IO GType
glibType = IO GType
c_gdk_content_serializer_get_type
instance B.Types.GObject ContentSerializer
class (SP.GObject o, O.IsDescendantOf ContentSerializer o) => IsContentSerializer o
instance (SP.GObject o, O.IsDescendantOf ContentSerializer o) => IsContentSerializer o
instance O.HasParentTypes ContentSerializer
type instance O.ParentTypes ContentSerializer = '[GObject.Object.Object, Gio.AsyncResult.AsyncResult]
toContentSerializer :: (MIO.MonadIO m, IsContentSerializer o) => o -> m ContentSerializer
toContentSerializer :: forall (m :: * -> *) o.
(MonadIO m, IsContentSerializer o) =>
o -> m ContentSerializer
toContentSerializer = IO ContentSerializer -> m ContentSerializer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ContentSerializer -> m ContentSerializer)
-> (o -> IO ContentSerializer) -> o -> m ContentSerializer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ContentSerializer -> ContentSerializer)
-> o -> IO ContentSerializer
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ContentSerializer -> ContentSerializer
ContentSerializer
instance B.GValue.IsGValue (Maybe ContentSerializer) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gdk_content_serializer_get_type
gvalueSet_ :: Ptr GValue -> Maybe ContentSerializer -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ContentSerializer
P.Nothing = Ptr GValue -> Ptr ContentSerializer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ContentSerializer
forall a. Ptr a
FP.nullPtr :: FP.Ptr ContentSerializer)
gvalueSet_ Ptr GValue
gv (P.Just ContentSerializer
obj) = ContentSerializer -> (Ptr ContentSerializer -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ContentSerializer
obj (Ptr GValue -> Ptr ContentSerializer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe ContentSerializer)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr ContentSerializer)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ContentSerializer)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject ContentSerializer ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveContentSerializerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveContentSerializerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveContentSerializerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveContentSerializerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveContentSerializerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveContentSerializerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveContentSerializerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveContentSerializerMethod "isTagged" o = Gio.AsyncResult.AsyncResultIsTaggedMethodInfo
ResolveContentSerializerMethod "legacyPropagateError" o = Gio.AsyncResult.AsyncResultLegacyPropagateErrorMethodInfo
ResolveContentSerializerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveContentSerializerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveContentSerializerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveContentSerializerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveContentSerializerMethod "returnError" o = ContentSerializerReturnErrorMethodInfo
ResolveContentSerializerMethod "returnSuccess" o = ContentSerializerReturnSuccessMethodInfo
ResolveContentSerializerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveContentSerializerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveContentSerializerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveContentSerializerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveContentSerializerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveContentSerializerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveContentSerializerMethod "getCancellable" o = ContentSerializerGetCancellableMethodInfo
ResolveContentSerializerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveContentSerializerMethod "getGtype" o = ContentSerializerGetGtypeMethodInfo
ResolveContentSerializerMethod "getMimeType" o = ContentSerializerGetMimeTypeMethodInfo
ResolveContentSerializerMethod "getOutputStream" o = ContentSerializerGetOutputStreamMethodInfo
ResolveContentSerializerMethod "getPriority" o = ContentSerializerGetPriorityMethodInfo
ResolveContentSerializerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveContentSerializerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveContentSerializerMethod "getSourceObject" o = Gio.AsyncResult.AsyncResultGetSourceObjectMethodInfo
ResolveContentSerializerMethod "getTaskData" o = ContentSerializerGetTaskDataMethodInfo
ResolveContentSerializerMethod "getUserData" o = ContentSerializerGetUserDataMethodInfo
ResolveContentSerializerMethod "getValue" o = ContentSerializerGetValueMethodInfo
ResolveContentSerializerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveContentSerializerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveContentSerializerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveContentSerializerMethod "setTaskData" o = ContentSerializerSetTaskDataMethodInfo
ResolveContentSerializerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveContentSerializerMethod t ContentSerializer, O.OverloadedMethod info ContentSerializer p) => OL.IsLabel t (ContentSerializer -> 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 ~ ResolveContentSerializerMethod t ContentSerializer, O.OverloadedMethod info ContentSerializer p, R.HasField t ContentSerializer p) => R.HasField t ContentSerializer p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveContentSerializerMethod t ContentSerializer, O.OverloadedMethodInfo info ContentSerializer) => OL.IsLabel t (O.MethodProxy info ContentSerializer) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ContentSerializer
type instance O.AttributeList ContentSerializer = ContentSerializerAttributeList
type ContentSerializerAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ContentSerializer = ContentSerializerSignalList
type ContentSerializerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gdk_content_serializer_get_cancellable" gdk_content_serializer_get_cancellable ::
Ptr ContentSerializer ->
IO (Ptr Gio.Cancellable.Cancellable)
contentSerializerGetCancellable ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m (Maybe Gio.Cancellable.Cancellable)
contentSerializerGetCancellable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m (Maybe Cancellable)
contentSerializerGetCancellable a
serializer = IO (Maybe Cancellable) -> m (Maybe Cancellable)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cancellable) -> m (Maybe Cancellable))
-> IO (Maybe Cancellable) -> m (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_cancellable serializer'
maybeResult <- convertIfNonNull result $ \Ptr Cancellable
result' -> do
result'' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
result'
return result''
touchManagedPtr serializer
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetCancellableMethodInfo
instance (signature ~ (m (Maybe Gio.Cancellable.Cancellable)), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetCancellableMethodInfo a signature where
overloadedMethod = contentSerializerGetCancellable
instance O.OverloadedMethodInfo ContentSerializerGetCancellableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetCancellable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetCancellable"
})
#endif
foreign import ccall "gdk_content_serializer_get_gtype" gdk_content_serializer_get_gtype ::
Ptr ContentSerializer ->
IO CGType
contentSerializerGetGtype ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m GType
contentSerializerGetGtype :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m GType
contentSerializerGetGtype a
serializer = 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
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_gtype serializer'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr serializer
return result'
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetGtypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetGtypeMethodInfo a signature where
overloadedMethod = contentSerializerGetGtype
instance O.OverloadedMethodInfo ContentSerializerGetGtypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetGtype",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetGtype"
})
#endif
foreign import ccall "gdk_content_serializer_get_mime_type" gdk_content_serializer_get_mime_type ::
Ptr ContentSerializer ->
IO CString
contentSerializerGetMimeType ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m T.Text
contentSerializerGetMimeType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m Text
contentSerializerGetMimeType a
serializer = 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
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_mime_type serializer'
checkUnexpectedReturnNULL "contentSerializerGetMimeType" result
result' <- cstringToText result
touchManagedPtr serializer
return result'
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetMimeTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetMimeTypeMethodInfo a signature where
overloadedMethod = contentSerializerGetMimeType
instance O.OverloadedMethodInfo ContentSerializerGetMimeTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetMimeType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetMimeType"
})
#endif
foreign import ccall "gdk_content_serializer_get_output_stream" gdk_content_serializer_get_output_stream ::
Ptr ContentSerializer ->
IO (Ptr Gio.OutputStream.OutputStream)
contentSerializerGetOutputStream ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m Gio.OutputStream.OutputStream
contentSerializerGetOutputStream :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m OutputStream
contentSerializerGetOutputStream a
serializer = IO OutputStream -> m OutputStream
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OutputStream -> m OutputStream)
-> IO OutputStream -> m OutputStream
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_output_stream serializer'
checkUnexpectedReturnNULL "contentSerializerGetOutputStream" result
result' <- (newObject Gio.OutputStream.OutputStream) result
touchManagedPtr serializer
return result'
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetOutputStreamMethodInfo
instance (signature ~ (m Gio.OutputStream.OutputStream), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetOutputStreamMethodInfo a signature where
overloadedMethod = contentSerializerGetOutputStream
instance O.OverloadedMethodInfo ContentSerializerGetOutputStreamMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetOutputStream",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetOutputStream"
})
#endif
foreign import ccall "gdk_content_serializer_get_priority" gdk_content_serializer_get_priority ::
Ptr ContentSerializer ->
IO Int32
contentSerializerGetPriority ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m Int32
contentSerializerGetPriority :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m Int32
contentSerializerGetPriority a
serializer = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_priority serializer'
touchManagedPtr serializer
return result
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetPriorityMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetPriorityMethodInfo a signature where
overloadedMethod = contentSerializerGetPriority
instance O.OverloadedMethodInfo ContentSerializerGetPriorityMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetPriority",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetPriority"
})
#endif
foreign import ccall "gdk_content_serializer_get_task_data" gdk_content_serializer_get_task_data ::
Ptr ContentSerializer ->
IO (Ptr ())
contentSerializerGetTaskData ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m (Ptr ())
contentSerializerGetTaskData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m (Ptr ())
contentSerializerGetTaskData a
serializer = IO (Ptr ()) -> m (Ptr ())
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_task_data serializer'
touchManagedPtr serializer
return result
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetTaskDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetTaskDataMethodInfo a signature where
overloadedMethod = contentSerializerGetTaskData
instance O.OverloadedMethodInfo ContentSerializerGetTaskDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetTaskData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetTaskData"
})
#endif
foreign import ccall "gdk_content_serializer_get_user_data" gdk_content_serializer_get_user_data ::
Ptr ContentSerializer ->
IO (Ptr ())
contentSerializerGetUserData ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m (Ptr ())
contentSerializerGetUserData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m (Ptr ())
contentSerializerGetUserData a
serializer = IO (Ptr ()) -> m (Ptr ())
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_user_data serializer'
touchManagedPtr serializer
return result
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetUserDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetUserDataMethodInfo a signature where
overloadedMethod = contentSerializerGetUserData
instance O.OverloadedMethodInfo ContentSerializerGetUserDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetUserData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetUserData"
})
#endif
foreign import ccall "gdk_content_serializer_get_value" gdk_content_serializer_get_value ::
Ptr ContentSerializer ->
IO (Ptr GValue)
contentSerializerGetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m GValue
contentSerializerGetValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m GValue
contentSerializerGetValue a
serializer = IO GValue -> m GValue
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
result <- gdk_content_serializer_get_value serializer'
checkUnexpectedReturnNULL "contentSerializerGetValue" result
result' <- B.GValue.newGValueFromPtr result
touchManagedPtr serializer
return result'
#if defined(ENABLE_OVERLOADING)
data ContentSerializerGetValueMethodInfo
instance (signature ~ (m GValue), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerGetValueMethodInfo a signature where
overloadedMethod = contentSerializerGetValue
instance O.OverloadedMethodInfo ContentSerializerGetValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerGetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerGetValue"
})
#endif
foreign import ccall "gdk_content_serializer_return_error" gdk_content_serializer_return_error ::
Ptr ContentSerializer ->
Ptr GError ->
IO ()
contentSerializerReturnError ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> GError
-> m ()
contentSerializerReturnError :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> GError -> m ()
contentSerializerReturnError a
serializer GError
error_ = 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
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
error_' <- B.ManagedPtr.disownBoxed error_
gdk_content_serializer_return_error serializer' error_'
touchManagedPtr serializer
touchManagedPtr error_
return ()
#if defined(ENABLE_OVERLOADING)
data ContentSerializerReturnErrorMethodInfo
instance (signature ~ (GError -> m ()), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerReturnErrorMethodInfo a signature where
overloadedMethod = contentSerializerReturnError
instance O.OverloadedMethodInfo ContentSerializerReturnErrorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerReturnError",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerReturnError"
})
#endif
foreign import ccall "gdk_content_serializer_return_success" gdk_content_serializer_return_success ::
Ptr ContentSerializer ->
IO ()
contentSerializerReturnSuccess ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> m ()
contentSerializerReturnSuccess :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> m ()
contentSerializerReturnSuccess a
serializer = 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
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
gdk_content_serializer_return_success serializer'
touchManagedPtr serializer
return ()
#if defined(ENABLE_OVERLOADING)
data ContentSerializerReturnSuccessMethodInfo
instance (signature ~ (m ()), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerReturnSuccessMethodInfo a signature where
overloadedMethod = contentSerializerReturnSuccess
instance O.OverloadedMethodInfo ContentSerializerReturnSuccessMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerReturnSuccess",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerReturnSuccess"
})
#endif
foreign import ccall "gdk_content_serializer_set_task_data" gdk_content_serializer_set_task_data ::
Ptr ContentSerializer ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
contentSerializerSetTaskData ::
(B.CallStack.HasCallStack, MonadIO m, IsContentSerializer a) =>
a
-> Ptr ()
-> GLib.Callbacks.DestroyNotify
-> m ()
contentSerializerSetTaskData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContentSerializer a) =>
a -> Ptr () -> DestroyNotify -> m ()
contentSerializerSetTaskData a
serializer Ptr ()
data_ DestroyNotify
notify = 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
serializer' <- a -> IO (Ptr ContentSerializer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializer
ptrnotify <- callocMem :: IO (Ptr (FunPtr GLib.Callbacks.C_DestroyNotify))
notify' <- GLib.Callbacks.mk_DestroyNotify (GLib.Callbacks.wrap_DestroyNotify (Just ptrnotify) notify)
poke ptrnotify notify'
gdk_content_serializer_set_task_data serializer' data_ notify'
touchManagedPtr serializer
return ()
#if defined(ENABLE_OVERLOADING)
data ContentSerializerSetTaskDataMethodInfo
instance (signature ~ (Ptr () -> GLib.Callbacks.DestroyNotify -> m ()), MonadIO m, IsContentSerializer a) => O.OverloadedMethod ContentSerializerSetTaskDataMethodInfo a signature where
overloadedMethod = contentSerializerSetTaskData
instance O.OverloadedMethodInfo ContentSerializerSetTaskDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.ContentSerializer.contentSerializerSetTaskData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-4.0.9/docs/GI-Gdk-Objects-ContentSerializer.html#v:contentSerializerSetTaskData"
})
#endif