imsettings Documentation | ||||
---|---|---|---|---|
Top | Description |
struct IMSettingsClientClass; IMSettingsInfo * imsettings_client_get_active_im_info (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); IMSettingsInfo * imsettings_client_get_info_object (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); GVariant * imsettings_client_get_info_variant (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); GVariant * imsettings_client_get_info_variant_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_get_info_variant_start (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GVariant * imsettings_client_get_info_variants (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gpointer imsettings_client_get_info_variants_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_get_info_variants_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); const gchar * imsettings_client_get_locale (IMSettingsClient *client
); GVariant * imsettings_client_get_module_settings (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gchar * imsettings_client_get_system_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gchar * imsettings_client_get_system_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_get_system_im_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gchar * imsettings_client_get_user_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gchar * imsettings_client_get_user_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_get_user_im_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); guint imsettings_client_get_version (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_im_is_system_default (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_im_is_user_default (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_im_is_xim (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); IMSettingsClient * imsettings_client_new (const gchar *locale
); gboolean imsettings_client_ping (IMSettingsClient *client
); gboolean imsettings_client_reload (IMSettingsClient *client
,gboolean send_signal
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_set_locale (IMSettingsClient *client
,const gchar *locale
); gboolean imsettings_client_switch_im (IMSettingsClient *client
,const gchar *module
,gboolean update_xinputrc
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_switch_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_switch_im_start (IMSettingsClient *client
,const gchar *module
,gboolean update_xinputrc
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
IMSettingsClient provides interface methods to imsettings-daemon to obtain a sort of informations for Input Method, operating something through imsettings-daemon to Input Method. This class is supposed to be the main entrance for all the client applications.
Either of functionalities in imsettings-daemon can be accessed through DBus instead of this class though, results of them needs to be sorted out to the appropriate types of values as needed.
Please see documentation of each methods for more details of DBus call.
struct IMSettingsClientClass { GObjectClass parent_class; void (*reserved1) (void); void (*reserved2) (void); void (*reserved3) (void); void (*reserved4) (void); };
GObjectClass |
The object class structure needs to be the first element in the imsettings client class structure in order for the class mechanism to work correctly. This allows a IMSettingsClientClass pointer to be cast to a GObjectClass pointer. |
IMSettingsInfo * imsettings_client_get_active_im_info (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains the Input Method information that is currently running on.
You could access through DBus API instead:
1 2 3 4 5 |
<interface name='com.redhat.imsettings'> <method name='GetActiveVariant'> <arg type='a{sv}' name='ret' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a IMSettingsInfo for active Input Method. if not, NULL then. [transfer full]
|
IMSettingsInfo * imsettings_client_get_info_object (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
);
A convenient function to get IMSettingsInfo from the result of
imsettings_client_get_info_variant()
.
|
a IMSettingsClient. |
|
an Input Method name to obtain the information. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a IMSettingsInfo or NULL . [transfer full]
|
GVariant * imsettings_client_get_info_variant (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
);
Obtains the information for the specific Input Method in module
.
You could access through DBus API instead:
1 2 3 4 5 6 7 |
<interface name='com.redhat.imsettings'> <method name='GetInfoVariant'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='name' direction='in' /> <arg type='a{sv}' name='ret' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
an Input Method name to obtain the information. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise NULL . |
GVariant * imsettings_client_get_info_variant_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
Obtains the result of the request from
imsettings_client_get_info_variant_start()
.
|
a IMSettingsClient. |
|
a GAsyncResult pushed through GAsyncReadyCallback. |
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise NULL . |
void imsettings_client_get_info_variant_start (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request obtaining asynchronously the Input Method information for module
.
|
a IMSettingsClient. |
|
an Input Method name to obtain the information. |
|
a GCancellable or NULL . [allow-none]
|
|
a GAsyncReadyCallback. [scope async] |
|
a pointer of the user data to give it to callback . [closure]
|
GVariant * imsettings_client_get_info_variants (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains all of the Input Method information available on the system.
You could access through DBus API instead:
1 2 3 4 5 6 |
<interface name='com.redhat.imsettings'> <method name='GetInfoVariants'> <arg type='s' name='lang' direction='in' /> <arg type='a{sv}' name='ret' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a GVariant contains some pairs of an Input Method name and
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise NULL . |
gpointer imsettings_client_get_info_variants_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
Obtains the result of the request from
imsettings_client_get_info_variants_start()
.
|
a IMSettingsClient. |
|
a GAsyncResult pushed through GAsyncReadyCallback. |
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a GVariant contains some pairs of an Input Method name and
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise NULL . [out][transfer full][allow-none]
|
void imsettings_client_get_info_variants_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request obtaining asynchronously all of the Input Method information available on the system.
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GAsyncReadyCallback. [scope async] |
|
a pointer of the user data to give it to callback . [closure]
|
const gchar * imsettings_client_get_locale (IMSettingsClient *client
);
Obtains current locale information in client
.
|
a IMSettingsClient. |
Returns : |
a reference to the locale string in client . it shouldn't be freed
in applications. |
GVariant * imsettings_client_get_module_settings (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains current Input Method settings in the backend modules.
You could access through DBus API instead:
1 2 3 4 5 |
<interface name='com.redhat.imsettings'> <method name='DumpModuleSettings'> <arg type='a{ss}' name='ret' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error, or NULL . [allow-none]
|
Returns : |
a GVariant that contains some pairs of the module name and the Input Method name. |
gchar * imsettings_client_get_system_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains an Input Method name that currently is active for the system-wide.
You could access through DBus API instead:
1 2 3 4 5 6 7 8 |
<interface name='com.redhat.imsettings'> <method name='GetSystemIM'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='ret' direction='out'> <annotation name='org.freedesktop.DBus.GLib.Const' value='' /> </arg> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
an Input Method name or NULL . |
gchar * imsettings_client_get_system_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
Obtains the result of the request from
imsettings_client_get_system_im_start()
.
|
a IMSettingsClient. |
|
a GAsyncResult pushed through GAsyncReadyCallback. |
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
an Input Method name or NULL . |
void imsettings_client_get_system_im_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request obtaining asynchronously an input method name that currently is active for the system-wide.
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GAsyncReadyCallback. [scope async] |
|
a pointer of the user data to give it to callback . [closure]
|
gchar * imsettings_client_get_user_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains an Input Method name that currently is active for the user.
If one doesn't have the user xinputrc on their home, this simply returns the same
value to what imsettings_client_get_system_im()
returns.
You could access through DBus API instead:
1 2 3 4 5 6 7 8 |
<interface name='com.redhat.imsettings'> <method name='GetUserIM'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='ret' direction='out'> <annotation name='org.freedesktop.DBus.GLib.Const' value='' /> </arg> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
an Input Method name or NULL . |
gchar * imsettings_client_get_user_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
Obtains the result of the request from
imsettings_client_get_user_im_start()
.
|
a IMSettingsClient. |
|
a GAsyncResult pushed through GAsyncReadyCallback. |
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
an Input Method name or NULL . |
void imsettings_client_get_user_im_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request obtaining asynchronously an input method name that currently is active for the user.
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GAsyncReadyCallback. [scope async] |
|
a pointer of the user data to give it to callback . [closure]
|
guint imsettings_client_get_version (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
);
Obtains the version information of imsettings-daemon running.
This is expected to invoke at first if the return value is same to
IMSETTINGS_SETTINGS_API_VERSION
. otherwise it may not works as expected
due to the changes of the implementation between imsettings-daemon and
client APIs.
You could access through DBus API instead:
1 2 3 4 5 |
<interface name='com.redhat.imsettings'> <method name='GetVersion'> <arg type='u' name='version' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
a version number. |
gboolean imsettings_client_im_is_system_default (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
);
Checks whether module
is the system default or not.
You could access through DBus API instead:
1 2 3 4 5 6 7 |
<interface name='com.redhat.imsettings'> <method name='IsSystemDefault'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='imname' direction='in' /> <arg type='b' name='ret' direction='out' /> </method> </interface> |
gboolean imsettings_client_im_is_user_default (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
);
Checks whether module
is the user default or not.
You could access through DBus API instead:
1 2 3 4 5 6 7 |
<interface name='com.redhat.imsettings'> <method name='IsUserDefault'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='imname' direction='in' /> <arg type='b' name='ret' direction='out' /> </method> </interface> |
gboolean imsettings_client_im_is_xim (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
);
Checks whether module
is the Input Method for XIM only or not.
You could access through DBus API instead:
1 2 3 4 5 6 7 |
<interface name='com.redhat.imsettings'> <method name='IsXIM'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='imname' direction='in' /> <arg type='b' name='ret' direction='out' /> </method> </interface> |
IMSettingsClient * imsettings_client_new (const gchar *locale
);
Creates an instance of IMSettingsClient.
|
a locale to obtain information for or to give it for Input Method.
or NULL if you want to pass current locale. |
Returns : |
a IMSettingsClient. |
gboolean imsettings_client_ping (IMSettingsClient *client
);
Check whether the process is running.
gboolean imsettings_client_reload (IMSettingsClient *client
,gboolean send_signal
,GCancellable *cancellable
,GError **error
);
Reloads imsettings-daemon.
Note that send_signal
option is for the backward compatibility.
imsettings-daemon doesn't do anything since IMSETTINGS_SETTINGS_API_VERSION
is 4. so you will get the expected behavior with:
1 2 3 4 5 |
int api_version; if ((api_version = imsettings_client_get_version(client)) != IMSETTINGS_SETTINGS_API_VERSION) { imsettings_client_reload(client, api_version < 4, NULL, &error); } |
You could access through DBus API instead:
1 2 3 4 5 6 7 8 |
<interface name='com.redhat.imsettings'> <signal name='Reload'> <arg type='b' name='ret' direction='out' /> </signal> <method name='StopService'> <arg type='b' name='ret' direction='out' /> </method> </interface> |
gboolean imsettings_client_set_locale (IMSettingsClient *client
,const gchar *locale
);
Update the locale information in client
with locale
.
gboolean imsettings_client_switch_im (IMSettingsClient *client
,const gchar *module
,gboolean update_xinputrc
,GCancellable *cancellable
,GError **error
);
Changes the Input Method to module
.
You could access through DBus API instead:
1 2 3 4 5 6 7 8 |
<interface name='com.redhat.imsettings'> <method name='SwitchIM'> <arg type='s' name='lang' direction='in' /> <arg type='s' name='module' direction='in' /> <arg type='b' name='update_xinputrc' direction='in' /> <arg type='b' name='ret' direction='out' /> </method> </interface> |
|
a IMSettingsClient. |
|
an Input Method name changing to, or NULL to disable
the Input Method. |
|
TRUE to update the user xinputrc, otherwise FALSE . |
|
a GCancellable or NULL . [allow-none]
|
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
if the operation is successfully done, returns TRUE
otherwise FALSE . |
gboolean imsettings_client_switch_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
Obtains the result of the request from
imsettings_client_switch_im_start()
.
|
a IMSettingsClient. |
|
a GAsyncResult pushed through GAsyncReadyCallback. |
|
a GError to store an error if any, or NULL . [allow-none]
|
Returns : |
if the operation is successfully done, returns TRUE
otherwise FALSE . |
void imsettings_client_switch_im_start (IMSettingsClient *client
,const gchar *module
,gboolean update_xinputrc
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request changing asynchronously the Input Method to module
.
|
a IMSettingsClient. |
|
an Input Method name changing to, or NULL to disable
the Input Method. |
|
TRUE to update the user xinputrc, otherwise FALSE . |
|
a GCancellable or NULL . [allow-none]
|
|
a GAsyncReadyCallback. [scope async] |
|
a pointer of the user data to give it to callback . [closure]
|