IBusConfig

IBusConfig — IBus engine configuration module.

Synopsis

                    IBusConfig;
IBusConfig *        ibus_config_new                     (IBusConnection *connection);
gboolean            ibus_config_get_value               (IBusConfig *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         GValue *value);
gboolean            ibus_config_set_value               (IBusConfig *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         const GValue *value);
gboolean            ibus_config_unset                   (IBusConfig *config,
                                                         const gchar *section,
                                                         const gchar *name);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----IBusObject
               +----IBusProxy
                     +----IBusConfig

Signals

  "value-changed"                                  : Run Last

Description

An IBusConfig provides engine configuration methods such as get and set the configure settings to configuration file.

Currently, IBusConfig supports gconf.

Details

IBusConfig

typedef struct _IBusConfig IBusConfig;

An opaque data type representing an IBusConfig.


ibus_config_new ()

IBusConfig *        ibus_config_new                     (IBusConnection *connection);

New a IBusConfig from existing IBusConnection.

connection :

An IBusConnection.

Returns :

An newly allocated IBusConfig corresponding to connection.

ibus_config_get_value ()

gboolean            ibus_config_get_value               (IBusConfig *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         GValue *value);

Get the value of a configuration option.

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.

config :

An IBusConfig

section :

Section name of the configuration option.

name :

Name of the configure option.

value :

GValue that holds the value.

Returns :

TRUE if succeed; FALSE otherwise.

ibus_config_set_value ()

gboolean            ibus_config_set_value               (IBusConfig *config,
                                                         const gchar *section,
                                                         const gchar *name,
                                                         const GValue *value);

Set the value of a configuration option. see_also: ibus_config_get_value.

config :

An IBusConfig

section :

Section name of the configuration option.

name :

Name of the configure option its self.

value :

GValue that holds the value.

Returns :

TRUE if succeed; FALSE otherwise.

ibus_config_unset ()

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.

config :

An IBusConfig

section :

Section name of the configuration option.

name :

Name of the configure option its self.

Returns :

TRUE if succeed; FALSE otherwise.

Signal Details

The "value-changed" signal

void                user_function                      (IBusConfig *section,
                                                        gchar      *name,
                                                        gchar      *value,
                                                        GValue     *arg3,
                                                        gpointer    user_data)      : Run Last

Emitted when configuration value is changed.

Note

Argument user_data is ignored in this function.

section :

Section name.

name :

Name of the property.

value :

Value.

user_data :

user data set when the signal handler was connected.