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
GdkContentSerializer
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
content_serializer_ptr
Default implementationTyped pointer to the underlying
GdkContentSerializer
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GdkContentSerializer
instance.Declaration
Swift
var content_serializer_ptr: UnsafeMutablePointer<GdkContentSerializer>! { get }
-
Required Initialiser for types conforming to
ContentSerializerProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getCancellable()
Extension methodGets the cancellable for the current operation.
This is the
GCancellable
that was passed to [content_serialize_async].Declaration
Swift
@inlinable func getCancellable() -> GIO.CancellableRef!
-
getGtype()
Extension methodGets the
GType
to 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
GValue
to 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?)
-
cancellable
Extension methodGets the cancellable for the current operation.
This is the
GCancellable
that was passed to [content_serialize_async].Declaration
Swift
@inlinable var cancellable: GIO.CancellableRef! { get }
-
gtype
Extension methodGets the
GType
to of the object to serialize.Declaration
Swift
@inlinable var gtype: GType { get }
-
mimeType
Extension methodGets the mime type to serialize to.
Declaration
Swift
@inlinable var mimeType: String! { get }
-
outputStream
Extension 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 }
-
priority
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 var priority: Int { get }
-
taskData
Extension methodGets the data that was associated with the current operation.
See [method
Gdk.ContentSerializer.set_task_data
].Declaration
Swift
@inlinable var taskData: gpointer! { get }
-
userData
Extension methodGets the user data that was passed when the serializer was registered.
Declaration
Swift
@inlinable var userData: gpointer! { get }
-
value
Extension methodGets the
GValue
to read the object to serialize from.Declaration
Swift
@inlinable var value: GLibObject.ValueRef! { get }