## IBusBus

IBusBus — Connect with IBus daemon.

## Stability Level

Stable, unless otherwise indicated

## Functions

IBusBus * | ibus_bus_new ()
IBusBus * | ibus_bus_new_async ()
IBusBus * | ibus_bus_new_async_client ()
gboolean | ibus_bus_is_connected ()
GDBusConnection * | ibus_bus_get_connection ()
const gchar * | ibus_bus_get_service_name ()
const gchar * | ibus_bus_hello ()
guint32 | ibus_bus_request_name ()
void | ibus_bus_request_name_async ()
guint | ibus_bus_request_name_async_finish ()
guint | ibus_bus_release_name ()
void | ibus_bus_release_name_async ()
guint | ibus_bus_release_name_async_finish ()
GList * | ibus_bus_list_queued_owners ()
gboolean | ibus_bus_name_has_owner ()
void | ibus_bus_name_has_owner_async ()
gboolean | ibus_bus_name_has_owner_async_finish ()
GList * | ibus_bus_list_names ()
gboolean | ibus_bus_add_match ()
void | ibus_bus_add_match_async ()
gboolean | ibus_bus_add_match_async_finish ()
gboolean | ibus_bus_remove_match ()
void | ibus_bus_remove_match_async ()
gboolean | ibus_bus_remove_match_async_finish ()
gchar * | ibus_bus_get_name_owner ()
void | ibus_bus_get_name_owner_async ()
gchar * | ibus_bus_get_name_owner_async_finish ()
gboolean | ibus_bus_exit ()
void | ibus_bus_exit_async ()
gboolean | ibus_bus_exit_async_finish ()
IBusInputContext * | ibus_bus_create_input_context ()
void | ibus_bus_create_input_context_async ()
IBusInputContext * | ibus_bus_create_input_context_async_finish ()
gchar * | ibus_bus_current_input_context ()
void | ibus_bus_current_input_context_async ()
gchar * | ibus_bus_current_input_context_async_finish ()
gboolean | ibus_bus_register_component ()
void | ibus_bus_register_component_async ()
gboolean | ibus_bus_register_component_async_finish ()
GList * | ibus_bus_list_engines ()
void | ibus_bus_list_engines_async ()
GList * | ibus_bus_list_engines_async_finish ()
GList * | ibus_bus_list_active_engines ()
void | ibus_bus_list_active_engines_async ()
GList * | ibus_bus_list_active_engines_async_finish ()
IBusEngineDesc ** | ibus_bus_get_engines_by_names ()
gboolean | ibus_bus_get_use_sys_layout ()
void | ibus_bus_get_use_sys_layout_async ()
gboolean | ibus_bus_get_use_sys_layout_async_finish ()
gboolean | ibus_bus_get_use_global_engine ()
void | ibus_bus_get_use_global_engine_async ()
gboolean | ibus_bus_get_use_global_engine_async_finish ()
gboolean | ibus_bus_is_global_engine_enabled ()
void | ibus_bus_is_global_engine_enabled_async ()
gboolean | ibus_bus_is_global_engine_enabled_async_finish ()
IBusEngineDesc * | ibus_bus_get_global_engine ()
void | ibus_bus_get_global_engine_async ()
IBusEngineDesc * | ibus_bus_get_global_engine_async_finish ()
gboolean | ibus_bus_set_global_engine ()
void | ibus_bus_set_global_engine_async ()
gboolean | ibus_bus_set_global_engine_async_finish ()
void | ibus_bus_set_watch_dbus_signal ()
void | ibus_bus_set_watch_ibus_signal ()
IBusConfig * | ibus_bus_get_config ()
gboolean | ibus_bus_preload_engines ()
void | ibus_bus_preload_engines_async ()
gboolean | ibus_bus_preload_engines_async_finish ()
GVariant * | ibus_bus_get_ibus_property ()
void | ibus_bus_get_ibus_property_async ()
GVariant * | ibus_bus_get_ibus_property_async_finish ()
void | ibus_bus_set_ibus_property ()
void | ibus_bus_set_ibus_property_async ()
gboolean | ibus_bus_set_ibus_property_async_finish ()

## Properties

