Refine document and coding style in ibusbus.[ch] and trim some private structs and...
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 17 Mar 2011 14:52:38 +0000 (10:52 -0400)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 17 Mar 2011 16:25:10 +0000 (12:25 -0400)
BUG=none
TEST=make

Review URL: http://codereview.appspot.com/4290053

.gitignore
docs/reference/ibus/.gitignore
docs/reference/ibus/Makefile.am
docs/reference/ibus/trim.sed [new file with mode: 0755]
src/.gitignore
src/ibusbus.c
src/ibusbus.h

index f106399..8ad5122 100644 (file)
@@ -9,7 +9,6 @@
 /.deps
 /.gitignore
 /.libs
-/ChangeLog
 /GPATH
 /GRTAGS
 /GSYMS
@@ -28,7 +27,6 @@
 /config.status.lineno
 /configure
 /configure.lineno
-/ibus-*.tar.*
 /ibus-1.0.pc
 /ibus.spec
 /intltool-extract.in
@@ -44,7 +42,6 @@
 /po/POTFILES
 /po/ibus10.pot
 /po/stamp-it
-/ppa
 /so_locations
 /stamp-h1
 /tags
index 070c9e5..411cb0f 100644 (file)
@@ -36,8 +36,6 @@
 /pdf-build.stamp
 /pdf.stamp
 /scan-build.stamp
-/setup-build.stamp
-/setup.stamp
 /sgml-build.stamp
 /sgml.stamp
 /so_locations
index 41602ec..631f9c3 100644 (file)
@@ -111,14 +111,9 @@ endif
 
 trim-build.stamp: scan-build.stamp
        $(AM_V_GEN) \
-       sed " \
-            /IBusObjectFlags/d;\
-            /IBUS_OBJECT_FLAGS/d;\
-            /IBUS_OBJECT_SET_FLAGS/d;\
-            /IBUS_OBJECT_UNSET_FLAGS/d" \
-                -i.bak $(srcdir)/$(DOC_MODULE)-sections.txt
-       $(RM) $(srcdir)/$(DOC_MODULE)-sections.txt.bak
-       touch trim-build.stamp
+           sed -f $(srcdir)/trim.sed -i.bak $(srcdir)/$(DOC_MODULE)-sections.txt && \
+           $(RM) $(srcdir)/$(DOC_MODULE)-sections.txt.bak && \
+           touch trim-build.stamp
 
 tmpl-build.stamp: trim-build.stamp  $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-overrides.txt
 
