![]() |
![]() |
![]() |
imsettings Documentation | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct IMSettingsClientClass; IMSettingsClient; IMSettingsClientPrivate; IMSettingsClient * imsettings_client_new (const gchar *locale
); gboolean imsettings_client_set_locale (IMSettingsClient *client
,const gchar *locale
); const gchar * imsettings_client_get_locale (IMSettingsClient *client
); guint imsettings_client_get_version (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); GVariant * imsettings_client_get_info_variants (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); GVariant * imsettings_client_get_info_variant (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); IMSettingsInfo * imsettings_client_get_info_object (IMSettingsClient *client
,const gchar *module
,GCancellable *cancellable
,GError **error
); gchar * imsettings_client_get_user_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); gchar * imsettings_client_get_system_im (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); IMSettingsInfo * imsettings_client_get_active_im_info (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
); gboolean imsettings_client_switch_im (IMSettingsClient *client
,const gchar *module
,gboolean update_xinputrc
,GCancellable *cancellable
,GError **error
); gboolean imsettings_client_reload (IMSettingsClient *client
,gboolean send_signal
,GCancellable *cancellable
,GError **error
); GVariant * imsettings_client_get_module_settings (IMSettingsClient *client
,GCancellable *cancellable
,GError **error
); void imsettings_client_get_info_variants_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gpointer imsettings_client_get_info_variants_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_variant_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
); void imsettings_client_get_user_im_start (IMSettingsClient *client
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gchar * imsettings_client_get_user_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_system_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
); gboolean imsettings_client_switch_im_finish (IMSettingsClient *client
,GAsyncResult *result
,GError **error
);
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. |
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_set_locale (IMSettingsClient *client
,const gchar *locale
);
Update the locale information in client
with locale
.
|
a IMSettingsClient. |
|
a locale to obtain information for or to give it for Input Method.
or NULL if you want to pass current locale. |
Returns : |
TRUE if successfully updated, otherwise FALSE . |
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. |
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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
a version number. |
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 . |
|
a GError to store an error if any, or NULL . |
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 . |
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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise NULL . |
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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
a IMSettingsInfo or NULL . |
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 .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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
an Input Method name or NULL . |
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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
an Input Method name or NULL . |
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 . |
|
a GError to store an error if any, or NULL . |
Returns : |
a IMSettingsInfo for active Input Method. if not, NULL then. |
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> |
|
a IMSettingsClient. |
|
an Input Method name to ask. |
|
a GCancellable or NULL . |
|
a GError to store an error if any, or NULL . |
Returns : |
TRUE if it is, otherwise FALSE . |
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> |
|
a IMSettingsClient. |
|
an Input Method name to ask. |
|
a GCancellable or NULL . |
|
a GError to store an error if any, or NULL . |
Returns : |
TRUE if it is, otherwise FALSE . |
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> |
|
a IMSettingsClient. |
|
an Input Method name to ask. |
|
a GCancellable or NULL . |
|
a GError to store an error if any, or NULL . |
Returns : |
TRUE if it is, otherwise FALSE . |
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 .xinputrc, otherwise FALSE . |
|
a GCancellable or NULL . |
|
a GError to store an error if any, or NULL . |
Returns : |
if the operation is successfully done, returns TRUE
otherwise FALSE . |
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> |
|
a IMSettingsClient. |
|
TRUE to send a signal instead of invoking a method. |
|
a GCancellable or NULL . |
|
a GError to store an error if any, or NULL . |
Returns : |
TRUE if the operation is successfully done, otherwise FALSE . |
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 . |
|
a GError to store an error, or NULL . |
Returns : |
a GVariant that contains some pairs of the module name and the Input Method name. |
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 . |
|
a GAsyncReadyCallback. |
|
a pointer of the user data to give it to callback . |
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 . |
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 . |
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 . |
|
a GAsyncReadyCallback. |
|
a pointer of the user data to give it to callback . |
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 . |
Returns : |
a GVariant that can converts to IMSettingsInfo through
imsettings_info_new() . otherwise 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 . |
|
a GAsyncReadyCallback. |
|
a pointer of the user data to give it to callback . |
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 . |
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 . |
|
a GAsyncReadyCallback. |
|
a pointer of the user data to give it to callback . |
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 . |
Returns : |
an Input Method name or NULL . |
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 .xinputrc, otherwise FALSE . |
|
a GCancellable or NULL . |
|
a GAsyncReadyCallback. |
|
a pointer of the user data to give it to callback . |
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 . |
Returns : |
if the operation is successfully done, returns TRUE
otherwise FALSE . |
"locale"
property"locale" gchar* : Read / Write
Locale to get the imsettings information.
Default value: NULL