gboolean | client-only | Read / Write / Construct Only
gboolean | connect-async | Read / Write / Construct Only

## Signals

void | connected | Run Last
void | disconnected | Run Last
void | global-engine-changed | Run Last
void | name-owner-changed | Run Last

## Types and Values

struct | IBusBus

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── IBusObject
                ╰── IBusBus

## Description

An IBusBus connects with IBus daemon.

## Functions

### ibus_bus_new ()

    IBusBus *
    ibus_bus_new (void);

Creates a new IBusBus instance.

#### Returns

A newly allocated IBusBus instance, and the instance is not floating.

### ibus_bus_new_async ()

    IBusBus *
    ibus_bus_new_async (void);

Creates a new IBusBus instance. The instance will asynchronously connect to the IBus daemon.

#### Returns

A newly allocated IBusBus instance, and the instance is not floating.

### ibus_bus_new_async_client ()

    IBusBus *
    ibus_bus_new_async_client (void);

Creates a new IBusBus instance for client use only. It will possibly be limited in what it can do.

The instance will asynchronously connect to the IBus daemon.

#### Returns

A newly allocated IBusBus instance, and the instance is not floating.

### ibus_bus_is_connected ()

    gboolean
    ibus_bus_is_connected (IBusBus *bus);

Return `TRUE` if `bus` is connected to IBus daemon.

#### Parameters

bus | An IBusBus. |

#### Returns

`TRUE` if `bus` is connected, `FALSE` otherwise.

### ibus_bus_get_connection ()

    GDBusConnection *
    ibus_bus_get_connection (IBusBus *bus);

Gets a GDBusConnection of an IBusBus instance.

#### Parameters

bus | An IBusBus. |

#### Returns

A GDBusConnection of an IBusBus instance.

[transfer none]

### ibus_bus_get_service_name ()

    const gchar *
    ibus_bus_get_service_name (IBusBus *bus);

Return the main service name to use for calls on the ibus connection.

#### Parameters

bus | An IBusBus. |

#### Returns

at dbus name.

### 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.

#### Parameters

bus | An IBusBus. |

#### Returns

The unique name of IBus process in DBus.

### ibus_bus_request_name ()

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

Request a name from IBus daemon synchronously.

#### Parameters

bus | the IBusBus instance to be processed. |
name | Name to be requested. |
flags | IBusBusNameFlag. |

#### Returns

0 if failed; IBusBusRequestNameReply otherwise.

