![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
IBusComponent; IBusComponentClass; IBusComponentPrivate; 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
);
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusComponent
"author" gchar* : Read / Write / Construct Only "description" gchar* : Read / Write / Construct Only "exec" gchar* : Read / Write / Construct Only "homepage" gchar* : Read / Write / Construct Only "license" gchar* : Read / Write / Construct Only "name" gchar* : Read / Write / Construct Only "textdomain" gchar* : Read / Write / Construct Only "version" gchar* : Read / Write / Construct Only
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 { /* padding */ gpointer pdummy[7]; // We can add 7 pointers without breaking the ABI. } IBusComponent;
An IBusComponent stores component information.
You can get extended values with g_object_get_properties.
name: Name of the component.
description: Detailed description of component.
version: Component version.
license: Distribution license of this component.
author: Author(s) of the component.
homepage: Homepage of the component.
exec: path to component executable.
textdomain: Domain name for dgettext()
typedef struct { IBusSerializableClass parent; /* class members */ } IBusComponentClass;
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 container][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. |
"author"
property"author" gchar* : Read / Write / Construct Only
The author of component
Default value: NULL
"description"
property"description" gchar* : Read / Write / Construct Only
The description of component
Default value: NULL
"exec"
property"exec" gchar* : Read / Write / Construct Only
The exec path of component
Default value: NULL
"homepage"
property"homepage" gchar* : Read / Write / Construct Only
The homepage of component
Default value: NULL
"license"
property"license" gchar* : Read / Write / Construct Only
The license of component
Default value: NULL
"name"
property"name" gchar* : Read / Write / Construct Only
The name of component
Default value: NULL
"textdomain"
property"textdomain" gchar* : Read / Write / Construct Only
The textdomain of component
Default value: NULL
"version"
property"version" gchar* : Read / Write / Construct Only
The version of component
Default value: NULL