IBusEngineDesc

IBusEngineDesc — Input method engine description data.

Stability Level

Stable, unless otherwise indicated

Synopsis

                    IBusEngineDesc;
                    IBusEngineDescClass;
                    BusComponent;
IBusEngineDesc *    ibus_engine_desc_new                (const gchar *name,
                                                         const gchar *longname,
                                                         const gchar *description,
                                                         const gchar *language,
                                                         const gchar *license,
                                                         const gchar *author,
                                                         const gchar *icon,
                                                         const gchar *layout);
IBusEngineDesc *    ibus_engine_desc_new_from_xml_node  (XMLNode *node);
void                ibus_engine_desc_output             (IBusEngineDesc *info,
                                                         GString *output,
                                                         gint indent);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----IBusObject
               +----IBusSerializable
                     +----IBusEngineDesc

Description

An IBusEngineDesc stores description data of IBusEngine. The description data can either be passed to ibus_engine_desc_new(), or loaded from an XML node through ibus_engine_desc_new_from_xml_node() to construct IBusEngineDesc.

However, the recommended way to load engine description data is using ibus_component_new_from_file() to load a component file, which also includes engine description data.

see_also: IBusComponent, IBusEngine

Details

IBusEngineDesc

typedef struct {
    gchar *name;
    gchar *longname;
    gchar *description;
    gchar *language;
    gchar *license;
    gchar *author;
    gchar *icon;
    gchar *layout;
    gchar *hotkeys;
    guint  rank;
} IBusEngineDesc;

Input method engine description data.

gchar *name;

Name of the engine.

gchar *longname;

Long name of the input method engine.

gchar *description;

Input method engine description.

gchar *language;

Language (e.g. zh, jp) supported by this input method engine.

gchar *license;

License of the input method engine.

gchar *author;

Author of the input method engine.

gchar *icon;

Icon file of this engine.

gchar *layout;

Keyboard layout

gchar *hotkeys;

One or more hotkeys for switching to this engine, separated by semi-colon.

guint rank;

Preference rank among engines, the highest ranked IME will put in the front.

IBusEngineDescClass

typedef struct {
    IBusSerializableClass parent;
    /* class members */
} IBusEngineDescClass;


BusComponent

typedef struct _BusComponent BusComponent;


ibus_engine_desc_new ()

IBusEngineDesc *    ibus_engine_desc_new                (const gchar *name,
                                                         const gchar *longname,
                                                         const gchar *description,
                                                         const gchar *language,
                                                         const gchar *license,
                                                         const gchar *author,
                                                         const gchar *icon,
                                                         const gchar *layout);

New a IBusEngineDesc.

name :

Name of the engine.

longname :

Long name of the input method engine.

description :

Input method engine description.

language :

Language (e.g. zh, jp) supported by this input method engine.

license :

License of the input method engine.

author :

Author of the input method engine.

icon :

Icon file of this engine.

layout :

Keyboard layout

Returns :

A newly allocated IBusEngineDesc.

ibus_engine_desc_new_from_xml_node ()

IBusEngineDesc *    ibus_engine_desc_new_from_xml_node  (XMLNode *node);

New a IBusEngineDesc from an XML node.

Note

This function is called by ibus_component_new_from_file(), so developers normally do not need to call it directly.

node :

An XML node

Returns :

A newly allocated IBusEngineDesc that contains description from node.

ibus_engine_desc_output ()

void                ibus_engine_desc_output             (IBusEngineDesc *info,
                                                         GString *output,
                                                         gint indent);

Output XML-formatted input method engine description. The result will be append to GString specified in output.

info :

An IBusEngineDesc

output :

XML-formatted Input method engine description.

indent :

Number of indent (showed as 4 spaces).