IBus.EngineSimple

g GObject.InitiallyUnowned GObject.InitiallyUnowned IBus.Object IBus.Object GObject.InitiallyUnowned->IBus.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned IBus.Engine IBus.Engine IBus.EngineSimple IBus.EngineSimple IBus.Engine->IBus.EngineSimple IBus.Service IBus.Service IBus.Object->IBus.Service IBus.Service->IBus.Engine

Subclasses:

None

Methods

Inherited:

IBus.Engine (21), IBus.Service (8), IBus.Object (2), GObject.Object (37)

Structs:

IBus.ServiceClass (2), GObject.ObjectClass (5)

add_compose_file (file)

add_table (data, max_seq_len, n_seqs)

add_table_by_locale (locale)

Virtual Methods

Inherited:

IBus.Engine (22), IBus.Service (3), IBus.Object (1), GObject.Object (7)

Properties

Inherited:

IBus.Engine (3), IBus.Service (2)

Signals

Inherited:

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

Fields

Inherited:

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

Name

Type

Access

Description

parent

IBus.Engine

r

Class Details

class IBus.EngineSimple(**kwargs)
Bases:

IBus.Engine

Abstract:

No

Structure:

IBus.EngineSimpleClass

An IBus.EngineSimple provides table-based input method logic.

see_also: IBus.Engine

add_compose_file(file)
Parameters:

file (str) – The compose file.

Returns:

True if the file is loaded.

Return type:

bool

Call IBus.EngineSimple.add_table() internally by locale.

add_table(data, max_seq_len, n_seqs)
Parameters:
  • data ([int]) – The table which must be available during the whole life of the simple engine.

  • max_seq_len (int) – Maximum length of a sequence in the table (cannot be greater than IBus.MAX_COMPOSE_LEN)

  • n_seqs (int) – number of sequences in the table

Adds an additional table to search to the engine. Each row of the table consists of max_seq_len key symbols followed by two guint16 interpreted as the high and low words of a gunicode value. Tables are searched starting from the last added.

The table must be sorted in dictionary order on the numeric value of the key symbol fields. (Values beyond the length of the sequence should be zero.)

add_table_by_locale(locale)
Parameters:

locale (str or None) – The locale name. If the locale is None, the current locale is used.

Returns:

True if the locale is matched to the table.

Return type:

bool

Call IBus.EngineSimple.add_table() internally by locale.