![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
IBusConfig; IBusConfigClass; IBusConfig * ibus_config_new (GDBusConnection *connection
,GCancellable *cancellable
,GError **error
); GVariant * ibus_config_get_value (IBusConfig *config
,const gchar *section
,const gchar *name
); void ibus_config_get_value_async (IBusConfig *config
,const gchar *section
,const gchar *name
,gint timeout_ms
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GVariant * ibus_config_get_value_async_finish (IBusConfig *config
,GAsyncResult *result
,GError **error
); gboolean ibus_config_set_value (IBusConfig *config
,const gchar *section
,const gchar *name
,GVariant *value
); void ibus_config_set_value_async (IBusConfig *config
,const gchar *section
,const gchar *name
,GVariant *value
,gint timeout_ms
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean ibus_config_set_value_async_finish (IBusConfig *config
,GAsyncResult *result
,GError **error
); gboolean ibus_config_unset (IBusConfig *config
,const gchar *section
,const gchar *name
);
An IBusConfig provides engine configuration methods such as get and set the configure settings to configuration file.
Currently, IBusConfig supports gconf.
IBusConfig * ibus_config_new (GDBusConnection *connection
,GCancellable *cancellable
,GError **error
);
New a IBusConfig from existing GDBusConnection.
|
An GDBusConnection. |
|
|
|
|
Returns : |
An newly allocated IBusConfig corresponding to connection .
|
GVariant * ibus_config_get_value (IBusConfig *config
,const gchar *section
,const gchar *name
);
Get the value of a configuration option synchronously.
GConf stores configure options in a tree-like structure,
and the IBus related setting is at /desktop/ibus,
thus, section
here is a path from there,
while name
is the key of that configuration option.
ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Chewing,
so the section name for it is "engine/Chewing".
see_also
: ibus_config_set_value.
|
An IBusConfig |
|
Section name of the configuration option. |
|
Name of the configure option. |
Returns : |
A GVariant or NULL . Free with g_variant_unref() .
|
void ibus_config_get_value_async (IBusConfig *config
,const gchar *section
,const gchar *name
,gint timeout_ms
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Get the value of a configuration option asynchronously.
see_also
: ibus_config_get_value.
|
An IBusConfig |
|
Section name of the configuration option. |
|
Name of the configure option. |
|
|
|
A GCancellable or NULL .
|
|
Callback function to invoke when the return value is ready. |
|
The data to pass to callback. |
GVariant * ibus_config_get_value_async_finish (IBusConfig *config
,GAsyncResult *result
,GError **error
);
Finish get value of a configuration option.
see_also
: ibus_config_get_value_async.
|
|
|
A GAsyncResult. |
|
Return location for error or NULL .
|
Returns : |
A GVariant or NULL if error is set. Free with g_variant_unref() .
|
gboolean ibus_config_set_value (IBusConfig *config
,const gchar *section
,const gchar *name
,GVariant *value
);
Set the value of a configuration option synchronously.
see_also
: ibus_config_get_value.
|
An IBusConfig |
|
Section name of the configuration option. |
|
Name of the configure option its self. |
|
A GVariant that holds the value. If the value is floating, the function takes ownership of it. |
Returns : |
TRUE if succeed; FALSE otherwise. |
void ibus_config_set_value_async (IBusConfig *config
,const gchar *section
,const gchar *name
,GVariant *value
,gint timeout_ms
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Set the value of a configuration option asynchronously.
see_also
: ibus_config_set_value.
|
An IBusConfig |
|
Section name of the configuration option. |
|
Name of the configure option. |
|
A GVariant that holds the value. If the value is floating, the function takes ownership of it. |
|
|
|
A GCancellable or NULL .
|
|
Callback function to invoke when the return value is ready. |
|
The data to pass to callback. |
gboolean ibus_config_set_value_async_finish (IBusConfig *config
,GAsyncResult *result
,GError **error
);
Finish set value of a configuration option.
see_also
: ibus_config_set_value_async.
|
|
|
A GAsyncResult. |
|
Return location for error or NULL .
|
Returns : |
TRUE or FALSE if error is set.
|
gboolean ibus_config_unset (IBusConfig *config
,const gchar *section
,const gchar *name
);
Remove an entry of a configuration option.
see_also
: ibus_config_get_value.
|
An IBusConfig |
|
Section name of the configuration option. |
|
Name of the configure option its self. |
Returns : |
TRUE if succeed; FALSE otherwise. |
"value-changed"
signalvoid user_function (IBusConfig *config, gchar *section, gchar *name, GVariant value, gpointer user_data) : Run Last
Emitted when configuration value is changed.
<note><para>Argument user_data
is ignored in this function.</para></note>
|
An IBusConfig. |
|
Section name. |
|
Name of the property. |
|
Value. |
|
user data set when the signal handler was connected. |