Scroll to navigation

XSupportsLocale(3) XLIB FUNCTIONS XSupportsLocale(3)


XSupportsLocale, XSetLocaleModifiers - determine locale support and configure locale modifiers


Bool XSupportsLocale(void);

char *XSetLocaleModifiers(_Xconst char *modifier_list);


Specifies the modifiers.


TheXSupportsLocalefunction returnsTrueif Xlib functions are capable of operating under the current locale.If it returnsFalse,Xlib locale-dependent functions for which theXLocaleNotSupportedreturn status is defined will returnXLocaleNotSupported.Other Xlib locale-dependent routines will operate in the “C” locale.

TheXSetLocaleModifiersfunction sets the X modifiers for the current locale setting.The modifier_list argument is a null-terminated string of the form“{@category=value}”, that is, having zero or more concatenated “@category=value” entries, where category is a category name and value is the (possibly empty) setting for that category. The values are encoded in the current locale. Category names are restricted to the POSIX Portable Filename Character Set.

The local host X locale modifiers announcer (on POSIX-compliant systems,the XMODIFIERS environment variable) is appended to the modifier_list toprovide default values on the local host.If a given category appears more than once in the list,the first setting in the list is used.If a given category is not included in the full modifier list,the category is set to an implementation-dependent defaultfor the current locale.An empty value for a category explicitly specifies theimplementation-dependent default.

If the function is successful, it returns a pointer to a string.The contents of the string are such that a subsequent call with that string(in the same locale) will restore the modifiers to the same settings.If modifier_list is a NULL pointer,XSetLocaleModifiersalso returns a pointer to such a string,and the current locale modifiers are not changed.

If invalid values are given for one or more modifier categories supported bythe locale, a NULL pointer is returned, and none of thecurrent modifiers are changed.

At program startup,the modifiers that are in effect are unspecified untilthe first successful call to set them.Whenever the locale is changed, themodifiers that are in effect become unspecified until the next successful callto set them.Clients should always callXSetLocaleModifierswith a non-NULL modifier_list after setting the localebefore they call any locale-dependent Xlib routine.

The only standard modifier category currently defined is “im”,which identifies the desired input method.The values for input method are not standardized.A single locale may use multiple input methods,switching input method under user control.The modifier may specify the initial input method in effector an ordered list of input methods.Multiple input methods may be specified in a single im value stringin an implementation-dependent manner.

The returned modifiers string is owned by Xlib and should not be modified orfreed by the client.It may be freed by Xlib after the current locale or modifiers are changed.Until freed, it will not be modified by Xlib.


Xlib - C Language X Interface

libX11 1.8.1 X Version 11