ContentSerializerProtocol
public protocol ContentSerializerProtocol : AsyncResultProtocol, ObjectProtocol
The ContentSerializerProtocol protocol exposes the methods and properties of an underlying GdkContentSerializer instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see ContentSerializer.
Alternatively, use ContentSerializerRef as a lighweight, unowned reference if you already have an instance you just want to use.
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 [funccontent_register_serializer].
Also see [classGdk.ContentDeserializer].
-
Untyped pointer to the underlying
GdkContentSerializerinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
content_serializer_ptrDefault implementationTyped pointer to the underlying
GdkContentSerializerinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GdkContentSerializerinstance.Declaration
Swift
var content_serializer_ptr: UnsafeMutablePointer<GdkContentSerializer>! { get } -
Required Initialiser for types conforming to
ContentSerializerProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getCancellable()Extension methodGets the cancellable for the current operation.
This is the
GCancellablethat was passed to [content_serialize_async].Declaration
Swift
@inlinable func getCancellable() -> GIO.CancellableRef! -
getGtype()Extension methodGets the
GTypeto of the object to serialize.Declaration
Swift
@inlinable func getGtype() -> GType -
getMimeType()Extension methodGets the mime type to serialize to.
Declaration
Swift
@inlinable func getMimeType() -> String! -
getOutputStream()Extension methodGets the output stream for the current operation.
This is the stream that was passed to [func
content_serialize_async].Declaration
Swift
@inlinable func getOutputStream() -> GIO.OutputStreamRef! -
getPriority()Extension methodGets the I/O priority for the current operation.
This is the priority that was passed to [func
content_serialize_async].Declaration
Swift
@inlinable func getPriority() -> Int -
getTaskData()Extension methodGets the data that was associated with the current operation.
See [method
Gdk.ContentSerializer.set_task_data].Declaration
Swift
@inlinable func getTaskData() -> gpointer! -
getUserData()Extension methodGets the user data that was passed when the serializer was registered.
Declaration
Swift
@inlinable func getUserData() -> gpointer! -
getValue()Extension methodGets the
GValueto read the object to serialize from.Declaration
Swift
@inlinable func getValue() -> GLibObject.ValueRef! -
return_(error:Extension method) Indicate that the serialization has ended with an error.
This function consumes
error.Declaration
Swift
@inlinable func return_<GLibErrorT>(error: GLibErrorT) where GLibErrorT : ErrorProtocol -
returnSuccess()Extension methodIndicate that the serialization has been successfully completed.
Declaration
Swift
@inlinable func returnSuccess() -
setTask(data:Extension methodnotify: ) Associate data with the current serialization operation.
Declaration
Swift
@inlinable func setTask(data: gpointer! = nil, notify: GDestroyNotify?) -
cancellableExtension methodGets the cancellable for the current operation.
This is the
GCancellablethat was passed to [content_serialize_async].Declaration
Swift
@inlinable var cancellable: GIO.CancellableRef! { get } -
gtypeExtension methodGets the
GTypeto of the object to serialize.Declaration
Swift
@inlinable var gtype: GType { get } -
mimeTypeExtension methodGets the mime type to serialize to.
Declaration
Swift
@inlinable var mimeType: String! { get } -
outputStreamExtension methodGets the output stream for the current operation.
This is the stream that was passed to [func
content_serialize_async].Declaration
Swift
@inlinable var outputStream: GIO.OutputStreamRef! { get } -
priorityExtension methodGets the I/O priority for the current operation.
This is the priority that was passed to [func
content_serialize_async].Declaration
Swift
@inlinable var priority: Int { get } -
taskDataExtension methodGets the data that was associated with the current operation.
See [method
Gdk.ContentSerializer.set_task_data].Declaration
Swift
@inlinable var taskData: gpointer! { get } -
userDataExtension methodGets the user data that was passed when the serializer was registered.
Declaration
Swift
@inlinable var userData: gpointer! { get } -
valueExtension methodGets the
GValueto read the object to serialize from.Declaration
Swift
@inlinable var value: GLibObject.ValueRef! { get }
View on GitHub
Install in Dash
ContentSerializerProtocol Protocol Reference