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 DRAFTAll <strong>Xlib</strong> functions behave as ifthey donot change the current locale or X modifier setting. (Thismeans that if they dochange locale or call XSetLocaleModifiers with a non-NULL argument,they must save and restore the current state on entry and exit.) Also, <strong>Xlib</strong> functions on implementationsthat conform to the ANSI C library do not alter the global state associated with the ANSICfunctions mblen, mbtowc, wctomb, and strtok.13.3. Variable Argument ListsVarious functions in this chapter have arguments that conform to the ANSI C variable argumentlist calling convention. Each function denoted with an argument of the form ‘‘...’’ takes a variable-lengthlist of name and value pairs, where each name is a string and each value is of typeXPointer. Aname argument that is NULL identifies the end of the list.Avariable-length argument list may contain a nested list. If the name XNVaNestedList is specifiedin place of an argument name, then the following value is interpreted as an XVaNestedListvalue that specifies a list of values logically inserted into the original list at the point of declaration.A NULL identifies the end of a nested list.To allocate a nested variable argument list dynamically, use XVaCreateNestedList.typedef void * XVaNestedList;XVaNestedList XVaCreateNestedList (dummy, ...)int dummy;dummySpecifies an unused argument (required by ANSI C).... Specifies the variable length argument list.The XVaCreateNestedList function allocates memory and copies its arguments into a single listpointer, which may be used as a value for arguments requiring a list value. Any entries are copiedas specified. Data passed by reference is not copied; the caller must ensure data remains valid forthe lifetime of the nested list. The list should be freed using XFree when it is no longer needed.13.4. Output MethodsThis section provides discussions of the following X Output Method (XOM) topics:• Output method overview• Output method functions• Output method values• Output context functions• Output context values• Creating and freeing a font set• Obtaining font set metrics• Drawing text using font sets13.4.1. Output Method OverviewLocale-dependent text may include one or more text components, each of which may require differentfonts and character set encodings. In some languages, each component might have a differentdrawing direction, and some components might contain context-dependent characters that277

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

Saved successfully!

Ooh no, something went wrong!