MaliitAttributeExtension

MaliitAttributeExtension — attribute extensions

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <maliit/maliitattributeextension.h>

struct              MaliitAttributeExtension;
struct              MaliitAttributeExtensionClass;
void                maliit_attribute_extension_attach_to_object
                                                        (MaliitAttributeExtension *extension,
                                                         GObject *object);
GHashTable *        maliit_attribute_extension_get_attributes
                                                        (MaliitAttributeExtension *extension);
const gchar *       maliit_attribute_extension_get_filename
                                                        (MaliitAttributeExtension *extension);
int                 maliit_attribute_extension_get_id   (MaliitAttributeExtension *extension);
MaliitAttributeExtension * maliit_attribute_extension_new
                                                        (void);
MaliitAttributeExtension * maliit_attribute_extension_new_with_filename
                                                        (const gchar *filename);
void                maliit_attribute_extension_set_attribute
                                                        (MaliitAttributeExtension *extension,
                                                         const gchar *key,
                                                         GVariant *value);
void                maliit_attribute_extension_update_attribute
                                                        (MaliitAttributeExtension *extension,
                                                         const gchar *key,
                                                         GVariant *value);

Object Hierarchy

  GObject
   +----MaliitAttributeExtension

Properties

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

Signals

  "extended-attribute-changed"                     : Run First

Description

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

Details

struct MaliitAttributeExtension

struct MaliitAttributeExtension;

struct MaliitAttributeExtensionClass

struct MaliitAttributeExtensionClass {
    GObjectClass parent_class;
};

GObjectClass parent_class;

The parent class.

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.

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().

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().

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.

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.

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.

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.

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]

Property Details

The "attributes" property

  "attributes"               GHashTable*           : Read

Attributes overrides.


The "filename" property

  "filename"                 gchar*                : Read / Write / Construct Only

Filename of the extension.

Default value: NULL


The "id" property

  "id"                       gint                  : Read / Write / Construct Only

Path to file where definitions of overrides are defined.

Default value: 0

Signal Details

The "extended-attribute-changed" signal

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

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

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.