| IBus Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
struct IBusRegistry; struct IBusRegistryClass; IBusRegistry * ibus_registry_new (void); void ibus_registry_load (IBusRegistry *registry); void ibus_registry_load_in_dir (IBusRegistry *registry,const gchar *dirname); gboolean ibus_registry_load_cache (IBusRegistry *registry,gboolean is_user); gboolean ibus_registry_load_cache_file (IBusRegistry *registry,const gchar *filename); gboolean ibus_registry_save_cache (IBusRegistry *registry,gboolean is_user); gboolean ibus_registry_save_cache_file (IBusRegistry *registry,const gchar *filename); void ibus_registry_output (IBusRegistry *registry,GString *output,int indent); gboolean ibus_registry_check_modification (IBusRegistry *registry); GList * ibus_registry_get_components (IBusRegistry *registry); GList * ibus_registry_get_observed_paths (IBusRegistry *registry); void ibus_registry_start_monitor_changes (IBusRegistry *registry);
GObject
+----GInitiallyUnowned
+----IBusObject
+----IBusSerializable
+----IBusRegistry
An IBusRegistry loads IBus component files and generates the cache files.
see_also: IBusComponent
struct IBusRegistry;
Registry cache handling. You can load the registry from compose files or a cache file.
IBusRegistry * ibus_registry_new (void);
New a IBusRegistry
Returns : |
A newly allocated IBusRegistry. |
void ibus_registry_load (IBusRegistry *registry);
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 ':'.
|
An IBusRegistry. |
void ibus_registry_load_in_dir (IBusRegistry *registry,const gchar *dirname);
Read all XML files in dirname, create a IBusComponent object for each file,
and add the component objects to the registry.
If dirname is "/usr/share/ibus/component", this API and
ibus_registry_load() are same.
|
An IBusRegistry. |
|
IBus component directory which includes XML files. |
gboolean ibus_registry_load_cache (IBusRegistry *registry,gboolean is_user);
Load the user or system registry cache.
|
An IBusRegistry. |
|
TRUE if the registry cache is loaded in the user directory. |
Returns : |
TRUE if the cache exists and is loaded successfully,
FALSE otherwise. |
gboolean ibus_registry_load_cache_file (IBusRegistry *registry,const gchar *filename);
Load the registry cache filename.
|
An IBusRegistry. |
|
The file path of the registry cache |
Returns : |
TRUE if the cache exists and is loaded successfully,
FALSE otherwise. |
gboolean ibus_registry_save_cache (IBusRegistry *registry,gboolean is_user);
Save the registry in a user directory or system directory.
|
An IBusRegistry. |
|
TRUE if the registry cache is saved in the user directory. |
Returns : |
TRUE if the cache is saved successfully, FALSE otherwise. |
gboolean ibus_registry_save_cache_file (IBusRegistry *registry,const gchar *filename);
Save the registry cache filename.
|
An IBusRegistry. |
|
The file path of the registry cache |
Returns : |
TRUE if the cache is saved successfully, FALSE otherwise. |
void ibus_registry_output (IBusRegistry *registry,GString *output,int indent);
Output IBusRegistry as an XML-formatted string. The output string can be then shown on the screen or written to file.
|
An IBusRegistry. |
|
GString that holds the result. |
|
level of indent. |
gboolean ibus_registry_check_modification (IBusRegistry *registry);
Check if the registry is updated.
|
An IBusRegistry. |
Returns : |
TRUE if mtime is changed; FALSE otherwise. |
GList * ibus_registry_get_components (IBusRegistry *registry);
List components.
|
An IBusRegistry. |
Returns : |
a list of IBusComponent objects.
The caller has to call g_list_free() for the returned list. [transfer container][element-type IBusComponent]
|
GList * ibus_registry_get_observed_paths (IBusRegistry *registry);
List observed paths.
|
An IBusRegistry. |
Returns : |
a list of IBusObservedPath objects.
The caller has to call g_list_free() for the returned list. [transfer container][element-type IBusObservedPath]
|
void ibus_registry_start_monitor_changes (IBusRegistry *registry);
Start to monitor observed paths.
|
An IBusRegistry. |
"changed" signalvoid user_function (IBusRegistry *registry,
gpointer user_data) : Run Last
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().
|
An IBusRegistry. |
|
user data set when the signal handler was connected. |