diff --git a/docs/reference/ibus/trim.sed b/docs/reference/ibus/trim.sed
new file mode 100755 (executable)
index 0000000..f310ae4
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sed -f
+
+/IBusObjectFlags/d;
+/IBUS_OBJECT_FLAGS/d;
+/IBUS_OBJECT_SET_FLAGS/d;
+/IBUS_OBJECT_UNSET_FLAGS/d;
+/IBus.*Private/d;
+
index fd5e1a2..d0cd582 100644 (file)
@@ -1,5 +1,4 @@
 /*.bak
-/*.la
 /*.lo
 /*.o
 /*.orig
index ae516d2..b79024d 100644 (file)
@@ -108,10 +108,10 @@ ibus_bus_class_init (IBusBusClass *class)
     /* install signals */
     /**
      * IBusBus::connected:
+     * @bus: The #IBusBus object which recevied the signal
      *
-     * Emitted when IBusBus is connected.
+     * Emitted when #IBusBus is connected to ibus-daemon.
      *
-     * <note><para>Argument @user_data is ignored in this function.</para></note>
      */
     bus_signals[CONNECTED] =
         g_signal_new (I_("connected"),
@@ -125,10 +125,10 @@ ibus_bus_class_init (IBusBusClass *class)
 
     /**
      * IBusBus::disconnected:
+     * @bus: The #IBusBus object which recevied the signal
      *
-     * Emitted when IBusBus is disconnected.
+     * Emitted when #IBusBus is disconnected from ibus-daemon.
      *
-     * <note><para>Argument @user_data is ignored in this function.</para></note>
      */
     bus_signals[DISCONNECTED] =
         g_signal_new (I_("disconnected"),
@@ -142,10 +142,11 @@ ibus_bus_class_init (IBusBusClass *class)
 
     /**
      * IBusBus::global-engine-changed:
+     * @bus: The #IBusBus object which recevied the signal
+     * @name: The name of the new global engine.
      *
      * Emitted when global engine is changed.
      *
-     * <note><para>Argument @user_data is ignored in this function.</para></note>
      */
     bus_signals[GLOBAL_ENGINE_CHANGED] =
         g_signal_new (I_("global-engine-changed"),
@@ -160,10 +161,13 @@ ibus_bus_class_init (IBusBusClass *class)
 
     /**
      * IBusBus::name-owner-changed:
+     * @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.
      *
      * Emitted when D-Bus name owner is changed.
      *
-     * <note><para>Argument @user_data is ignored in this function.</para></note>
      */
     bus_signals[NAME_OWNER_CHANGED] =
         g_signal_new (I_("name-owner-changed"),
index 1582065..0890ece 100644 (file)
@@ -69,50 +69,50 @@ typedef struct _IBusBusPrivate IBusBusPrivate;
  * An opaque data type representing IBus bus (daemon communication) status.
  */
 struct _IBusBus {
-  IBusObject parent;
-  /* instance members */
+    IBusObject parent;
+    /* instance members */
 
-  IBusBusPrivate *priv;
+    IBusBusPrivate *priv;
 };
 
 struct _IBusBusClass {
-  IBusObjectClass parent;
-  /* class members */
+    IBusObjectClass parent;
+    /* class members */
 };
 
 GType        ibus_bus_get_type          (void);
 
 /**
  * ibus_bus_new:
- * @returns: A newly allocated IBusBus instance, and the instance is not floating.
+ * @returns: A newly allocated #IBusBus instance, and the instance is not floating.
  *
- * New an IBusBus instance.
+ * New an #IBusBus instance.
  */
 IBusBus     *ibus_bus_new               (void);
 
 /**
  * ibus_bus_is_connected:
- * @bus: An IBusBus.
- * @returns: TRUE if @bus is connected, FALSE otherwise.
+ * @bus: An #IBusBus.
+ * @returns: %TRUE if @bus is connected, %FALSE otherwise.
  *
- * Return TRUE if @bus is connected to IBus daemon.
+ * Return %TRUE if @bus is connected to IBus daemon.
  */
 gboolean     ibus_bus_is_connected      (IBusBus        *bus);
 
 /**
  * ibus_bus_get_connection:
- * @bus: An IBusBus.
- * @returns: (transfer none): A GDBusConnection of an IBusIBus instance.
+ * @bus: An #IBusBus.
+ * @returns: (transfer none): A #GDBusConnection of an #IBusIBus instance.
  *
- * Return GDBusConnection of an IBusIBus instance.
+ * Return #GDBusConnection of an #IBusIBus instance.
  */
-GDBusConnection
-            *ibus_bus_get_connection    (IBusBus        *bus);
+GDBusConnection *
+             ibus_bus_get_connection    (IBusBus        *bus);
 
 /**
  * ibus_bus_hello:
- * @bus: An IBusBus.
- * @returns: The unique name of IBus process in DBus.
+ * @bus: An #IBusBus.
+ * @returns: The unique name of #IBus process in DBus.
  *
  * This function sends a "HELLO" message to DBus daemon,
  * which replies the unique name of current IBus process.
@@ -134,42 +134,44 @@ guint        ibus_bus_request_name      (IBusBus        *bus,
 
 /**
  * ibus_bus_request_name_async:
- * @bus: An IBusBus.
+ * @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
+ * @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.
  *
  * Request a name from IBus daemon asynchronously.
  */
-void ibus_bus_request_name_async (IBusBus            *bus,
-                                  const gchar        *name,
-                                  guint               flags,
-                                  gint                timeout_msec,
-                                  GCancellable       *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer            user_data);
+void        ibus_bus_request_name_async (IBusBus        *bus,
+                                         const gchar    *name,
+                                         guint           flags,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_request_name_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @bus: An #IBusBus.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to
  *   ibus_bus_request_name_async().
- * @error: Return location for error or NULL.
+ * @error: Return location for error or %NULL.
  * @returns: 0 if failed; positive number otherwise.
  *
  * Finishes an operation started with ibus_bus_request_name_async().
  */
-guint ibus_bus_request_name_async_finish (IBusBus      *bus,
-                                          GAsyncResult *res,
-                                          GError      **error);
+guint       ibus_bus_request_name_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_release_name:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @name: Name to be released.
  * @returns: 0 if failed; positive number otherwise.
  *
@@ -180,42 +182,45 @@ guint        ibus_bus_release_name      (IBusBus        *bus,
 
 /**
  * ibus_bus_release_name_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Release a name to IBus daemon asynchronously.
  */
-void ibus_bus_release_name_async (IBusBus            *bus,
-                                  const gchar        *name,
-                                  gint                timeout_msec,
-                                  GCancellable       *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer            user_data);
+void         ibus_bus_release_name_async
+                                        (IBusBus        *bus,
+                                         const gchar    *name,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_release_name_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @bus: An #IBusBus.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to
  *   ibus_bus_release_name_async().
- * @error: Return location for error or NULL.
+ * @error: Return location for error or %NULL.
  * @returns: 0 if failed; positive number otherwise.
  *
  * Finishes an operation started with ibus_bus_release_name_async().
  */
-guint ibus_bus_release_name_async_finish (IBusBus      *bus,
-                                          GAsyncResult *res,
-                                          GError      **error);
+guint        ibus_bus_release_name_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_name_has_owner:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @name: Name to be checked.
- * @returns: TRUE if the name has owner, FALSE otherwise.
+ * @returns: %TRUE if the name has owner, %FALSE otherwise.
  *
  * Checks whether the name has owner synchronously.
  */
@@ -224,40 +229,43 @@ gboolean     ibus_bus_name_has_owner    (IBusBus        *bus,
 
 /**
  * ibus_bus_name_has_owner_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Checks whether the name has owner asynchronously.
  */
-void ibus_bus_name_has_owner_async (IBusBus            *bus,
-                                    const gchar        *name,
-                                    gint                timeout_msec,
-                                    GCancellable       *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer            user_data);
+void         ibus_bus_name_has_owner_async
+                                        (IBusBus        *bus,
+                                         const gchar    *name,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_name_has_owner_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the name has owner, %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_name_has_owner_async().
  */
-gboolean ibus_bus_name_has_owner_async_finish (IBusBus      *bus,
-                                               GAsyncResult *res,
-                                               GError      **error);
+gboolean     ibus_bus_name_has_owner_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_list_names:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @returns: (transfer full) (element-type utf8): Lists that attached to @bus.
  *
  * Return lists that attached to @bus.
@@ -268,95 +276,100 @@ GList       *ibus_bus_list_names        (IBusBus        *bus);
 
 /**
  * ibus_bus_add_match:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @rule: Match rule.
- * @returns: TRUE if the rule is added. FALSE otherwise.
+ * @returns: %TRUE if the rule is added. %FALSE otherwise.
  *
- * Add a match rule to an IBusBus synchronously.
+ * Add a match rule to an #IBusBus synchronously.
  */
 gboolean     ibus_bus_add_match         (IBusBus        *bus,
                                          const gchar    *rule);
 
 /**
  * ibus_bus_add_match_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
- * Add a match rule to an IBusBus asynchronously.
+ * Add a match rule to an #IBusBus asynchronously.
  */
-void ibus_bus_add_match_async (IBusBus            *bus,
-                               const gchar        *rule,
-                               gint                timeout_msec,
-                               GCancellable       *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer            user_data);
+void         ibus_bus_add_match_async   (IBusBus        *bus,
+                                         const gchar    *rule,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_add_match_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the rule is added. %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_add_match_async().
  */
-gboolean ibus_bus_add_match_async_finish (IBusBus      *bus,
-                                          GAsyncResult *res,
-                                          GError      **error);
+gboolean     ibus_bus_add_match_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_remove_match:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @rule: Match rule.
- * @returns: TRUE if the rule is removed. FALSE otherwise.
+ * @returns: %TRUE if the rule is removed. %FALSE otherwise.
  *
- * Remove a match rule to an IBusBus synchronously.
+ * Remove a match rule to an #IBusBus synchronously.
  */
 gboolean     ibus_bus_remove_match      (IBusBus        *bus,
                                          const gchar    *rule);
 
 /**
  * ibus_bus_remove_match_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Remove a match rule to an IBusBus asynchronously.
  */
-void ibus_bus_remove_match_async (IBusBus            *bus,
-                                  const gchar        *rule,
-                                  gint                timeout_msec,
-                                  GCancellable       *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer            user_data);
+void         ibus_bus_remove_match_async
+                                        (IBusBus        *bus,
+                                         const gchar    *rule,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_remove_match_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the rule is removed. %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_remove_match_async().
  */
-gboolean ibus_bus_remove_match_async_finish (IBusBus      *bus,
-                                             GAsyncResult *res,
-                                             GError      **error);
+gboolean     ibus_bus_remove_match_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_get_name_owner:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @name: Name.
  * @returns: Owner of the name. The returned value must be freed with g_free().
  *
@@ -367,43 +380,46 @@ gchar       *ibus_bus_get_name_owner    (IBusBus        *bus,
 
 /**
  * ibus_bus_get_name_owner_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Return the name owner asynchronously.
  */
-void ibus_bus_get_name_owner_async (IBusBus            *bus,
-                                    const gchar        *name,
-                                    gint                timeout_msec,
-                                    GCancellable       *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer            user_data);
+void         ibus_bus_get_name_owner_async
+                                        (IBusBus        *bus,
+                                         const gchar    *name,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_get_name_owner_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
  * @returns: Owner of the name. The returned value must be freed with g_free().
  *
  * Finishes an operation started with ibus_bus_get_name_owner_async().
  */
-gchar *ibus_bus_get_name_owner_async_finish (IBusBus      *bus,
-                                             GAsyncResult *res,
-                                             GError      **error);
+gchar       *ibus_bus_get_name_owner_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 /* declare ibus methods */
 
 /**
  * ibus_bus_exit:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @restart: Whether restarting the ibus.
- * @returns: TRUE if the "Exit" call is suceeded, FALSE otherwise.
+ * @returns: %TRUE if the "Exit" call is suceeded, %FALSE otherwise.
  *
  * Exit or restart ibus-daemon synchronously.
  */
@@ -412,43 +428,44 @@ gboolean     ibus_bus_exit              (IBusBus        *bus,
 
 /**
  * ibus_bus_exit_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Exit or restart ibus-daemon asynchronously.
  */
-void ibus_bus_exit_async (IBusBus            *bus,
-                          gboolean            restart,
-                          gint                timeout_msec,
-                          GCancellable       *cancellable,
-                          GAsyncReadyCallback callback,
-                          gpointer            user_data);
+void        ibus_bus_exit_async         (IBusBus        *bus,
+                                         gboolean        restart,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_exit_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the "Exit" call is suceeded, %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_exit_async().
  */
-gboolean ibus_bus_exit_async_finish (IBusBus      *bus,
-                                     GAsyncResult *res,
-                                     GError      **error);
+gboolean    ibus_bus_exit_async_finish  (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_create_input_context:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @client_name: Name of client.
- * @returns: An newly allocated IBusInputContext if the "CreateInputContext" call
- *            is suceeded, NULL otherwise.
+ * @returns: An newly allocated #IBusInputContext if the "CreateInputContext"
+ *      call is suceeded, %NULL otherwise.
  *
  * Create an input context for client synchronously.
  */
@@ -470,121 +487,130 @@ IBusInputContext *
  * Create an input context for client asynchronously.
  */
 void        ibus_bus_create_input_context_async
-                                        (IBusBus            *bus,
-                                         const gchar        *client_name,
-                                         gint                timeout_msec,
-                                         GCancellable       *cancellable,
-                                         GAsyncReadyCallback callback,
-                                         gpointer            user_data);
+                                        (IBusBus        *bus,
+                                         const gchar    *client_name,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_create_input_context_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: An newly allocated #IBusInputContext if the "CreateInputContext"
+ *      call is suceeded, %NULL otherwise.
  *
  * Finishes an operation started with ibus_bus_create_input_context_async().
  */
 IBusInputContext *
-            ibus_bus_create_input_context_async_finish
-                                        (IBusBus      *bus,
-                                         GAsyncResult *res,
-                                         GError      **error);
+             ibus_bus_create_input_context_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_current_input_context:
- * @bus: An IBusBus.
- * @returns: The named of currently focued IBusInputContext if the
- *            "CurrentInputContext" call suceeded, NULL otherwise. The return
+ * @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().
  *
  * Get the current focused input context synchronously.
  */
-gchar *ibus_bus_current_input_context(IBusBus        *bus);
+gchar       *ibus_bus_current_input_context
+                                        (IBusBus        *bus);
 
 /**
  * ibus_bus_current_input_context_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Get the current focused input context asynchronously.
  */
-void ibus_bus_current_input_context_async (IBusBus            *bus,
-                                           gint                timeout_msec,
-                                           GCancellable       *cancellable,
-                                           GAsyncReadyCallback callback,
-                                           gpointer            user_data);
+void         ibus_bus_current_input_context_async
+                                        (IBusBus        *bus,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_current_input_context_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
  * @returns: The named of currently focued IBusInputContext if the
- *            "CurrentInputContext" call suceeded, NULL otherwise. The return
+ *            "CurrentInputContext" call suceeded, %NULL otherwise. The return
  *            value must be freed with g_free().
  *
  * Finishes an operation started with ibus_bus_current_input_context_async().
  */
-gchar *ibus_bus_current_input_context_async_finish (IBusBus      *bus,
-                                                    GAsyncResult *res,
-                                                    GError      **error);
+gchar       *ibus_bus_current_input_context_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_register_component:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @component: A input engine component.
- * @returns: TRUE if the "RegisterComponent" call is suceeded, FALSE otherwise.
+ * @returns: %TRUE if the "RegisterComponent" call is suceeded, %FALSE otherwise.
  *
- * Register a componet to an IBusBus synchronously.
+ * Register a componet to an #IBusBus synchronously.
  */
-gboolean     ibus_bus_register_component(IBusBus        *bus,
+gboolean     ibus_bus_register_component
+                                        (IBusBus        *bus,
                                          IBusComponent  *component);
 
 /**
  * ibus_bus_register_component_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
- * Register a componet to an IBusBus asynchronously.
+ * Register a componet to an #IBusBus asynchronously.
  */
-void ibus_bus_register_component_async (IBusBus            *bus,
-                                        IBusComponent      *component,
-                                        gint                timeout_msec,
-                                        GCancellable       *cancellable,
-                                        GAsyncReadyCallback callback,
-                                        gpointer            user_data);
+void         ibus_bus_register_component_async
+                                        (IBusBus        *bus,
+                                         IBusComponent  *component,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer            user_data);
 
 /**
  * ibus_bus_register_component_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the "RegisterComponent" call is suceeded, %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_register_component_async().
  */
-gboolean ibus_bus_register_component_async_finish (IBusBus      *bus,
-                                                   GAsyncResult *res,
-                                                   GError      **error);
+gboolean     ibus_bus_register_component_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_list_engines:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @returns: (transfer container) (element-type IBusEngineDesc): A List of engines.
  *
  * List engines synchronously.
@@ -593,38 +619,41 @@ GList       *ibus_bus_list_engines      (IBusBus        *bus);
 
 /**
  * ibus_bus_list_engines_async:
- * @bus: An IBusBus.
+ * @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
+ * @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.
  *
  * List engines asynchronously.
  */
-void ibus_bus_list_engines_async (IBusBus            *bus,
-                                  gint                timeout_msec,
-                                  GCancellable       *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer            user_data);
+void         ibus_bus_list_engines_async
+                                        (IBusBus        *bus,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_list_engines_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @bus: An #IBusBus.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to
  *   ibus_bus_list_engines_async().
- * @error: Return location for error or NULL.
+ * @error: Return location for error or %NULL.
  * @returns: (transfer container) (element-type IBusEngineDesc): A List of engines.
  *
  * Finishes an operation started with ibus_bus_list_engines_async().
  */
-GList *ibus_bus_list_engines_async_finish (IBusBus      *bus,
-                                           GAsyncResult *res,
-                                           GError      **error);
+GList       *ibus_bus_list_engines_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_list_active_engines:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @returns: (transfer container) (element-type IBusEngineDesc): A List of active engines.
  *
  * List active engines synchronously.
@@ -634,78 +663,85 @@ GList       *ibus_bus_list_active_engines
 
 /**
  * ibus_bus_list_active_engines_async:
- * @bus: An IBusBus.
+ * @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
+ * @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.
  *
  * List active engines asynchronously.
  */
-void ibus_bus_list_active_engines_async (IBusBus            *bus,
-                                         gint                timeout_msec,
-                                         GCancellable       *cancellable,
-                                         GAsyncReadyCallback callback,
-                                         gpointer            user_data);
+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_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
  * @returns: (transfer container) (element-type IBusEngineDesc): A List of active engines.
  *
  * Finishes an operation started with ibus_bus_list_active_engines_async().
  */
-GList *ibus_bus_list_active_engines_async_finish (IBusBus      *bus,
-                                                  GAsyncResult *res,
-                                                  GError      **error);
+GList       *ibus_bus_list_active_engines_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError         **error);
 
 /**
  * ibus_bus_get_use_sys_layout:
- * @bus: An IBusBus.
- * @returns: TRUE if "use_sys_layout" option is enabled.
+ * @bus: An #IBusBus.
+ * @returns: %TRUE if "use_sys_layout" option is enabled.
  *
  * Check if the bus's "use_sys_layout" option is enabled or not synchronously.
  */
-gboolean     ibus_bus_get_use_sys_layout(IBusBus        *bus);
+gboolean     ibus_bus_get_use_sys_layout
+                                        (IBusBus        *bus);
 
 /**
  * ibus_bus_get_use_sys_layout_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Check if the bus's "use_sys_layout" option is enabled or not asynchronously.
  */
-void ibus_bus_get_use_sys_layout_async (IBusBus            *bus,
-                                        gint                timeout_msec,
-                                        GCancellable       *cancellable,
-                                        GAsyncReadyCallback callback,
-                                        gpointer            user_data);
+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_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
  * @returns: TRUE if "use_sys_layout" option is enabled.
  *
  * Finishes an operation started with ibus_bus_get_use_sys_layout_async().
  */
-gboolean ibus_bus_get_use_sys_layout_async_finish (IBusBus      *bus,
-                                                   GAsyncResult *res,
-                                                   GError      **error);
+gboolean     ibus_bus_get_use_sys_layout_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_get_use_global_engine:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @returns: TRUE if "use_global_engine" option is enabled.
  *
  * Check if the bus's "use_global_engine" option is enabled or not synchronously.
@@ -715,39 +751,42 @@ gboolean     ibus_bus_get_use_global_engine
 
 /**
  * ibus_bus_get_use_global_engine_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Check if the bus's "use_global_engine" option is enabled or not asynchronously.
  */
-void ibus_bus_get_use_global_engine_async (IBusBus            *bus,
-                                           gint                timeout_msec,
-                                           GCancellable       *cancellable,
-                                           GAsyncReadyCallback callback,
-                                           gpointer            user_data);
+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_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if "use_global_engine" option is enabled.
  *
  * Finishes an operation started with ibus_bus_get_use_global_engine_async().
  */
-gboolean ibus_bus_get_use_global_engine_async_finish (IBusBus      *bus,
-                                                      GAsyncResult *res,
-                                                      GError      **error);
+gboolean     ibus_bus_get_use_global_engine_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError         **error);
 
 /**
  * ibus_bus_is_global_engine_enabled:
- * @bus: An IBusBus.
- * @returns: TRUE if the current global engine is enabled.
+ * @bus: An #IBusBus.
+ * @returns: %TRUE if the current global engine is enabled.
  *
  * Check if the current global engine is enabled or not synchronously.
  */
@@ -756,39 +795,42 @@ gboolean     ibus_bus_is_global_engine_enabled
 
 /**
  * ibus_bus_is_global_engine_enabled_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Check if the current global engine is enabled or not asynchronously.
  */
-void ibus_bus_is_global_engine_enabled_async (IBusBus            *bus,
-                                              gint                timeout_msec,
-                                              GCancellable       *cancellable,
-                                              GAsyncReadyCallback callback,
-                                              gpointer            user_data);
+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_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if the current global engine is enabled.
  *
  * Finishes an operation started with ibus_bus_is_global_engine_enabled_async().
  */
-gboolean ibus_bus_is_global_engine_enabled_async_finish (IBusBus      *bus,
-                                                         GAsyncResult *res,
-                                                         GError      **error);
+gboolean     ibus_bus_is_global_engine_enabled_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_get_global_engine:
- * @bus: An IBusBus.
- * @returns: The description of current global engine, or NULL if there is no
+ * @bus: An #IBusBus.
+ * @returns: The description of current global engine, or %NULL if there is no
  * global engine.
  *
  * Get the description of current global engine synchronously.
@@ -798,41 +840,45 @@ IBusEngineDesc *
 
 /**
  * ibus_bus_get_global_engine_async:
- * @bus: An IBusBus.
+ * @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
+ * @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.
  *
  * Get the description of current global engine asynchronously.
  */
-void ibus_bus_get_global_engine_async (IBusBus            *bus,
-                                       gint                timeout_msec,
-                                       GCancellable       *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer            user_data);
+void         ibus_bus_get_global_engine_async
+                                        (IBusBus        *bus,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_get_global_engine_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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
+ * @error: Return location for error or %NULL.
+ * @returns:  The description of current global engine, or %NULL if there is no
  * global engine.
  *
  * Finishes an operation started with ibus_bus_get_global_engine_async_finish().
  */
-IBusEngineDesc *ibus_bus_get_global_engine_async_finish (IBusBus      *bus,
-                                                         GAsyncResult *res,
-                                                         GError      **error);
+IBusEngineDesc *
+             ibus_bus_get_global_engine_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_set_global_engine:
- * @bus: An IBusBus.
+ * @bus: An #IBusBus.
  * @global_engine: A new engine name.
- * @returns: TRUE if the global engine was set successfully.
+ * @returns: %TRUE if the global engine was set successfully.
  *
  * Set current global engine synchronously.
  */
@@ -841,41 +887,44 @@ gboolean     ibus_bus_set_global_engine (IBusBus        *bus,
 
 /**
  * ibus_bus_set_global_engine_async:
- * @bus: An IBusBus.
+ * @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.
+ * @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.
  *
  * Set current global engine asynchronously.
  */
-void ibus_bus_set_global_engine_async (IBusBus            *bus,
-                                       const gchar        *global_engine,
-                                       gint                timeout_msec,
-                                       GCancellable       *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer            user_data);
+void         ibus_bus_set_global_engine_async
+                                        (IBusBus        *bus,
+                                         const gchar    *global_engine,
+                                         gint            timeout_msec,
+                                         GCancellable   *cancellable,
+                                         GAsyncReadyCallback
+                                                         callback,
+                                         gpointer        user_data);
 
 /**
  * ibus_bus_set_global_engine_async_finish:
- * @bus: An IBusBus.
- * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to
+ * @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.
+ * @error: Return location for error or %NULL.
+ * @returns: %TRUE if no IPC errros. %FALSE otherwise.
  *
  * Finishes an operation started with ibus_bus_set_global_engine_async().
  */
-gboolean ibus_bus_set_global_engine_async_finish (IBusBus      *bus,
-                                                  GAsyncResult *res,
-                                                  GError      **error);
+gboolean     ibus_bus_set_global_engine_async_finish
+                                        (IBusBus        *bus,
+                                         GAsyncResult   *res,
+                                         GError        **error);
 
 /**
  * ibus_bus_set_watch_dbus_signal:
- * @bus: An IBusBus.
- * @watch: TRUE if you want ibusbus to emit "name-owner-changed" signal when
+ * @bus: An #IBusBus.
+ * @watch: %TRUE if you want ibusbus to emit "name-owner-changed" signal when
  * ibus-daemon emits the NameOwnerChanged DBus signal.
  *
  * Start or stop watching the NameOwnerChanged DBus signal.
@@ -886,8 +935,8 @@ void         ibus_bus_set_watch_dbus_signal
 
 /**
  * ibus_bus_set_watch_ibus_signal:
- * @bus: An IBusBus.
- * @watch: TRUE if you want ibusbus to emit "global-engine-changed" signal when
+ * @bus: An #IBusBus.
+ * @watch: %TRUE if you want ibusbus to emit "global-engine-changed" signal when
  * ibus-daemon emits the GlobalEngineChanged IBus signal.
  *
  * Start or stop watching the GlobalEngineChanged IBus signal.
@@ -899,11 +948,11 @@ void         ibus_bus_set_watch_ibus_signal
 /* declare config apis */
 /**
  * ibus_bus_get_config:
- * @bus: An IBusBus.
- * @returns: (transfer none): An IBusConfig object which is configurable with
+ * @bus: An #IBusBus.
+ * @returns: (transfer none): An #IBusConfig object which is configurable with
  * @bus.
  *
- * Get the config instance from IBusBus.
+ * Get the config instance from #IBusBus.
  */
 IBusConfig  *ibus_bus_get_config        (IBusBus        *bus);