IMSettingsInfo

IMSettingsInfo — accessor class to the Input Method information.

Synopsis

struct              IMSettingsInfoClass;
gboolean            imsettings_info_compare             (const IMSettingsInfo *info1,
                                                         const IMSettingsInfo *info2);
const gchar *       imsettings_info_get_aux_args        (IMSettingsInfo *info);
const gchar *       imsettings_info_get_aux_program     (IMSettingsInfo *info);
const gchar *       imsettings_info_get_filename        (IMSettingsInfo *info);
const gchar *       imsettings_info_get_gtkimm          (IMSettingsInfo *info);
const gchar *       imsettings_info_get_icon_file       (IMSettingsInfo *info);
const gchar *       imsettings_info_get_im_name         (IMSettingsInfo *info);
const gchar *       imsettings_info_get_language        (IMSettingsInfo *info);
const gchar *       imsettings_info_get_long_desc       (IMSettingsInfo *info);
const gchar *       imsettings_info_get_non_target      (IMSettingsInfo *info);
const gchar *       imsettings_info_get_prefs_args      (IMSettingsInfo *info);
const gchar *       imsettings_info_get_prefs_program   (IMSettingsInfo *info);
const gchar *       imsettings_info_get_qtimm           (IMSettingsInfo *info);
const gchar *       imsettings_info_get_short_desc      (IMSettingsInfo *info);
const gchar *       imsettings_info_get_sub_im_name     (IMSettingsInfo *info);
const gchar *       imsettings_info_get_xim             (IMSettingsInfo *info);
const gchar *       imsettings_info_get_xim_args        (IMSettingsInfo *info);
const gchar *       imsettings_info_get_xim_program     (IMSettingsInfo *info);
gboolean            imsettings_info_is_immodule_only    (IMSettingsInfo *info);
gboolean            imsettings_info_is_script           (IMSettingsInfo *info);
gboolean            imsettings_info_is_system_default   (IMSettingsInfo *info);
gboolean            imsettings_info_is_user_default     (IMSettingsInfo *info);
gboolean            imsettings_info_is_visible          (IMSettingsInfo *info);
gboolean            imsettings_info_is_xim              (IMSettingsInfo *info);
IMSettingsInfo *    imsettings_info_new                 (GVariant *parameters);
GVariant *          imsettings_info_variant_new         (const gchar *filename,
                                                         const gchar *language);

Description

IMSettingsInfo provides interfaces to access the Input Method information provided by the xinput configuration file.

Please note that this simply holds the static snapshot information when one requests imsettings-daemon to obtain. that may be obsoletes if keeping an instance a long time.

Details

struct IMSettingsInfoClass

struct IMSettingsInfoClass {
	GObjectClass parent_class;
};

GObjectClass parent_class;

The object class structure needs to be the first element in the imsettings information class structure in order for the class mechanism to work correctly. This allows a IMSettingsInfoClass pointer to be cast to a GObjectClass pointer.

imsettings_info_compare ()

gboolean            imsettings_info_compare             (const IMSettingsInfo *info1,
                                                         const IMSettingsInfo *info2);

Compares two IMSettingsInfo instance. This function would simply compares the result of the real value in the xinput configuration file. so the result of imsettings_info_is_script(), imsettings_info_get_language(), imsettings_info_get_filename(), imsettings_info_is_xim() imsettings_info_get_im_name() and imsettings_info_get_sub_im_name() will be ignored.

info1 :

a IMSettingsInfo to compare with i2.

info2 :

a IMSettingsInfo to compare with i1.

Returns :

TRUE if i1 and i2 match, otherwise FALSE.

imsettings_info_get_aux_args ()

const gchar *       imsettings_info_get_aux_args        (IMSettingsInfo *info);

Obtains the arguments of the auxiliary program.

This gives you same value of AUXILIARY_ARGS parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_aux_program ()

const gchar *       imsettings_info_get_aux_program     (IMSettingsInfo *info);

Obtains the auxiliary program name, which will be invoked by imsettings-daemon with the arguments from imsettings_info_get_aux_args().

This gives you same value of AUXILIARY_PROGRAM parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_filename ()

const gchar *       imsettings_info_get_filename        (IMSettingsInfo *info);

Obtains the xinput configuration filename.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_gtkimm ()

const gchar *       imsettings_info_get_gtkimm          (IMSettingsInfo *info);

Obtains the GTK+ immodule name. this is same value of GTK_IM_MODULE parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_icon_file ()

const gchar *       imsettings_info_get_icon_file       (IMSettingsInfo *info);

Obtains the icon filename for the Input Method.

This gives you same value of ICON parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_im_name ()

const gchar *       imsettings_info_get_im_name         (IMSettingsInfo *info);

Obtains the Input Method name. this is same value of SHORT_DESC if it doesn't contain the sub module information that is separate with ':' like:

1
SHORT_DESC=foo-im:bar-subim

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_language ()

const gchar *       imsettings_info_get_language        (IMSettingsInfo *info);

