Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gdk.Objects.ContentSerializer
Description
A GdkContentSerializer
is used to serialize content for
inter-application data transfers.
The GdkContentSerializer
transforms an object that is identified
by a GType into a serialized form (i.e. a byte stream) that is
identified by a mime type.
GTK provides serializers and deserializers for common data types
such as text, colors, images or file lists. To register your own
serialization functions, use contentRegisterSerializer
.
Also see ContentDeserializer
.
Synopsis
- newtype ContentSerializer = ContentSerializer (ManagedPtr ContentSerializer)
- class (GObject o, IsDescendantOf ContentSerializer o) => IsContentSerializer o
- toContentSerializer :: (MonadIO m, IsContentSerializer o) => o -> m ContentSerializer
- type family ResolveContentSerializerMethod (t :: Symbol) o where ...
- data ContentSerializerGetCancellableMethodInfo
- contentSerializerGetCancellable :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m (Maybe Cancellable)
- data ContentSerializerGetGtypeMethodInfo
- contentSerializerGetGtype :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m GType
- data ContentSerializerGetMimeTypeMethodInfo
- contentSerializerGetMimeType :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m Text
- data ContentSerializerGetOutputStreamMethodInfo
- contentSerializerGetOutputStream :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m OutputStream
- data ContentSerializerGetPriorityMethodInfo
- contentSerializerGetPriority :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m Int32
- data ContentSerializerGetTaskDataMethodInfo
- contentSerializerGetTaskData :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m (Ptr ())
- data ContentSerializerGetUserDataMethodInfo
- contentSerializerGetUserData :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m (Ptr ())
- data ContentSerializerGetValueMethodInfo
- contentSerializerGetValue :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m GValue
- data ContentSerializerReturnErrorMethodInfo
- contentSerializerReturnError :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> GError -> m ()
- data ContentSerializerReturnSuccessMethodInfo
- contentSerializerReturnSuccess :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> m ()
- data ContentSerializerSetTaskDataMethodInfo
- contentSerializerSetTaskData :: (HasCallStack, MonadIO m, IsContentSerializer a) => a -> Ptr () -> DestroyNotify -> m ()
Exported types
newtype ContentSerializer Source #
Memory-managed wrapper type.
Constructors
ContentSerializer (ManagedPtr ContentSerializer) |
Instances
class (GObject o, IsDescendantOf ContentSerializer o) => IsContentSerializer o Source #
Type class for types which can be safely cast to ContentSerializer
, for instance with toContentSerializer
.
Instances
(GObject o, IsDescendantOf ContentSerializer o) => IsContentSerializer o Source # | |
Defined in GI.Gdk.Objects.ContentSerializer |
toContentSerializer :: (MonadIO m, IsContentSerializer o) => o -> m ContentSerializer Source #
Cast to ContentSerializer
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isTagged, legacyPropagateError, notify, notifyByPspec, ref, refSink, returnError, returnSuccess, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCancellable, getData, getGtype, getMimeType, getOutputStream, getPriority, getProperty, getQdata, getSourceObject, getTaskData, getUserData, getValue.
Setters
type family ResolveContentSerializerMethod (t :: Symbol) o where ... Source #
Equations
getCancellable
data ContentSerializerGetCancellableMethodInfo Source #
Instances
(signature ~ m (Maybe Cancellable), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetCancellableMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetCancellableMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetCancellable Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m (Maybe Cancellable) | Returns: the cancellable for the current operation |
Gets the cancellable for the current operation.
This is the GCancellable
that was passed to [funccontentSerializeAsync
].
getGtype
data ContentSerializerGetGtypeMethodInfo Source #
Instances
(signature ~ m GType, MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetGtypeMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetGtypeMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetGtype Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m GType | Returns: the |
Gets the GType
to of the object to serialize.
getMimeType
data ContentSerializerGetMimeTypeMethodInfo Source #
Instances
(signature ~ m Text, MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetMimeTypeMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetMimeTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetMimeType Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m Text | Returns: the mime type for the current operation |
Gets the mime type to serialize to.
getOutputStream
data ContentSerializerGetOutputStreamMethodInfo Source #
Instances
(signature ~ m OutputStream, MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetOutputStreamMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetOutputStreamMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetOutputStream Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m OutputStream | Returns: the output stream for the current operation |
Gets the output stream for the current operation.
This is the stream that was passed to [funccontentSerializeAsync
].
getPriority
data ContentSerializerGetPriorityMethodInfo Source #
Instances
(signature ~ m Int32, MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetPriorityMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetPriorityMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetPriority Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m Int32 | Returns: the I/O priority for the current operation |
Gets the I/O priority for the current operation.
This is the priority that was passed to [funccontentSerializeAsync
].
getTaskData
data ContentSerializerGetTaskDataMethodInfo Source #
Instances
(signature ~ m (Ptr ()), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetTaskDataMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetTaskDataMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetTaskData Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m (Ptr ()) | Returns: the task data for |
Gets the data that was associated with the current operation.
getUserData
data ContentSerializerGetUserDataMethodInfo Source #
Instances
(signature ~ m (Ptr ()), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetUserDataMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetUserDataMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetUserData Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m (Ptr ()) | Returns: the user data for this serializer |
Gets the user data that was passed when the serializer was registered.
getValue
data ContentSerializerGetValueMethodInfo Source #
Instances
(signature ~ m GValue, MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerGetValueMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerGetValueMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerGetValue Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m GValue | Returns: the |
Gets the GValue
to read the object to serialize from.
returnError
data ContentSerializerReturnErrorMethodInfo Source #
Instances
(signature ~ (GError -> m ()), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerReturnErrorMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerReturnErrorMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerReturnError Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> GError |
|
-> m () |
Indicate that the serialization has ended with an error.
This function consumes error
.
returnSuccess
data ContentSerializerReturnSuccessMethodInfo Source #
Instances
(signature ~ m (), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerReturnSuccessMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerReturnSuccessMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerReturnSuccess Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> m () |
Indicate that the serialization has been successfully completed.
setTaskData
data ContentSerializerSetTaskDataMethodInfo Source #
Instances
(signature ~ (Ptr () -> DestroyNotify -> m ()), MonadIO m, IsContentSerializer a) => OverloadedMethod ContentSerializerSetTaskDataMethodInfo a signature Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ContentSerializerSetTaskDataMethodInfo (a :: Type) Source # | |
Defined in GI.Gdk.Objects.ContentSerializer Methods |
contentSerializerSetTaskData Source #
Arguments
:: (HasCallStack, MonadIO m, IsContentSerializer a) | |
=> a |
|
-> Ptr () |
|
-> DestroyNotify |
|
-> m () |
Associate data with the current serialization operation.