![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
IBusProxy; IBusProxy * ibus_proxy_new (const gchar *name, const gchar *path, IBusConnection *connection); gboolean ibus_proxy_send (IBusProxy *proxy, IBusMessage *message); gboolean ibus_proxy_call (IBusProxy *proxy, const gchar *method, GType first_arg_type, ...); gboolean ibus_proxy_call_with_reply (IBusProxy *proxy, const gchar *method, IBusPendingCall **pending, gint timeout_milliseconds, IBusError **error, GType first_arg_type, ...); IBusMessage * ibus_proxy_call_with_reply_and_block (IBusProxy *proxy, const gchar *method, gint timeout_milliseconds, IBusError **error, GType first_arg_type, ...); gboolean ibus_proxy_send_with_reply (IBusProxy *proxy, IBusMessage *message, IBusPendingCall **pending, gint timeout_milliseconds); IBusMessage * ibus_proxy_send_with_reply_and_block (IBusProxy *proxy, IBusMessage *message); gboolean ibus_proxy_handle_signal (IBusProxy *proxy, IBusMessage *message); const gchar * ibus_proxy_get_name (IBusProxy *proxy); const gchar * ibus_proxy_get_unique_name (IBusProxy *proxy); const gchar * ibus_proxy_get_path (IBusProxy *proxy); const gchar * ibus_proxy_get_interface (IBusProxy *proxy); IBusConnection * ibus_proxy_get_connection (IBusProxy *proxy);
GObject +----GInitiallyUnowned +----IBusObject +----IBusProxy +----IBusConfig +----IBusInputContext
"connection" IBusConnection* : Read / Write / Construct Only "interface" gchar* : Read / Write / Construct Only "name" gchar* : Read / Write / Construct Only "path" gchar* : Read / Write / Construct Only
An IBusProxy is the base of all proxy objects, which communicate the corresponding IBusServices on the other end of IBusConnection. For example, IBus clients (such as editors, web browsers) invoke the proxy object, IBusInputContext to communicate with the InputContext service of the ibus-daemon.
Almost all services have corresponding proxies, except very simple services.
IBusProxy * ibus_proxy_new (const gchar *name, const gchar *path, IBusConnection *connection);
New an IBusProxy instance.
Property IBusProxy:name is set as name
, and
IBusProxy:path is set as path
.
|
The service name of proxy object. |
|
The path of proxy object. |
|
An IBusConnection. |
Returns : |
A newly allocated IBusProxy instance. |
gboolean ibus_proxy_send (IBusProxy *proxy, IBusMessage *message);
Send an IBusMessage to the corresponding service.
see_also
ibus_proxy_call()
, ibus_proxy_send_with_reply()
, ibus_proxy_send_with_reply_and_block()
.
|
An IBusProxy. |
|
The IBusMessage to be sent. |
Returns : |
TRUE if succeed; FALSE otherwise. |
gboolean ibus_proxy_call (IBusProxy *proxy, const gchar *method, GType first_arg_type, ...);
Call a method of the corresponding service.
see_also
ibus_proxy_send()
, ibus_proxy_call_with_reply()
, ibus_proxy_call_with_reply_and_block()
.
|
An IBusProxy. |
|
The method to be called. |
|
Type of first argument. |
|
Rest of arguments, NULL to mark the end. |
Returns : |
TRUE if succeed; FALSE otherwise. |
gboolean ibus_proxy_call_with_reply (IBusProxy *proxy, const gchar *method, IBusPendingCall **pending, gint timeout_milliseconds, IBusError **error, GType first_arg_type, ...);
Call a method of the corresponding service, and returns an IBusPendingCall used to receive a reply to the message.
This function calls ibus_connection_send_with_reply()
to do the actual sending.
see_also
: ibus_connection_send_with_reply()
,
see_also
: ibus_proxy_call()
, ibus_proxy_send_with_reply()
, ibus_proxy_call_with_reply_and_block()
.
|
An IBusProxy. |
|
The method to be called. |
|
Return location of a IBusPendingCall object, or NULL if connection is disconnected. |
|
Time out in milliseconds. |
|
Returned error is stored here; NULL to ignore error. |
|
Type of first argument. |
|
Rest of arguments, NULL to mark the end. |
Returns : |
TRUE if succeed; FALSE otherwise. |
IBusMessage * ibus_proxy_call_with_reply_and_block (IBusProxy *proxy, const gchar *method, gint timeout_milliseconds, IBusError **error, GType first_arg_type, ...);
Call a method of the corresponding service and blocks a certain time period while waiting for
an IBusMessage as reply.
If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply_and_block()
to do the
actual sending.
see_also
: ibus_connection_send_with_reply_and_block()
,
see_also
: ibus_proxy_call()
, ibus_proxy_send_with_reply()
, ibus_proxy_call_with_reply_and_block()
.
|
An IBusProxy. |
|
The method to be called. |
|
Time out in milliseconds. |
|
Returned error is stored here; NULL to ignore error. |
|
Type of first argument. |
|
Rest of arguments, NULL to mark the end. |
Returns : |
An IBusMessage that is the reply or NULL with an error code if the function fails. |
gboolean ibus_proxy_send_with_reply (IBusProxy *proxy, IBusMessage *message, IBusPendingCall **pending, gint timeout_milliseconds);
Send an IBusMessage to the corresponding service and returns
an IBusPendingCall used to receive a reply to the message.
This function calls ibus_connection_send_with_reply()
to do the actual sending.
see_also
: ibus_connection_send_with_reply()
,
see_also
: ibus_proxy_send()
, ibus_proxy_call_with_reply()
, ibus_proxy_send_with_reply_and_block()
.
|
An IBusProxy. |
|
The IBusMessage to be sent. |
|
Return location of a IBusPendingCall object, or NULL if connection is disconnected. |
|
Time out in milliseconds. |
Returns : |
TRUE if succeed; FALSE otherwise. |
IBusMessage * ibus_proxy_send_with_reply_and_block (IBusProxy *proxy, IBusMessage *message);
Send an IBusMessage to the corresponding service and blocks a certain time period while waiting for
an IBusMessage as reply.
If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply_and_block()
to do the
actual sending.
see_also
: ibus_connection_send_with_reply_and_block()
,
see_also
: ibus_proxy_send()
, ibus_proxy_send_with_reply()
, ibus_proxy_call_with_reply_and_block()
.
|
An IBusProxy. |
|
The IBusMessage to be sent. |
Returns : |
An IBusMessage that is the reply or NULL with an error code if the function fails. |
gboolean ibus_proxy_handle_signal (IBusProxy *proxy, IBusMessage *message);
Handle a signal by emitting IBusProxy::ibus-signal.
If signal name is NameOwnerChanged
and the service name is identical to the old name, then
proxy
will be destroyed by ibus_object_destroy()
and FALSE is returned.
Otherwise TRUE is returned.
Note that if the path of of message is not identical to the IBusProxy:path this function will not emit IBusProxy::ibus-signal.
|
An IBusProxy. |
|
The IBusMessage to be sent. |
Returns : |
TRUE if succeed; FALSE otherwise. |
const gchar * ibus_proxy_get_name (IBusProxy *proxy);
Get the service name of a proxy object.
|
An IBusProxy. |
Returns : |
The service name of the proxy object. |
const gchar * ibus_proxy_get_unique_name (IBusProxy *proxy);
Get the unique name of the proxy object.
|
An IBusProxy. |
Returns : |
The service name of the proxy object. |
const gchar * ibus_proxy_get_path (IBusProxy *proxy);
Get the path of a proxy object.
|
An IBusProxy. |
Returns : |
The path of proxy object. |
const gchar * ibus_proxy_get_interface (IBusProxy *proxy);
Get interface of a proxy object.
|
An IBusProxy. |
Returns : |
The service name of the proxy object. |
IBusConnection * ibus_proxy_get_connection (IBusProxy *proxy);
Get the connection of a proxy object.
|
An IBusProxy. |
Returns : |
The connection of the proxy object. |
"connection"
property"connection" IBusConnection* : Read / Write / Construct Only
The connection of the proxy object.
"interface"
property"interface" gchar* : Read / Write / Construct Only
The interface of the proxy object.
Default value: NULL
"name"
property"name" gchar* : Read / Write / Construct Only
The service name of the proxy object.
Default value: NULL
"path"
property"path" gchar* : Read / Write / Construct Only
The path of the proxy object.
Default value: NULL
"ibus-signal"
signalgboolean user_function (IBusProxy *proxy, gpointer message, gpointer user_data) : Run Last
Emitted when sending a signal.
Implement the member function ibus_signal()
in extended class to receive this signal.
Argument user_data
is ignored in this function.
|
An IBusProxy. |
|
An message that contains the signal. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the path of message is identical to IBusProxy:path and successfully handled.
see_also : ibus_proxy_handle_signal() .
|