MaliitAttributeExtension

MaliitAttributeExtension — attribute extensions

Stability Level

Stable, unless otherwise indicated

Functions

Properties

GHashTable * attributes Read
gchar * filename Read / Write / Construct Only
gint id Read / Write / Construct Only

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── MaliitAttributeExtension

Includes

#include <maliit/maliitattributeextension.h>

Description

MaliitAttributeExtension class can be used by application to override some aspect of IM plugin currently used, like the looks of action key.

Functions

maliit_attribute_extension_attach_to_object ()

void
maliit_attribute_extension_attach_to_object
                               (MaliitAttributeExtension *extension,
                                GObject *object);

Attaches extension to object , so input context can retrieve it from object . Note that attaching extensions to non-input GObject<!-- -->s does not have much sense.

Parameters

extension

The MaliitAttributeExtension which you want to be attached.

[transfer none]

object

The GObject to which extension will be attached.

[transfer none]

maliit_attribute_extension_get_attributes ()

GHashTable *
maliit_attribute_extension_get_attributes
                               (MaliitAttributeExtension *extension);

Gets all attributes of this extension that were set previously with maliit_attribute_extension_set_attribute().

Parameters

extension

The MaliitAttributeExtension which attributes you want to get.

[transfer none]

Returns

The GHashTable containing strings as keys and GVariant<!-- -->s as values. Should not be freed nor modified.

[transfer none][element-type utf8 GLib.Variant]


maliit_attribute_extension_get_filename ()

const gchar *
maliit_attribute_extension_get_filename
                               (MaliitAttributeExtension *extension);

Gets filename of this extension that were set previously with maliit_attribute_extension_new_with_filename().

Parameters

extension

The MaliitAttributeExtension which filename you want to get.

[transfer none]

Returns

The string being a filename of this extension or NULL. Returned string should not be freed nor modified.

[transfer none][type filename]


maliit_attribute_extension_get_id ()

int
maliit_attribute_extension_get_id (MaliitAttributeExtension *extension);

Gets ID of this extension.

Parameters

extension

The MaliitAttributeExtension which ID you want to get.

[transfer none]

Returns

The ID of this extension.


maliit_attribute_extension_new ()

MaliitAttributeExtension *
maliit_attribute_extension_new (void);

Creates new attribute extension, which is not associated with any file.

Returns

The newly created MaliitAttributeExtension.

[transfer full]


maliit_attribute_extension_new_with_filename ()

MaliitAttributeExtension *
maliit_attribute_extension_new_with_filename
                               (const gchar *filename);

Creates new attribute extension, which is associated with file given as filename .

Parameters

filename

Filename where overrides are stored.

[transfer none][type filename]

Returns

The newly created MaliitAttributeExtension.

[transfer full]


maliit_attribute_extension_set_attribute ()

void
maliit_attribute_extension_set_attribute
                               (MaliitAttributeExtension *extension,
                                const gchar *key,
                                GVariant *value);

Sets an attribute in extension described by key to value in value .

Parameters

extension

The MaliitAttributeExtension which attribute you want to set.

[transfer none]

key

Attribute name to update.

[transfer none]

value

Attribute value to update.

[transfer none]

maliit_attribute_extension_update_attribute ()

void
maliit_attribute_extension_update_attribute
                               (MaliitAttributeExtension *extension,
                                const gchar *key,
                                GVariant *value);

Updates the extension 's attribute described by key with value . This function always emits a “extended-attribute-changed” signal.

Parameters

extension

The MaliitAttributeExtension which attribute you want to update.

[transfer none]

key

Attribute name to update.

[transfer none]

value

Attribute value to update.

[transfer none]

Types and Values

struct MaliitAttributeExtension

struct MaliitAttributeExtension;

struct MaliitAttributeExtensionClass

struct MaliitAttributeExtensionClass {
    GObjectClass parent_class;
};

Members

Property Details

The “attributes” property

  “attributes”               GHashTable *

Attributes overrides.

Flags: Read


The “filename” property

  “filename”                 gchar *

Filename of the extension.

Flags: Read / Write / Construct Only

Default value: NULL


The “id” property

  “id”                       gint

Path to file where definitions of overrides are defined.

Flags: Read / Write / Construct Only

Default value: 0

Signal Details

The “extended-attribute-changed” signal

void
user_function (MaliitAttributeExtension *extension,
               gchar                    *key,
               GVariant                 *value,
               gpointer                  user_data)

Informs application that input method server has changed the extended attribute.

Parameters

extension

The MaliitAttributeExtension emitting the signal.

 

key

A string specifying the target for the attribute.

 

value

A new value.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First