Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A GdkContentDeserializer
is used to deserialize content received via
inter-application data transfers.
The GdkContentDeserializer
transforms serialized content that is
identified by a mime type into an object identified by a GType.
GTK provides serializers and deserializers for common data types
such as text, colors, images or file lists. To register your own
deserialization functions, use [funccontentRegisterDeserializer
].
Also see ContentSerializer
.
Synopsis
- newtype ContentDeserializer = ContentDeserializer (ManagedPtr ContentDeserializer)
- class (GObject o, IsDescendantOf ContentDeserializer o) => IsContentDeserializer o
- toContentDeserializer :: (MonadIO m, IsContentDeserializer o) => o -> m ContentDeserializer
- contentDeserializerGetCancellable :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m (Maybe Cancellable)
- contentDeserializerGetGtype :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m GType
- contentDeserializerGetInputStream :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m InputStream
- contentDeserializerGetMimeType :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m Text
- contentDeserializerGetPriority :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m Int32
- contentDeserializerGetTaskData :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m (Ptr ())
- contentDeserializerGetUserData :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m (Ptr ())
- contentDeserializerGetValue :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m GValue
- contentDeserializerReturnError :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> GError -> m ()
- contentDeserializerReturnSuccess :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> m ()
- contentDeserializerSetTaskData :: (HasCallStack, MonadIO m, IsContentDeserializer a) => a -> Ptr () -> DestroyNotify -> m ()
Exported types
newtype ContentDeserializer Source #
Memory-managed wrapper type.
Instances
Eq ContentDeserializer Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer (==) :: ContentDeserializer -> ContentDeserializer -> Bool # (/=) :: ContentDeserializer -> ContentDeserializer -> Bool # | |
GObject ContentDeserializer Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer | |
ManagedPtrNewtype ContentDeserializer Source # | |
TypedObject ContentDeserializer Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer | |
HasParentTypes ContentDeserializer Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer | |
IsGValue (Maybe ContentDeserializer) Source # | Convert |
Defined in GI.Gdk.Objects.ContentDeserializer gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe ContentDeserializer -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe ContentDeserializer) # | |
type ParentTypes ContentDeserializer Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer type ParentTypes ContentDeserializer = '[Object, AsyncResult] |
class (GObject o, IsDescendantOf ContentDeserializer o) => IsContentDeserializer o Source #
Type class for types which can be safely cast to ContentDeserializer
, for instance with toContentDeserializer
.
Instances
(GObject o, IsDescendantOf ContentDeserializer o) => IsContentDeserializer o Source # | |
Defined in GI.Gdk.Objects.ContentDeserializer |
toContentDeserializer :: (MonadIO m, IsContentDeserializer o) => o -> m ContentDeserializer Source #
Cast to ContentDeserializer
, 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, getInputStream, getMimeType, getPriority, getProperty, getQdata, getSourceObject, getTaskData, getUserData, getValue.
Setters
getCancellable
contentDeserializerGetCancellable Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer 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 contentDeserializeAsync
.
getGtype
contentDeserializerGetGtype Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m GType | Returns: the |
Gets the GType
to create an instance of.
getInputStream
contentDeserializerGetInputStream Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m InputStream | Returns: the input stream for the current operation |
Gets the input stream for the current operation.
This is the stream that was passed to contentDeserializeAsync
.
getMimeType
contentDeserializerGetMimeType Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m Text | Returns: the mime type for the current operation |
Gets the mime type to deserialize from.
getPriority
contentDeserializerGetPriority Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer 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 contentDeserializeAsync
.
getTaskData
contentDeserializerGetTaskData Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m (Ptr ()) | Returns: the task data for |
Gets the data that was associated with the current operation.
getUserData
contentDeserializerGetUserData Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m (Ptr ()) | Returns: the user data for this deserializer |
Gets the user data that was passed when the deserializer was registered.
getValue
contentDeserializerGetValue Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m GValue | Returns: the |
Gets the GValue
to store the deserialized object in.
returnError
contentDeserializerReturnError Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> GError |
|
-> m () |
Indicate that the deserialization has ended with an error.
This function consumes error
.
returnSuccess
contentDeserializerReturnSuccess Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> m () |
Indicate that the deserialization has been successfully completed.
setTaskData
contentDeserializerSetTaskData Source #
:: (HasCallStack, MonadIO m, IsContentDeserializer a) | |
=> a |
|
-> Ptr () |
|
-> DestroyNotify |
|
-> m () |
Associate data with the current deserialization operation.