IBus Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#define IBUS_DEPRECATED #define IBUS_SERVICE_IBUS #define IBUS_SERVICE_PANEL #define IBUS_SERVICE_CONFIG #define IBUS_SERVICE_NOTIFICATIONS #define IBUS_PATH_IBUS #define IBUS_PATH_FACTORY #define IBUS_PATH_PANEL #define IBUS_PATH_CONFIG #define IBUS_PATH_NOTIFICATIONS #define IBUS_PATH_INPUT_CONTEXT #define IBUS_INTERFACE_IBUS #define IBUS_INTERFACE_INPUT_CONTEXT #define IBUS_INTERFACE_FACTORY #define IBUS_INTERFACE_ENGINE #define IBUS_INTERFACE_PANEL #define IBUS_INTERFACE_CONFIG #define IBUS_INTERFACE_NOTIFICATIONS const gchar * ibus_get_local_machine_id (void
); void ibus_set_display (const gchar *display
); const gchar * ibus_get_address (void
); void ibus_write_address (const gchar *address
); const gchar * ibus_get_user_name (void
); glong ibus_get_daemon_uid (void
); const gchar * ibus_get_socket_path (void
); gint ibus_get_timeout (void
); void ibus_free_strv (gchar **strv
); const gchar * ibus_key_event_to_string (guint keyval
,guint modifiers
); gboolean ibus_key_event_from_string (const gchar *string
,guint *keyval
,guint *modifiers
); void ibus_init (void
); void ibus_main (void
); void ibus_quit (void
); void ibus_set_log_handler (gboolean verbose
); void ibus_unset_log_handler (void
);
This file defines some utility functions and definition which are shared among ibus component and services.
#define IBUS_SERVICE_PANEL "org.freedesktop.IBus.Panel"
Address of IBus panel service.
#define IBUS_SERVICE_CONFIG "org.freedesktop.IBus.Config"
Address of IBus config service.
#define IBUS_SERVICE_NOTIFICATIONS "org.freedesktop.IBus.Notifications"
Address of IBus notification service.
#define IBUS_PATH_FACTORY "/org/freedesktop/IBus/Factory"
D-Bus path for IBus factory.
#define IBUS_PATH_CONFIG "/org/freedesktop/IBus/Config"
D-Bus path for IBus config.
#define IBUS_PATH_NOTIFICATIONS "/org/freedesktop/IBus/Notifications"
D-Bus path for IBus notifications.
#define IBUS_PATH_INPUT_CONTEXT "/org/freedesktop/IBus/InputContext_%d"
Template of D-Bus path for IBus input context.
#define IBUS_INTERFACE_INPUT_CONTEXT
D-Bus interface for IBus input context.
#define IBUS_INTERFACE_FACTORY "org.freedesktop.IBus.Factory"
D-Bus interface for IBus factory.
#define IBUS_INTERFACE_ENGINE "org.freedesktop.IBus.Engine"
D-Bus interface for IBus engine.
#define IBUS_INTERFACE_PANEL "org.freedesktop.IBus.Panel"
D-Bus interface for IBus panel.
#define IBUS_INTERFACE_CONFIG "org.freedesktop.IBus.Config"
D-Bus interface for IBus config.
#define IBUS_INTERFACE_NOTIFICATIONS "org.freedesktop.IBus.Notifications"
D-Bus interface for IBus notifications.
const gchar * ibus_get_local_machine_id (void
);
Obtains the machine UUID of the machine this process is running on.
Returns : |
A newly allocated string that shows the UUID of the machine. |
void ibus_set_display (const gchar *display
);
Set the display address.
|
Display address, as in DISPLAY environment for X. |
const gchar * ibus_get_address (void
);
Return the D-Bus address of IBus. It will find the address from following source:
Environment variable IBUS_ADDRESS
Socket file under ~/.config/ibus/bus/
See also: ibus_write_address()
.
Returns : |
D-Bus address of IBus. NULL for not found. |
void ibus_write_address (const gchar *address
);
Write D-Bus address to socket file.
See also: ibus_get_address()
.
|
D-Bus address of IBus. |
const gchar * ibus_get_user_name (void
);
Get the current user name. It is determined by:
getlogin()
Environment variable SUDO_USER
Environment variable USERHELPER_UID
Environment variable USERNAME
Environment variable LOGNAME
Environment variable USER
Environment variable LNAME
Returns : |
A newly allocated string that stores current user name. |
glong ibus_get_daemon_uid (void
);
ibus_get_daemon_uid
is deprecated and should not be used in newly-written code. This function has been deprecated and should
not be used in newly written code.
Get UID of ibus-daemon.
Returns : |
UID of ibus-daemon; or 0 if UID is not available. |
const gchar * ibus_get_socket_path (void
);
Get the path of socket file.
Returns : |
A newly allocated string that stores the path of socket file. |
gint ibus_get_timeout (void
);
Get the GDBus timeout in milliseconds. The timeout is for clients (e.g. im-ibus.so), not for ibus-daemon. Note that the timeout for ibus-daemon could be set by --timeout command line option of the daemon.
Returns : |
A GDBus timeout in milliseconds. -1 when default timeout for GDBus should be used. |
void ibus_free_strv (gchar **strv
);
ibus_free_strv
is deprecated and should not be used in newly-written code. This function has been deprecated and should
not be used in newly written code.
Free a list of strings.
|
List of strings. |
const gchar * ibus_key_event_to_string (guint keyval
,guint modifiers
);
Return the name of a key symbol and modifiers.
For example, if press ctrl, shift, and enter, then this function returns: Shift+Control+enter.
|
Key symbol. |
|
Modifiers such as Ctrl or Shift. |
Returns : |
The name of a key symbol and modifier. |
gboolean ibus_key_event_from_string (const gchar *string
,guint *keyval
,guint *modifiers
);
Parse key event string and return key symbol and modifiers.
|
Key event string. |
|
Variable that hold key symbol result. |
|
Variable that hold modifiers result. |
Returns : |
TRUE for succeed; FALSE if failed. |
void ibus_main (void
);
Runs an IBus main loop until ibus_quit()
is called in the loop.
See also: ibus_quit()
.
void ibus_quit (void
);
Stops an IBus from running.
Any calls to ibus_quit()
for the loop will return.
See also: ibus_main()
.
void ibus_set_log_handler (gboolean verbose
);
Sets GLIB's log handler to ours. Our log handler adds time info including hour, minute, second, and microsecond, like:
(ibus-daemon:7088): IBUS-DEBUG: 18:06:45.822819: ibus-daemon started
If verbose
is TRUE
, all levels of messages will be logged. Otherwise,
DEBUG and WARNING messages will be ignored. The function is used in
ibus-daemon, but can be useful for IBus client programs as well for
debugging. It's totally fine for not calling this function. If you
don't set a custom GLIB log handler, the default GLIB log handler will
be used.
|
TRUE for verbose logging. |