12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTby the LC_CTYPE category; this is called the current locale. Animplementation is permitted toprovide implementation-dependent mechanisms for announcing the locale in addition to setlocale.On implementations that do not conform to the ANSI C library, the locale announcement methodis <strong>Xlib</strong> implementation-dependent.The mechanism by which the semantic operation of <strong>Xlib</strong> is defined for a specific locale is implementation-dependent.Xisnot required to support all the locales supported by the host. To determine if the currentlocale is supported by X, use XSupportsLocale.Bool XSupportsLocale()The XSupportsLocale function returns True if <strong>Xlib</strong> functions are capable of operating under thecurrent locale. If it returns False, <strong>Xlib</strong> locale-dependent functions for which the XLocaleNot-Supported return status is defined will return XLocaleNotSupported. Other <strong>Xlib</strong> locale-dependentroutines will operate in the ‘‘C’’ locale.The client is responsible for selecting its locale and X modifiers. Clients should provide a meansfor the user to override the clients’ locale selection at client invocation. Most single-display Xclients operate in a single locale for both X and the host processing environment. They will configurethe locale by calling three functions: the host locale configuration function, XSupportsLocale,and XSetLocaleModifiers.The semantics of certain categories of X internationalization capabilities can be configured bysetting modifiers. Modifiers are named by implementation-dependent and locale-specific strings.The only standard use for this capability at present is selecting one of several styles of keyboardinput method.To configure <strong>Xlib</strong> locale modifiers for the current locale, use XSetLocaleModifiers.char *XSetLocaleModifiers(modifier_list)char *modifier_list;modifier_listSpecifies the modifiers.The XSetLocaleModifiers function sets the X modifiers for the current locale setting. The modifier_listargument is a null-terminated string of the form ‘‘{@category=value}’’, that is, havingzero or more concatenated ‘‘@category=value’’ entries, where category is a category name andvalue is the (possibly empty) setting for that category. The values are encoded in the currentlocale. Category names are restricted to the POSIX Portable Filename Character Set.The local host X locale modifiers announcer (on POSIX-compliant systems, the XMODIFIERSenvironment variable) is appended to the modifier_list to provide 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 givencategory is not included in the full modifier list, the category is set to an implementation-dependentdefault for the current locale. An empty value for a category explicitly specifies the implementation-dependentdefault.If the function is successful, it returns a pointer to a string. The contents of the string are suchthat a subsequent call with that string (in the same locale) will restore the modifiers to the same274

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!