IBusBus

IBusBus — Connect with IBus daemon.

Stability Level

Stable, unless otherwise indicated

Synopsis

                    IBusBus;
IBusBus *           ibus_bus_new                        (void);
gboolean            ibus_bus_is_connected               (IBusBus *bus);
const gchar *       ibus_bus_hello                      (IBusBus *bus);
guint               ibus_bus_request_name               (IBusBus *bus,
                                                         const gchar *name,
                                                         guint flags);
guint               ibus_bus_release_name               (IBusBus *bus,
                                                         const gchar *name);
gboolean            ibus_bus_name_has_owner             (IBusBus *bus,
                                                         const gchar *name);
GList *             ibus_bus_list_names                 (IBusBus *bus);
void                ibus_bus_add_match                  (IBusBus *bus,
                                                         const gchar *rule);
void                ibus_bus_remove_match               (IBusBus *bus,
                                                         const gchar *rule);
gchar *             ibus_bus_get_name_owner             (IBusBus *bus,
                                                         const gchar *name);
gboolean            ibus_bus_exit                       (IBusBus *bus,
                                                         gboolean restart);
gchar *             ibus_bus_current_input_context      (IBusBus *bus);
gboolean            ibus_bus_register_component         (IBusBus *bus,
                                                         IBusComponent *component);
GList *             ibus_bus_list_engines               (IBusBus *bus);
GList *             ibus_bus_list_active_engines        (IBusBus *bus);
IBusConfig *        ibus_bus_get_config                 (IBusBus *bus);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----IBusObject
               +----IBusBus

Signals

  "connected"                                      : Run Last
  "disconnected"                                   : Run Last

Description

An IBusBus connects with IBus daemon.

Details

IBusBus

typedef struct _IBusBus IBusBus;

An opaque data type representing IBus bus (daemon communication) status.


ibus_bus_new ()

IBusBus *           ibus_bus_new                        (void);

New an IBusBus instance.

Returns :

A newly allocated IBusBus instance.

ibus_bus_is_connected ()

gboolean            ibus_bus_is_connected               (IBusBus *bus);

Return TRUE if bus is connected to IBus daemon.

bus :

An IBusBus.

Returns :

TRUE if bus is connected, FALSE otherwise.

ibus_bus_hello ()

const gchar *       ibus_bus_hello                      (IBusBus *bus);

This function sends a "HELLO" message to DBus daemon, which replies the unique name of current IBus process.

bus :

An IBusBus.

Returns :

The unique name of IBus process in DBus.

ibus_bus_request_name ()

guint               ibus_bus_request_name               (IBusBus *bus,
                                                         const gchar *name,
                                                         guint flags);

Request a name from IBus daemon.

bus :

the IBusBus instance to be processed.

name :

Name to be requested.

flags :

Flags (FixMe).

Returns :

0 if failed; positive number otherwise.

ibus_bus_release_name ()

guint               ibus_bus_release_name               (IBusBus *bus,
                                                         const gchar *name);

Release a name to IBus daemon.

bus :

An IBusBus.

name :

Name to be released.

Returns :

0 if failed; positive number otherwise.

ibus_bus_name_has_owner ()

gboolean            ibus_bus_name_has_owner             (IBusBus *bus,
                                                         const gchar *name);

Whether the name has owner.

bus :

An IBusBus.

name :

Name to be released.

Returns :

TRUE if the name has owner, FALSE otherwise.

ibus_bus_list_names ()

GList *             ibus_bus_list_names                 (IBusBus *bus);

Return lists that attached to bus.

Note

[FixMe] Not implemented yet, only return NULL.

bus :

An IBusBus.

Returns :

Lists that attached to bus.

ibus_bus_add_match ()

void                ibus_bus_add_match                  (IBusBus *bus,
                                                         const gchar *rule);

Add a match rule to an IBusBus.

bus :

An IBusBus.

rule :

Match rule.

ibus_bus_remove_match ()

void                ibus_bus_remove_match               (IBusBus *bus,
                                                         const gchar *rule);

Remove a match rule to an IBusBus.

bus :

An IBusBus.

rule :

Match rule.

ibus_bus_get_name_owner ()

gchar *             ibus_bus_get_name_owner             (IBusBus *bus,
                                                         const gchar *name);

Return the name owner.

bus :

An IBusBus.

name :

Name.

Returns :

Owner of the name. The returned value must be freed with g_free().

ibus_bus_exit ()

gboolean            ibus_bus_exit                       (IBusBus *bus,
                                                         gboolean restart);

Exit or restart an IBusBus.

bus :

An IBusBus.

restart :

Whether restarting the ibus.

Returns :

TRUE if the "Exit" call is suceeded, FALSE otherwise.

ibus_bus_current_input_context ()

gchar *             ibus_bus_current_input_context      (IBusBus *bus);

Get the current focused input context.

bus :

An IBusBus.

Returns :

The named of currently focued IBusInputContext if the "CurrentInputContext" call suceeded, NULL otherwise. The return value must be freed with g_free().

ibus_bus_register_component ()

gboolean            ibus_bus_register_component         (IBusBus *bus,
                                                         IBusComponent *component);

Register a componet to an IBusBus.

bus :

An IBusBus.

component :

A input engine component.

Returns :

TRUE if the "RegisterComponent" call is suceeded, FALSE otherwise.

ibus_bus_list_engines ()

GList *             ibus_bus_list_engines               (IBusBus *bus);

List engines. Note that this function is not yet implemented.

bus :

An IBusBus.

Returns :

A GList of engines.

ibus_bus_list_active_engines ()

GList *             ibus_bus_list_active_engines        (IBusBus *bus);

List active engines. Note that this function is not yet implemented.

Note

Not yet implemented.

bus :

An IBusBus.

Returns :

A GList of active engines.

ibus_bus_get_config ()

IBusConfig *        ibus_bus_get_config                 (IBusBus *bus);

Get the config instance from IBusBus.

bus :

An IBusBus.

Returns :

An newly allocated IBusConfig which is configurable with bus.

Signal Details

The "connected" signal

void                user_function                      (IBusBus *arg0,
                                                        gpointer user_data)      : Run Last

Emitted when IBusBus is connected.

Note

Argument user_data is ignored in this function.

user_data :

user data set when the signal handler was connected.

The "disconnected" signal

void                user_function                      (IBusBus *arg0,
                                                        gpointer user_data)      : Run Last

Emitted when IBusBus is disconnected.

Note

Argument user_data is ignored in this function.

user_data :

user data set when the signal handler was connected.