| IBus Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
IBusComponent; IBusComponent * ibus_component_new (const gchar *name,const gchar *description,const gchar *version,const gchar *license,const gchar *author,const gchar *homepage,const gchar *exec,const gchar *textdomain); IBusComponent * ibus_component_new_from_xml_node (XMLNode *node); IBusComponent * ibus_component_new_from_file (const gchar *filename); void ibus_component_add_observed_path (IBusComponent *component,const gchar *path,gboolean access_fs); void ibus_component_add_engine (IBusComponent *component,IBusEngineDesc *engine); GList * ibus_component_get_engines (IBusComponent *component); void ibus_component_output (IBusComponent *component,GString *output,gint indent); void ibus_component_output_engines (IBusComponent *component,GString *output,gint indent); gboolean ibus_component_check_modification (IBusComponent *component); gboolean ibus_component_start (IBusComponent *component,gboolean verbose); gboolean ibus_component_stop (IBusComponent *component); gboolean ibus_component_is_running (IBusComponent *component); IBusComponent * ibus_component_get_from_engine (IBusEngineDesc *engine);
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusComponent
An IBusComponent is an executable program. It provides services such as user interface, configuration, and input method engine (IME).
It is recommended that IME developers provide
a component XML file and
load the XML file by ibus_component_new_from_file().
The format of a component XML file is described at http://code.google.com/p/ibus/wiki/DevXML
typedef struct {
gchar *name;
gchar *description;
gchar *version;
gchar *license;
gchar *author;
gchar *homepage;
gchar *exec;
/* text domain for dgettext */
gchar *textdomain;
} IBusComponent;
An IBusComponent stores component information.
gchar * |
Name of the component. |
gchar * |
Detailed description of component. |
gchar * |
Component version. |
gchar * |
Distribution license of this component. |
gchar * |
Author(s) of the component. |
gchar * |
Homepage of the component. |
gchar * |
path to component executable. |
gchar * |
Domain name for dgettext()
|
IBusComponent * ibus_component_new (const gchar *name,const gchar *description,const gchar *version,const gchar *license,const gchar *author,const gchar *homepage,const gchar *exec,const gchar *textdomain);
New an IBusComponent.
|
Name of the component. |
|
Detailed description of component. |
|
Component version. |
|
Distribution license of this component. |
|
Author(s) of the component. |
|
Homepage of the component. |
|
path to component executable. |
|
Domain name for dgettext()
|
Returns : |
A newly allocated IBusComponent. |
IBusComponent * ibus_component_new_from_xml_node (XMLNode *node);
New an IBusComponent from an XML tree.
|
Root node of component XML tree. |
Returns : |
A newly allocated IBusComponent. |
IBusComponent * ibus_component_new_from_file (const gchar *filename);
New an IBusComponent from an XML file.
Note that a component file usually contains engine descriptions,
if it does, ibus_engine_desc_new_from_xml_node() will be called
to load the engine descriptions.
|
An XML file that contains component information. |
Returns : |
A newly allocated IBusComponent. |
void ibus_component_add_observed_path (IBusComponent *component,const gchar *path,gboolean access_fs);
Add an observed path to IBusComponent.
|
An IBusComponent |
|
Observed path to be added. |
|
TRUE for filling the file status; FALSE otherwise. |
void ibus_component_add_engine (IBusComponent *component,IBusEngineDesc *engine);
Add an engine to IBusComponent according to the description in engine.
|
An IBusComponent |
|
A description of an engine. |
GList * ibus_component_get_engines (IBusComponent *component);
Get the engines of this component.
|
An IBusComponent. |
Returns : |
A newly allocated GList that contains engines.. transfer none. element-type IBusEngineDesc. |
void ibus_component_output (IBusComponent *component,GString *output,gint indent);
Output IBusComponent as an XML-formatted string. The output string can be then shown on the screen or written to file.
|
An IBusComponent. |
|
GString that holds the result. |
|
level of indent. |
void ibus_component_output_engines (IBusComponent *component,GString *output,gint indent);
Output engine description as an XML-formatted string. The output string can be then shown on the screen or written to file.
|
An IBusComponent. |
|
GString that holds the result. |
|
level of indent. |
gboolean ibus_component_check_modification (IBusComponent *component);
Check whether the observed paths of component is modified.
|
An IBusComponent. |
Returns : |
TRUE if at least one of the observed paths is modified; FALSE otherwise. |
gboolean ibus_component_start (IBusComponent *component,gboolean verbose);
Whether the IBusComponent is started.
|
An IBusComponent. |
|
if redirect the child output to /dev/null |
Returns : |
TRUE if the component is started; FALSE otherwise. |
gboolean ibus_component_stop (IBusComponent *component);
Whether the IBusComponent is stopped.
|
An IBusComponent. |
Returns : |
TRUE if the component is stopped; FALSE otherwise. |
gboolean ibus_component_is_running (IBusComponent *component);
Whether the IBusComponent is running.
|
An IBusComponent. |
Returns : |
TRUE if the component is running; FALSE otherwise. |
IBusComponent * ibus_component_get_from_engine (IBusEngineDesc *engine);
Get the IBusComponent from an engine description.
|
A description of an engine. |
Returns : |
An IBusComponent of the engine.. transfer none. |