| Top |  |  |  |  | 
| #define | ibus_serializable_set_attachment() | 
| #define | ibus_serializable_get_attachment() | 
| #define | ibus_serializable_remove_attachment() | 
| gboolean | (*IBusSerializableSerializeFunc) () | 
| gint | (*IBusSerializableDeserializeFunc) () | 
| gboolean | (*IBusSerializableCopyFunc) () | 
| IBusSerializable * | ibus_serializable_new () | 
| void | ibus_serializable_set_qattachment () | 
| GVariant * | ibus_serializable_get_qattachment () | 
| void | ibus_serializable_remove_qattachment () | 
| IBusSerializable * | ibus_serializable_copy () | 
| GVariant * | ibus_serializable_serialize_object () | 
| IBusSerializable * | ibus_serializable_deserialize_object () | 
| struct | IBusSerializable | 
| #define | ibus_serializable_serialize | 
| #define | ibus_serializable_deserialize | 
    GObject
    ╰── GInitiallyUnowned
        ╰── IBusObject
            ╰── IBusSerializable
                ├── IBusHotkeyProfile
                ├── IBusText
                ├── IBusAttribute
                ├── IBusAttrList
                ├── IBusEngineDesc
                ├── IBusLookupTable
                ├── IBusComponent
                ├── IBusProperty
                ├── IBusPropList
                ├── IBusObservedPath
                ├── IBusRegistry
                ╰── IBusExtensionEvent
An IBusSerializable is an IBus object which can be serialized, that is, to be to and from a GVariant.
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 IBusSerializable.
See IBusSerializableSerializeFunc(), IBusSerializableDeserializeFunc(), IBusSerializableCopyFunc()
for function prototype.
#define ibus_serializable_set_attachment(o, k, v)
Attach a value to an IBusSerializable.
This macro is an convenient wrapper of ibus_serializable_set_qattachment().
#define ibus_serializable_get_attachment(o, k)
Get a value from attachment of an IBusSerializable.
This macro is an convenient wrapper of ibus_serializable_get_qattachment().
#define ibus_serializable_remove_attachment(o, k)
Remove a value from attachment of an IBusSerializable.
This macro is an convenient wrapper of ibus_serializable_remove_qattachment().
gboolean (*IBusSerializableSerializeFunc) (IBusSerializable *serializable,GVariantBuilder *builder);
Prototype of serialize function.
Serialize function convert an IBusSerializable to GVariantBuilder.
Returns a gboolean value which indicates whether the conversion is success.
Return TRUE if succeed.
gint (*IBusSerializableDeserializeFunc) (IBusSerializable *serializable,GVariant *variant);
Prototype of deserialize function. Deserialize function convert a GVariant to IBusSerializable. Returns an integer value which indicates how many values in the variant(tuple) are consumed.
gboolean (*IBusSerializableCopyFunc) (IBusSerializable *dest,const IBusSerializable *src);
Prototype of copy function. Copy function copy from source IBusSerializable to the destination one. Returns a gboolean value which indicates whether the copying is success.
IBusSerializable *
ibus_serializable_new (void);
Creates a new instance of an IBusSerializable.
void ibus_serializable_set_qattachment (IBusSerializable *serializable,GQuark key,GVariant *value);
Attach a value to an IBusSerializable. If the value is floating, the serializable will take the ownership.
See also: ibus_serializable_set_attachment().
| serializable | An IBusSerializable. | |
| key | String formatted key for indexing value. | |
| value | Value to be attached or  | 
GVariant * ibus_serializable_get_qattachment (IBusSerializable *serializable,GQuark key);
Gets a value from attachment of an IBusSerializable.
 The attached value; or NULL if fail to retrieve the value.
See also: ibus_serializable_set_attachment().
void ibus_serializable_remove_qattachment (IBusSerializable *serializable,GQuark key);
Remove a value from attachment of an IBusSerializable.
See also: ibus_serializable_remove_attachment().
IBusSerializable *
ibus_serializable_copy (IBusSerializable *serializable);
Clone an IBusSerializable. The copy method should be implemented in extended class.
A newly allocated clone object; or NULL
if object
is not serializable.
See also: IBusSerializableCopyFunc(). 
[transfer none]
GVariant *
ibus_serializable_serialize_object (IBusSerializable *serializable);
Serialize an IBusSerializable to a GVariant. The serialize method should be implemented in extended class.
IBusSerializable *
ibus_serializable_deserialize_object (GVariant *variant);
Deserialize a GVariant to an IBusSerializable/ The deserialize method should be implemented in extended class.
struct IBusSerializable;
All the fields in the IBusSerializable structure are private to the IBusSerializable and should never be accessed directly.