IBus.Serializable¶
- Subclasses:
IBus.AttrList
,IBus.Attribute
,IBus.Component
,IBus.EmojiData
,IBus.EngineDesc
,IBus.ExtensionEvent
,IBus.HotkeyProfile
,IBus.LookupTable
,IBus.ObservedPath
,IBus.PropList
,IBus.Property
,IBus.Registry
,IBus.Text
,IBus.UnicodeBlock
,IBus.UnicodeData
,IBus.XEvent
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class IBus.Serializable(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An
IBus.Serializable
is an IBus object which can be serialized, that is, to be to and from aGLib.Variant
.This class is to be extended by other class that requires serialization. An extended class should overrides following methods:
serialize(object,iter): for serialize.
deserialize(object,iter): for deserialize.
copy(desc,src): for copy between
IBus.Serializable
.
See
IBus.SerializableSerializeFunc
(),IBus.SerializableDeserializeFunc
(),IBus.SerializableCopyFunc
() for function prototype.- classmethod deserialize_object(variant)¶
- Parameters:
variant (
GLib.Variant
) – AGLib.Variant
.- Returns:
The deserialized
IBus.Serializable
.See also:
IBus.SerializableCopyFunc
().- Return type:
Deserialize a
GLib.Variant
to anIBus.Serializable
/ The deserialize method should be implemented in extended class.
- classmethod new()¶
- Returns:
a new instance of
IBus.Serializable
.- Return type:
Creates a new instance of an
IBus.Serializable
.
- copy()¶
- Returns:
A newly allocated clone object; or
None
if object is not serializable.See also:
IBus.SerializableCopyFunc
().- Return type:
Clone an
IBus.Serializable
. The copy method should be implemented in extended class.
- get_qattachment(key)¶
- Parameters:
key (
int
) – String formatted key for indexing value.- Returns:
The attached value; or
None
if fail to retrieve the value.See also: ibus_serializable_set_attachment().
- Return type:
Gets a value from attachment of an
IBus.Serializable
.
- remove_qattachment(key)¶
- Parameters:
key (
int
) – String formatted key for indexing value.
Remove a value from attachment of an
IBus.Serializable
. See also: ibus_serializable_remove_attachment().
- serialize_object()¶
- Returns:
A
GLib.Variant
.See also:
IBus.SerializableCopyFunc
().- Return type:
Serialize an
IBus.Serializable
to aGLib.Variant
. The serialize method should be implemented in extended class.
- set_qattachment(key, value)¶
- Parameters:
key (
int
) – String formatted key for indexing value.value (
GLib.Variant
) – Value to be attached orNone
to remove any prevoius value.
Attach a value to an
IBus.Serializable
. If the value is floating, the serializable will take the ownership.See also: ibus_serializable_set_attachment().
- do_copy(src) virtual¶
- Parameters:
src (
IBus.Serializable
) –- Return type:
- do_deserialize(variant) virtual¶
- Parameters:
variant (
GLib.Variant
) –- Return type:
- do_serialize(builder) virtual¶
- Parameters:
builder (
GLib.VariantBuilder
) –- Return type: