IBus.Component

g GObject.InitiallyUnowned GObject.InitiallyUnowned IBus.Object IBus.Object GObject.InitiallyUnowned->IBus.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned IBus.Component IBus.Component IBus.Serializable IBus.Serializable IBus.Object->IBus.Serializable IBus.Serializable->IBus.Component

Subclasses:

None

Methods

Inherited:

IBus.Serializable (7), IBus.Object (2), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name, description, version, license, author, homepage, command_line, textdomain)

class

new_from_file (filename)

class

new_from_xml_node (node)

add_engine (engine)

add_observed_path (path, access_fs)

check_modification ()

get_author ()

get_description ()

get_engines ()

get_exec ()

get_homepage ()

get_license ()

get_name ()

get_observed_paths ()

get_textdomain ()

get_version ()

output (output, indent)

output_engines (output, indent)

Virtual Methods

Inherited:

IBus.Serializable (3), IBus.Object (1), GObject.Object (7)

Properties

Name

Type

Flags

Short Description

author

str

r/w/co

The author of component

command-line

str

r/w/co

The command line of component

description

str

r/w/co

The description of component

homepage

str

r/w/co

The homepage of component

license

str

r/w/co

The license of component

name

str

r/w/co

The name of component

textdomain

str

r/w/co

The textdomain path of component

version

str

r/w/co

The version of component

Signals

Inherited:

IBus.Object (1), GObject.Object (1)

Fields

Inherited:

IBus.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent

IBus.Serializable

r

pdummy

[object]

r

Class Details

class IBus.Component(**kwargs)
Bases:

IBus.Serializable

Abstract:

No

Structure:

IBus.ComponentClass

An IBus.Component 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

https://github.com/ibus/ibus/wiki/DevXML

classmethod new(name, description, version, license, author, homepage, command_line, textdomain)
Parameters:
  • name (str) – Name of the component.

  • description (str) – Detailed description of component.

  • version (str) – Component version.

  • license (str) – Distribution license of this component.

  • author (str) – Author(s) of the component.

  • homepage (str) – Homepage of the component.

  • command_line (str) – path to component executable.

  • textdomain (str) – Domain name for dgettext()

Returns:

A newly allocated IBus.Component.

Return type:

IBus.Component

Creates a new IBus.Component.

classmethod new_from_file(filename)
Parameters:

filename (str) – An XML file that contains component information.

Returns:

A newly allocated IBus.Component.

Return type:

IBus.Component

Creates a new IBus.Component from an XML file. Note that a component file usually contains engine descriptions, if it does, IBus.EngineDesc.new_from_xml_node() will be called to load the engine descriptions.

classmethod new_from_xml_node(node)
Parameters:

node (IBus.XML) – Root node of component XML tree.

Returns:

A newly allocated IBus.Component.

Return type:

IBus.Component

Creates a new IBus.Component from an XML tree.

add_engine(engine)
Parameters:

engine (IBus.EngineDesc) – A description of an engine.

Add an engine to IBus.Component according to the description in engine.

add_observed_path(path, access_fs)
Parameters:
  • path (str) – Observed path to be added.

  • access_fs (bool) – True for filling the file status; False otherwise.

Add an observed path to IBus.Component.

check_modification()
Returns:

True if at least one of the observed paths is modified; False otherwise.

Return type:

bool

Check whether the observed paths of component is modified.

get_author()
Returns:

author property in IBus.Component

Return type:

str

Gets the author property in IBus.Component. It should not be freed.

get_description()
Returns:

description property in IBus.Component

Return type:

str

Gets the description property in IBus.Component. It should not be freed.

get_engines()
Returns:

A newly allocated GLib.List that contains engines.

Return type:

[IBus.EngineDesc]

Gets the engines of this component.

get_exec()
Returns:

exec property in IBus.Component

Return type:

str

Gets the exec property in IBus.Component. It should not be freed.

get_homepage()
Returns:

homepage property in IBus.Component

Return type:

str

Gets the homepage property in IBus.Component. It should not be freed.

get_license()
Returns:

license property in IBus.Component

Return type:

str

Gets the license property in IBus.Component. It should not be freed.

get_name()
Returns:

name property in IBus.Component

Return type:

str

Gets the name property in IBus.Component. It should not be freed.

get_observed_paths()
Returns:

A newly allocated GLib.List that contains observed paths.

Return type:

[IBus.ObservedPath]

Gets the observed paths of this component.

get_textdomain()
Returns:

textdomain property in IBus.Component

Return type:

str

Gets the textdomain property in IBus.Component. It should not be freed.

get_version()
Returns:

version property in IBus.Component

Return type:

str

Gets the version property in IBus.Component. It should not be freed.

output(output, indent)
Parameters:

Output IBus.Component as an XML-formatted string. The output string can be then shown on the screen or written to file.

output_engines(output, indent)
Parameters:

Output engine description as an XML-formatted string. The output string can be then shown on the screen or written to file.

Property Details

IBus.Component.props.author
Name:

author

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The author of component

IBus.Component.props.command_line
Name:

command-line

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The exec path of component

IBus.Component.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The description of component

IBus.Component.props.homepage
Name:

homepage

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The homepage of component

IBus.Component.props.license
Name:

license

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The license of component

IBus.Component.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of component

IBus.Component.props.textdomain
Name:

textdomain

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The textdomain of component

IBus.Component.props.version
Name:

version

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The version of component