IBus.Registry¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when any observed paths are changed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class IBus.Registry(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An
IBus.Registry
loads IBus component files and generates the cache files.see_also:
IBus.Component
- classmethod new()¶
- Returns:
A newly allocated
IBus.Registry
.- Return type:
Creates a new
IBus.Registry
- check_modification()¶
-
Check if the registry is updated.
- get_components()¶
- Returns:
a list of
IBus.Component
objects. The caller has to call g_list_free() for the returned list.- Return type:
List components.
- get_observed_paths()¶
- Returns:
a list of
IBus.ObservedPath
objects. The caller has to call g_list_free() for the returned list.- Return type:
List observed paths.
- load()¶
Read all XML files in a IBus component directory (typically /usr/share/ibus/component/ *.xml) and update the registry object. IBUS_COMPONENT_PATH environment valuable is also available for the custom component directories, whose delimiter is ‘:’.
- load_cache(is_user)¶
- Parameters:
is_user (
bool
) –True
if the registry cache is loaded in the user directory.- Returns:
True
if the cache exists and is loaded successfully,False
otherwise.- Return type:
Load the user or system registry cache.
- load_cache_file(filename)¶
- Parameters:
filename (
str
) – The file path of the registry cache- Returns:
True
if the cache exists and is loaded successfully,False
otherwise.- Return type:
Load the registry cache filename.
- load_in_dir(dirname)¶
- Parameters:
dirname (
str
) – IBus component directory which includes XML files.
Read all XML files in dirname, create a
IBus.Component
object for each file, and add the component objects to the registry. If dirname is “/usr/share/ibus/component”, this API andIBus.Registry.load
() are same.
- output(output, indent)¶
- Parameters:
output (
GLib.String
) –GLib.String
that holds the result.indent (
int
) – level of indent.
Output
IBus.Registry
as an XML-formatted string. The output string can be then shown on the screen or written to file.
- save_cache(is_user)¶
- Parameters:
is_user (
bool
) –True
if the registry cache is saved in the user directory.- Returns:
- Return type:
Save the registry in a user directory or system directory.
- save_cache_file(filename)¶
- Parameters:
filename (
str
) – The file path of the registry cache- Returns:
- Return type:
Save the registry cache filename.
- start_monitor_changes()¶
Start to monitor observed paths.
Signal Details¶
- IBus.Registry.signals.changed(registry)¶
- Signal Name:
changed
- Flags:
- Parameters:
registry (
IBus.Registry
) – The object which received the signal
Emitted when any observed paths are changed. A method is not associated in this class. the “changed” signal would be handled in other classes.
See also:
IBus.Registry.start_monitor_changes
().