Package ch.bailu.gtk.gdk
Class ContentDeserializer
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gdk.ContentDeserializer
- All Implemented Interfaces:
PointerInterface
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 [func@content_register_deserializer].
Also see [class@Gdk.ContentSerializer].
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 [func@content_register_deserializer].
Also see [class@Gdk.ContentSerializer].
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceAsyncResult
.Gets the cancellable for the current operation.static ClassHandler
long
getGtype()
Gets the `GType` to create an instance of.Gets the input stream for the current operation.static int
Gets the mime type to deserialize from.static long
static TypeSystem.TypeSize
int
Gets the I/O priority for the current operation.Gets the data that was associated with the current operation.static long
static TypeSystem.TypeSize
Gets the user data that was passed when the deserializer was registered.getValue()
Gets the `GValue` to store the deserialized object in.void
returnError
(Error error) Indicate that the deserialization has ended with an error.void
Indicate that the deserialization has been successfully completed.void
setTaskData
(Pointer data, ContentDeserializer.OnDestroyNotify notify) Associate data with the current deserialization operation.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
ContentDeserializer
-
-
Method Details
-
getClassHandler
-
getCancellable
Gets the cancellable for the current operation.
This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].- Returns:
- the cancellable for the current operation
-
getGtype
public long getGtype()Gets the `GType` to create an instance of.- Returns:
- the `GType` for the current operation
-
getInputStream
Gets the input stream for the current operation.
This is the stream that was passed to [func@Gdk.content_deserialize_async].- Returns:
- the input stream for the current operation
-
getMimeType
Gets the mime type to deserialize from.- Returns:
- the mime type for the current operation
-
getPriority
public int getPriority()Gets the I/O priority for the current operation.
This is the priority that was passed to [func@Gdk.content_deserialize_async].- Returns:
- the I/O priority for the current operation
-
getTaskData
Gets the data that was associated with the current operation.
See [method@Gdk.ContentDeserializer.set_task_data].- Returns:
- the task data for @deserializer
-
getUserData
Gets the user data that was passed when the deserializer was registered.- Returns:
- the user data for this deserializer
-
getValue
Gets the `GValue` to store the deserialized object in.- Returns:
- the `GValue` for the current operation
-
returnError
Indicate that the deserialization has ended with an error.
This function consumes @error.- Parameters:
error
- a `GError`
-
returnSuccess
public void returnSuccess()Indicate that the deserialization has been successfully completed. -
setTaskData
Associate data with the current deserialization operation.- Parameters:
data
- data to associate with this operationnotify
- destroy notify for @data
-
asAsyncResult
Implements interfaceAsyncResult
. Call this to get access to interface functions.- Returns:
AsyncResult
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-