### ibus_bus_request_name_async ()

    void
    ibus_bus_request_name_async (IBusBus *bus,
                                 const gchar *name,
                                 guint flags,
                                 gint timeout_msec,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Request a name from IBus daemon asynchronously.

#### Parameters

bus | An IBusBus. |
name | Name to be requested. |
flags | Flags (FixMe). |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_request_name_async_finish ()

    guint
    ibus_bus_request_name_async_finish (IBusBus *bus,
                                        GAsyncResult *res,
                                        GError **error);

Finishes an operation started with `ibus_bus_request_name_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_request_name_async()`. |
error | Return location for error or `NULL`. |

#### 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 synchronously.

#### Parameters

bus | An IBusBus. |
name | Name to be released. |

#### Returns

0 if failed; positive number otherwise.

### ibus_bus_release_name_async ()

    void
    ibus_bus_release_name_async (IBusBus *bus,
                                 const gchar *name,
                                 gint timeout_msec,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Release a name to IBus daemon asynchronously.

#### Parameters

bus | An IBusBus. |
name | Name to be released. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_release_name_async_finish ()

    guint
    ibus_bus_release_name_async_finish (IBusBus *bus,
                                        GAsyncResult *res,
                                        GError **error);

Finishes an operation started with `ibus_bus_release_name_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_release_name_async()`. |
error | Return location for error or `NULL`. |

#### Returns

0 if failed; positive number otherwise.

### ibus_bus_list_queued_owners ()

    GList *
    ibus_bus_list_queued_owners (IBusBus *bus,
                                 const gchar *name);

Lists the unique bus names of connections currently queued for a bus name. FIXME add an asynchronous version.

#### Parameters

bus | An IBusBus. |
name | Name to be queried. |

#### Returns

The unique bus names of connections currently queued for `name` .

[transfer full][element-type utf8]

### ibus_bus_name_has_owner ()

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

Checks whether the name has owner synchronously.

#### Parameters

bus | An IBusBus. |
name | Name to be checked. |

#### Returns

`TRUE` if the name has owner, `FALSE` otherwise.

### ibus_bus_name_has_owner_async ()

    void
    ibus_bus_name_has_owner_async (IBusBus *bus,
                                   const gchar *name,
                                   gint timeout_msec,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Checks whether the name has owner asynchronously.

#### Parameters

bus | An IBusBus. |
name | Name to be checked. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_name_has_owner_async_finish ()

    gboolean
    ibus_bus_name_has_owner_async_finish (IBusBus *bus,
                                          GAsyncResult *res,
                                          GError **error);

Finishes an operation started with `ibus_bus_name_has_owner_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_name_has_owner_async()`. |
error | Return location for error or `NULL`. |

#### 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` .

[FixMe] Not implemented yet, only return `NULL`.

[FixMe] Add async version.

#### Parameters

bus | An IBusBus. |

#### Returns

Lists that attached to `bus` .

[transfer full][element-type utf8]

### ibus_bus_add_match ()

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

Add a match rule to an IBusBus synchronously.

#### Parameters

bus | An IBusBus. |
rule | Match rule. |

#### Returns

`TRUE` if the rule is added. `FALSE` otherwise.

### ibus_bus_add_match_async ()

    void
    ibus_bus_add_match_async (IBusBus *bus,
                              const gchar *rule,
                              gint timeout_msec,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

Add a match rule to an IBusBus asynchronously.

#### Parameters

bus | An IBusBus. |
rule | Match rule. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_add_match_async_finish ()

    gboolean
    ibus_bus_add_match_async_finish (IBusBus *bus,
                                     GAsyncResult *res,
                                     GError **error);

Finishes an operation started with `ibus_bus_add_match_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_add_match_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the rule is added. `FALSE` otherwise.

### ibus_bus_remove_match ()

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

Remove a match rule to an IBusBus synchronously.

#### Parameters

bus | An IBusBus. |
rule | Match rule. |

#### Returns

`TRUE` if the rule is removed. `FALSE` otherwise.

### ibus_bus_remove_match_async ()

    void
    ibus_bus_remove_match_async (IBusBus *bus,
                                 const gchar *rule,
                                 gint timeout_msec,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Remove a match rule to an IBusBus asynchronously.

#### Parameters

bus | An IBusBus. |
rule | Match rule. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_remove_match_async_finish ()

    gboolean
    ibus_bus_remove_match_async_finish (IBusBus *bus,
                                        GAsyncResult *res,
                                        GError **error);

Finishes an operation started with `ibus_bus_remove_match_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_remove_match_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the rule is removed. `FALSE` otherwise.

### ibus_bus_get_name_owner ()

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

Return the name owner synchronously.

#### Parameters

bus | An IBusBus. |
name | Name. |

#### Returns

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

### ibus_bus_get_name_owner_async ()

    void
    ibus_bus_get_name_owner_async (IBusBus *bus,
                                   const gchar *name,
                                   gint timeout_msec,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Return the name owner asynchronously.

#### Parameters

bus | An IBusBus. |
name | Name. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_get_name_owner_async_finish ()

    gchar *
    ibus_bus_get_name_owner_async_finish (IBusBus *bus,
                                          GAsyncResult *res,
                                          GError **error);

Finishes an operation started with `ibus_bus_get_name_owner_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_get_name_owner_async()`. |
error | Return location for error or `NULL`. |

#### 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 ibus-daemon synchronously.

#### Parameters

bus | An IBusBus. |
restart | Whether restarting the ibus. |

#### Returns

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

### ibus_bus_exit_async ()

    void
    ibus_bus_exit_async (IBusBus *bus,
                         gboolean restart,
                         gint timeout_msec,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Exit or restart ibus-daemon asynchronously.

#### Parameters

bus | An IBusBus. |
restart | Whether restarting the ibus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_exit_async_finish ()

    gboolean
    ibus_bus_exit_async_finish (IBusBus *bus,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with `ibus_bus_exit_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_exit_async()`. |
error | Return location for error or `NULL`. |

#### Returns

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

### ibus_bus_create_input_context ()

    IBusInputContext *
    ibus_bus_create_input_context (IBusBus *bus,
                                   const gchar *client_name);

Create an input context for client synchronously.

#### Parameters

bus | An IBusBus. |
client_name | Name of client. "CreateInputContext" call is suceeded, `NULL` otherwise. |

#### Returns

An newly allocated IBusInputContext if the.

[transfer full]

### ibus_bus_create_input_context_async ()

    void
    ibus_bus_create_input_context_async (IBusBus *bus,
                                         const gchar *client_name,
                                         gint timeout_msec,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Create an input context for client asynchronously.

#### Parameters

bus | An IBusBus. |
client_name | Name of client. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied. It should not be `NULL`. |
user_data | The data to pass to callback. |

### ibus_bus_create_input_context_async_finish ()

    IBusInputContext *
    ibus_bus_create_input_context_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_create_input_context_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_create_input_context_async()`. |
error | Return location for error or `NULL`. |

#### Returns

An newly allocated IBusInputContext if the "CreateInputContext" call is suceeded, `NULL` otherwise.

[transfer full]

### ibus_bus_current_input_context ()

    gchar *
    ibus_bus_current_input_context (IBusBus *bus);

Get the current focused input context synchronously.

#### Parameters

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_current_input_context_async ()

    void
    ibus_bus_current_input_context_async (IBusBus *bus,
                                          gint timeout_msec,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Get the current focused input context asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_current_input_context_async_finish ()

    gchar *
    ibus_bus_current_input_context_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_current_input_context_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_current_input_context_async()`. |
error | Return location for error or `NULL`. |

#### 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 synchronously.

#### Parameters

bus | An IBusBus. |
component | A input engine component. |

#### Returns

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

### ibus_bus_register_component_async ()

    void
    ibus_bus_register_component_async (IBusBus *bus,
                                       IBusComponent *component,
                                       gint timeout_msec,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Register a componet to an IBusBus asynchronously.

#### Parameters

bus | An IBusBus. |
component | A input engine component. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_register_component_async_finish ()

    gboolean
    ibus_bus_register_component_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_register_component_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_register_component_async()`. |
error | Return location for error or `NULL`. |

#### Returns

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

### ibus_bus_list_engines ()

    GList *
    ibus_bus_list_engines (IBusBus *bus);

List engines synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

A List of engines.

[transfer container][element-type IBusEngineDesc]

### ibus_bus_list_engines_async ()

    void
    ibus_bus_list_engines_async (IBusBus *bus,
                                 gint timeout_msec,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

List engines asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_list_engines_async_finish ()

    GList *
    ibus_bus_list_engines_async_finish (IBusBus *bus,
                                        GAsyncResult *res,
                                        GError **error);

Finishes an operation started with `ibus_bus_list_engines_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_list_engines_async()`. |
error | Return location for error or `NULL`. |

#### Returns

A List of engines.

[transfer container][element-type IBusEngineDesc]

### ibus_bus_list_active_engines ()

    GList *
    ibus_bus_list_active_engines (IBusBus *bus);

`ibus_bus_list_active_engines` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/preload-engines instead.

List active engines synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

A List of active engines.

[transfer container][element-type IBusEngineDesc]

### ibus_bus_list_active_engines_async ()

    void
    ibus_bus_list_active_engines_async (IBusBus *bus,
                                        gint timeout_msec,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

`ibus_bus_list_active_engines_async` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/preload-engines instead.

List active engines asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_list_active_engines_async_finish ()

    GList *
    ibus_bus_list_active_engines_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

`ibus_bus_list_active_engines_async_finish` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/preload-engines instead.

Finishes an operation started with `ibus_bus_list_active_engines_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_list_active_engines_async()`. |
error | Return location for error or `NULL`. |

#### Returns

A List of active engines.

[transfer container][element-type IBusEngineDesc]

### ibus_bus_get_engines_by_names ()

    IBusEngineDesc **
    ibus_bus_get_engines_by_names (IBusBus *bus,
                                   const gchar * const *names);

`ibus_bus_get_engines_by_names` is deprecated and should not be used in newly-written code.

Get engines by given names synchronously. If some engine names do not exist, this function will simply ignore them, and return rest of engines. TODO(penghuang): add asynchronous version

#### Parameters

bus | An IBusBus. |
names | A `NULL`-terminated array of names. | [array zero-terminated=1]

#### Returns

A `NULL`-terminated array of engines.

[array zero-terminated=1][transfer full]

### ibus_bus_get_use_sys_layout ()

    gboolean
    ibus_bus_get_use_sys_layout (IBusBus *bus);

`ibus_bus_get_use_sys_layout` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/use_system_keyboard_layout instead.

Check if the bus's "use_sys_layout" option is enabled or not synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

`TRUE` if "use_sys_layout" option is enabled.

### ibus_bus_get_use_sys_layout_async ()

    void
    ibus_bus_get_use_sys_layout_async (IBusBus *bus,
                                       gint timeout_msec,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

`ibus_bus_get_use_sys_layout_async` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/use_system_keyboard_layout instead.

Check if the bus's "use_sys_layout" option is enabled or not asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_get_use_sys_layout_async_finish ()

    gboolean
    ibus_bus_get_use_sys_layout_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

`ibus_bus_get_use_sys_layout_async_finish` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Read dconf value /desktop/ibus/general/use_system_keyboard_layout instead.

Finishes an operation started with `ibus_bus_get_use_sys_layout_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_get_use_sys_layout_async()`. |
error | Return location for error or `NULL`. |

#### Returns

TRUE if "use_sys_layout" option is enabled.

### ibus_bus_get_use_global_engine ()

    gboolean
    ibus_bus_get_use_global_engine (IBusBus *bus);

`ibus_bus_get_use_global_engine` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Currently global engine is always used.

Check if the bus's "use_global_engine" option is enabled or not synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

TRUE if "use_global_engine" option is enabled.

### ibus_bus_get_use_global_engine_async ()

    void
    ibus_bus_get_use_global_engine_async (IBusBus *bus,
                                          gint timeout_msec,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

`ibus_bus_get_use_global_engine_async` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Currently global engine is always used.

Check if the bus's "use_global_engine" option is enabled or not asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_get_use_global_engine_async_finish ()

    gboolean
    ibus_bus_get_use_global_engine_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

`ibus_bus_get_use_global_engine_async_finish` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Currently global engine is always used.

Finishes an operation started with `ibus_bus_get_use_global_engine_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_get_use_global_engine_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if "use_global_engine" option is enabled.

### ibus_bus_is_global_engine_enabled ()

    gboolean
    ibus_bus_is_global_engine_enabled (IBusBus *bus);

`ibus_bus_is_global_engine_enabled` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Probably this would be used for Chrome OS only. Currently global engine is always used and `ibus_bus_get_global_engine()` returns NULL until the first global engine is assigned. You can use `ibus_set_log_handler()` to disable a warning when `ibus_bus_get_global_engine()` returns NULL.

Check if the current global engine is enabled or not synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

`TRUE` if the current global engine is enabled.

### ibus_bus_is_global_engine_enabled_async ()

    void
    ibus_bus_is_global_engine_enabled_async
                                   (IBusBus *bus,
                                    gint timeout_msec,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

`ibus_bus_is_global_engine_enabled_async` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Probably this would be used for Chrome OS only. Currently global engine is always used and `ibus_bus_get_global_engine()` returns NULL until the first global engine is assigned. You can use `ibus_set_log_handler()` to disable a warning when `ibus_bus_get_global_engine()` returns NULL.

Check if the current global engine is enabled or not asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_is_global_engine_enabled_async_finish ()

    gboolean
    ibus_bus_is_global_engine_enabled_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

`ibus_bus_is_global_engine_enabled_async_finish` has been deprecated since version 1.5.3 and should not be used in newly-written code.

Probably this would be used for Chrome OS only. Currently global engine is always used and `ibus_bus_get_global_engine()` returns NULL until the first global engine is assigned. You can use `ibus_set_log_handler()` to disable a warning when `ibus_bus_get_global_engine()` returns NULL.

Finishes an operation started with `ibus_bus_is_global_engine_enabled_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_is_global_engine_enabled_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the current global engine is enabled.

### ibus_bus_get_global_engine ()

    IBusEngineDesc *
    ibus_bus_get_global_engine (IBusBus *bus);

`ibus_bus_get_global_engine` is deprecated and should not be used in newly-written code.

Get the description of current global engine synchronously.

#### Parameters

bus | An IBusBus. |

#### Returns

The description of current global engine, or `NULL` if there is no global engine.

[transfer full]

### ibus_bus_get_global_engine_async ()

    void
    ibus_bus_get_global_engine_async (IBusBus *bus,
                                      gint timeout_msec,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Get the description of current global engine asynchronously.

#### Parameters

bus | An IBusBus. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_get_global_engine_async_finish ()

    IBusEngineDesc *
    ibus_bus_get_global_engine_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_get_global_engine_async_finish()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_get_global_engine_async_finish()`. |
error | Return location for error or `NULL`. |

#### Returns

The description of current global engine, or `NULL` if there is no global engine.

[transfer none]

### ibus_bus_set_global_engine ()

    gboolean
    ibus_bus_set_global_engine (IBusBus *bus,
                                const gchar *global_engine);

Set current global engine synchronously.

#### Parameters

bus | An IBusBus. |
global_engine | A new engine name. |

#### Returns

`TRUE` if the global engine was set successfully.

### ibus_bus_set_global_engine_async ()

    void
    ibus_bus_set_global_engine_async (IBusBus *bus,
                                      const gchar *global_engine,
                                      gint timeout_msec,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Set current global engine asynchronously.

#### Parameters

bus | An IBusBus. |
global_engine | A new engine name. |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_set_global_engine_async_finish ()

    gboolean
    ibus_bus_set_global_engine_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_set_global_engine_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_set_global_engine_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if no IPC errros. `FALSE` otherwise.

### ibus_bus_set_watch_dbus_signal ()

    void
    ibus_bus_set_watch_dbus_signal (IBusBus *bus,
                                    gboolean watch);

Start or stop watching the NameOwnerChanged DBus signal.

#### Parameters

bus | An IBusBus. |
watch | `TRUE` if you want ibusbus to emit "name-owner-changed" signal when ibus-daemon emits the NameOwnerChanged DBus signal. |

### ibus_bus_set_watch_ibus_signal ()

    void
    ibus_bus_set_watch_ibus_signal (IBusBus *bus,
                                    gboolean watch);

Start or stop watching the GlobalEngineChanged IBus signal.

#### Parameters

bus | An IBusBus. |
watch | `TRUE` if you want ibusbus to emit "global-engine-changed" signal when ibus-daemon emits the GlobalEngineChanged IBus signal. |

### ibus_bus_get_config ()

    IBusConfig *
    ibus_bus_get_config (IBusBus *bus);

Get the config instance from IBusBus.

#### Parameters

bus | An IBusBus. |

#### Returns

An IBusConfig object which is configurable with `bus` .

[transfer none]

### ibus_bus_preload_engines ()

    gboolean
    ibus_bus_preload_engines (IBusBus *bus,
                              const gchar * const *names);

Start bus components by engine names synchronously.

#### Parameters

bus | An IBusBus. |
names | A `NULL`-terminated array of engine names. | [array zero-terminated=1]

#### Returns

`TRUE` if components start. `FALSE` otherwise.

### ibus_bus_preload_engines_async ()

    void
    ibus_bus_preload_engines_async (IBusBus *bus,
                                    const gchar * const *names,
                                    gint timeout_msec,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Start bus components by engine names asynchronously.

#### Parameters

bus | An IBusBus. |
names | A `NULL`-terminated array of engine names. | [array zero-terminated=1]
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_preload_engines_async_finish ()

    gboolean
    ibus_bus_preload_engines_async_finish (IBusBus *bus,
                                           GAsyncResult *res,
                                           GError **error);

Finishes an operation started with `ibus_bus_preload_engines_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_preload_engines_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if component starts. `FALSE` otherwise.

### ibus_bus_get_ibus_property ()

    GVariant *
    ibus_bus_get_ibus_property (IBusBus *bus,
                                const gchar *property_name);

Get org.freedesktop.DBus.Properties.

#### Parameters

bus | An IBusBus. |
property_name | property name in org.freedesktop.DBus.Properties.Get |

#### Returns

The value in org.freedesktop.DBus.Properties.Get The returned value must be freed with `g_variant_unref()`.

[transfer full]

### ibus_bus_get_ibus_property_async ()

    void
    ibus_bus_get_ibus_property_async (IBusBus *bus,
                                      const gchar *property_name,
                                      gint timeout_msec,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Get org.freedesktop.DBus.Properties asynchronously.

#### Parameters

bus | An IBusBus. |
property_name | property name in org.freedesktop.DBus.Properties.Get |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_get_ibus_property_async_finish ()

    GVariant *
    ibus_bus_get_ibus_property_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_get_ibus_property_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_get_ibus_property_async()`. |
error | Return location for error or `NULL`. |

#### Returns

The value in org.freedesktop.DBus.Properties.Get The returned value must be freed with `g_variant_unref()`.

[transfer full]

### ibus_bus_set_ibus_property ()

    void
    ibus_bus_set_ibus_property (IBusBus *bus,
                                const gchar *property_name,
                                GVariant *value);

Set org.freedesktop.DBus.Properties.

#### Parameters

bus | An IBusBus. |
property_name | property name in org.freedesktop.DBus.Properties.Set |
value | value in org.freedesktop.DBus.Properties.Set |

### ibus_bus_set_ibus_property_async ()

    void
    ibus_bus_set_ibus_property_async (IBusBus *bus,
                                      const gchar *property_name,
                                      GVariant *value,
                                      gint timeout_msec,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Set org.freedesktop.DBus.Properties asynchronously.

#### Parameters

bus | An IBusBus. |
property_name | property name in org.freedesktop.DBus.Properties.Set |
value | value in org.freedesktop.DBus.Properties.Set |
timeout_msec | The timeout in milliseconds or -1 to use the default timeout. |
cancellable | A GCancellable or `NULL`. |
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL` if you don't care about the result of the method invocation. |
user_data | The data to pass to callback. |

### ibus_bus_set_ibus_property_async_finish ()

    gboolean
    ibus_bus_set_ibus_property_async_finish
                                   (IBusBus *bus,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `ibus_bus_set_ibus_property_async()`.

#### Parameters

bus | An IBusBus. |
res | A GAsyncResult obtained from the GAsyncReadyCallback passed to `ibus_bus_set_ibus_property_async()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if property is set with async. `FALSE` failed.

## Types and Values

### struct IBusBus

    struct IBusBus;

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

## Property Details

### The `“client-only”` property

      “client-only”              gboolean

Whether the IBusBus object is for client use only.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“connect-async”` property

      “connect-async”            gboolean

Whether the IBusBus object should connect asynchronously to the bus.

Flags: Read / Write / Construct Only

Default value: FALSE

## Signal Details

### The `“connected”` signal

    void
    user_function (IBusBus *bus,
                   gpointer user_data)

Emitted when IBusBus is connected to ibus-daemon.

#### Parameters

bus | The IBusBus object which recevied the signal |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“disconnected”` signal

    void
    user_function (IBusBus *bus,
                   gpointer user_data)

Emitted when IBusBus is disconnected from ibus-daemon.

#### Parameters

bus | The IBusBus object which recevied the signal |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“global-engine-changed”` signal

    void
    user_function (IBusBus *bus,
                   gchar   *name,
                   gpointer user_data)

Emitted when global engine is changed.

#### Parameters

bus | The IBusBus object which recevied the signal |
name | The name of the new global engine. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“name-owner-changed”` signal

    void
    user_function (IBusBus *bus,
                   gchar   *name,
                   gchar   *old_owner,
                   gchar   *new_owner,
                   gpointer user_data)

Emitted when D-Bus name owner is changed.

#### Parameters

bus | The IBusBus object which recevied the signal |
name | The name which ower is changed. |
old_owner | The unique bus name of the old owner. |
new_owner | The unique bus name of the new owner. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last