gi-gdk4
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

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

Exported types

newtype ContentSerializer Source #

Memory-managed wrapper type.

Instances

Instances details
Eq ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

GObject ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

ManagedPtrNewtype ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

TypedObject ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

Methods

glibType :: IO GType #

HasParentTypes ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

HasAttributeList ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

(info ~ ResolveContentSerializerMethod t ContentSerializer, OverloadedMethod info ContentSerializer p, HasField t ContentSerializer p) => HasField (t :: Symbol) ContentSerializer (p :: Type) Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

(info ~ ResolveContentSerializerMethod t ContentSerializer, OverloadedMethodInfo info ContentSerializer) => IsLabel t (MethodProxy info ContentSerializer) Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

(info ~ ResolveContentSerializerMethod t ContentSerializer, OverloadedMethod info ContentSerializer p) => IsLabel t (ContentSerializer -> p) Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

IsGValue (Maybe ContentSerializer) Source #

Convert ContentSerializer to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Objects.ContentSerializer

type AttributeList ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

type ParentTypes ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

type SignalList ContentSerializer Source # 
Instance details

Defined in GI.Gdk.Objects.ContentSerializer

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

Instances details
(GObject o, IsDescendantOf ContentSerializer o) => IsContentSerializer o Source # 
Instance details

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

type family ResolveContentSerializerMethod (t :: Symbol) o where ... Source #

Equations

ResolveContentSerializerMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveContentSerializerMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveContentSerializerMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveContentSerializerMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveContentSerializerMethod "getv" o = ObjectGetvMethodInfo 
ResolveContentSerializerMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveContentSerializerMethod "isTagged" o = AsyncResultIsTaggedMethodInfo 
ResolveContentSerializerMethod "legacyPropagateError" o = AsyncResultLegacyPropagateErrorMethodInfo 
ResolveContentSerializerMethod "notify" o = ObjectNotifyMethodInfo 
ResolveContentSerializerMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveContentSerializerMethod "ref" o = ObjectRefMethodInfo 
ResolveContentSerializerMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveContentSerializerMethod "returnError" o = ContentSerializerReturnErrorMethodInfo 
ResolveContentSerializerMethod "returnSuccess" o = ContentSerializerReturnSuccessMethodInfo 
ResolveContentSerializerMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveContentSerializerMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveContentSerializerMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveContentSerializerMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveContentSerializerMethod "unref" o = ObjectUnrefMethodInfo 
ResolveContentSerializerMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveContentSerializerMethod "getCancellable" o = ContentSerializerGetCancellableMethodInfo 
ResolveContentSerializerMethod "getData" o = ObjectGetDataMethodInfo 
ResolveContentSerializerMethod "getGtype" o = ContentSerializerGetGtypeMethodInfo 
ResolveContentSerializerMethod "getMimeType" o = ContentSerializerGetMimeTypeMethodInfo 
ResolveContentSerializerMethod "getOutputStream" o = ContentSerializerGetOutputStreamMethodInfo 
ResolveContentSerializerMethod "getPriority" o = ContentSerializerGetPriorityMethodInfo 
ResolveContentSerializerMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveContentSerializerMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveContentSerializerMethod "getSourceObject" o = AsyncResultGetSourceObjectMethodInfo 
ResolveContentSerializerMethod "getTaskData" o = ContentSerializerGetTaskDataMethodInfo 
ResolveContentSerializerMethod "getUserData" o = ContentSerializerGetUserDataMethodInfo 
ResolveContentSerializerMethod "getValue" o = ContentSerializerGetValueMethodInfo 
ResolveContentSerializerMethod "setData" o = ObjectSetDataMethodInfo 
ResolveContentSerializerMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveContentSerializerMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveContentSerializerMethod "setTaskData" o = ContentSerializerSetTaskDataMethodInfo 
ResolveContentSerializerMethod l o = MethodResolutionFailed l o :: Type 

getCancellable

contentSerializerGetCancellable Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> 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

contentSerializerGetGtype Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m GType

Returns: the GType for the current operation

Gets the GType to of the object to serialize.

getMimeType

contentSerializerGetMimeType Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m Text

Returns: the mime type for the current operation

Gets the mime type to serialize to.

getOutputStream

contentSerializerGetOutputStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> 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

contentSerializerGetPriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> 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

contentSerializerGetTaskData Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m (Ptr ())

Returns: the task data for serializer

Gets the data that was associated with the current operation.

See contentSerializerSetTaskData.

getUserData

contentSerializerGetUserData Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m (Ptr ())

Returns: the user data for this serializer

Gets the user data that was passed when the serializer was registered.

getValue

contentSerializerGetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m GValue

Returns: the GValue for the current operation

Gets the GValue to read the object to serialize from.

returnError

contentSerializerReturnError Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> GError

error: a GError

-> m () 

Indicate that the serialization has ended with an error.

This function consumes error.

returnSuccess

contentSerializerReturnSuccess Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> m () 

Indicate that the serialization has been successfully completed.

setTaskData

contentSerializerSetTaskData Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) 
=> a

serializer: a GdkContentSerializer

-> Ptr ()

data: data to associate with this operation

-> DestroyNotify

notify: destroy notify for data

-> m () 

Associate data with the current serialization operation.