Obtains the language that info genereated by.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_long_desc ()

const gchar *       imsettings_info_get_long_desc       (IMSettingsInfo *info);

Obtains the long description for Input Method.

This gives you same value of LONG_DESC parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_non_target ()

const gchar *       imsettings_info_get_non_target      (IMSettingsInfo *info);

Obtains non-targeted desktop session for the Input Method.

This gives you same value of NOT_RUN parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_prefs_args ()

const gchar *       imsettings_info_get_prefs_args      (IMSettingsInfo *info);

Obtains the arguments of the preference program.

This gives you same value of PREFERENCE_ARGS parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_prefs_program ()

const gchar *       imsettings_info_get_prefs_program   (IMSettingsInfo *info);

Obtains the preference program name for the Input Method.

This gives you same value of PREFERENCE_PROGRAM parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_qtimm ()

const gchar *       imsettings_info_get_qtimm           (IMSettingsInfo *info);

Obtains the Qt immodule name.

This gives you same value of QT_IM_MODULE parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_short_desc ()

const gchar *       imsettings_info_get_short_desc      (IMSettingsInfo *info);

Obtains the short description for Input Method.

This gives you same value of SHORT_DESC parameter in the xinput configuration file. If it doesn't contain, the result would be same to what imsettings_info_get_xim() returns.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_sub_im_name ()

const gchar *       imsettings_info_get_sub_im_name     (IMSettingsInfo *info);

Obtains the sub Input Method name.

info :

a IMSettingsInfo.

Returns :

a string or NULL if SHORT_DESC doesn't contain any information for sub Input Method.

imsettings_info_get_xim ()

const gchar *       imsettings_info_get_xim             (IMSettingsInfo *info);

Obtains the XIM atom that is supposed to be used with XMODIFIERS=@im=.

This gives you same value of XIM parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_get_xim_args ()

const gchar *       imsettings_info_get_xim_args        (IMSettingsInfo *info);

Obtains the arguments of XIM program.

This gives you same value of XIM_ARGS parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string or NULL if it's not specified. this shouldn't be freed.

imsettings_info_get_xim_program ()

const gchar *       imsettings_info_get_xim_program     (IMSettingsInfo *info);

Obtains the XIM program name, which will be invoked by imsettings-daemon with the arguments from imsettings_info_get_xim_args().

This gives you same value of XIM_PROGRAM parameter in the xinput configuration file.

info :

a IMSettingsInfo.

Returns :

a string. this shouldn't be freed.

imsettings_info_is_immodule_only ()

gboolean            imsettings_info_is_immodule_only    (IMSettingsInfo *info);

Checks whether the Input Method in info is supposed to work for immodule only.

info :

a IMSettingsInfo.

Returns :

TRUE if it is. otherwise FALSE.

imsettings_info_is_script ()

gboolean            imsettings_info_is_script           (IMSettingsInfo *info);

Checks whether the xinput configuration file is the scripting language.

This is useful to see if the result may be different when the condition is changed.

info :

a IMSettingsInfo.

Returns :

TRUE if the xinput configuration file is the scripting language. otherwise FALSE.

imsettings_info_is_system_default ()

gboolean            imsettings_info_is_system_default   (IMSettingsInfo *info);

Checks whether the Input Method in info is the system default.

info :

a IMSettingsInfo.

Returns :

TRUE if it is. otherwise FALSE.

imsettings_info_is_user_default ()

gboolean            imsettings_info_is_user_default     (IMSettingsInfo *info);

Checks whether the Input Method in info is the user default.

info :

a IMSettingsInfo.

Returns :

TRUE if it is. otherwise FALSE.

imsettings_info_is_visible ()

gboolean            imsettings_info_is_visible          (IMSettingsInfo *info);

Checks whether the Input Method is visible.

The result would be same what the xinput configuration file specifies in IMSETTINGS_IGNORE_ME.

info :

a IMSettingsInfo.

Returns :

TRUE if it's visible, otherwise FALSE.

imsettings_info_is_xim ()

gboolean            imsettings_info_is_xim              (IMSettingsInfo *info);

Checks whether the Input Method in info is supposed to work on XIM only.

info :

a IMSettingsInfo.

Returns :

TRUE if it is, otherwise FALSE.

imsettings_info_new ()

IMSettingsInfo *    imsettings_info_new                 (GVariant *parameters);

Creates an instance of IMSettingsInfo.

parameters :

a GVariant generated by imsettings_info_variant_new().

Returns :

a IMSettingsInfo or NULL if giving an invalid parameters.

imsettings_info_variant_new ()

GVariant *          imsettings_info_variant_new         (const gchar *filename,
                                                         const gchar *language);

Generates a GVariant from the content of filename. This API is mainly used in imsettings-daemon and not supposed to be used in any applications.

filename :

a filename to the xinput configuration file.

language :

a locale being desired to work on.

Returns :

a GVariant that can be converted to IMSettingsInfo with imsettings_info_new().