Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ilQueryXWC(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ilWriteXDrawable(3X)

ilConvertForXWrite(3X)

ilCreateXWC(3X)

ilFeedFromImage(3X)

ilFeedPipe(3X)

ilerror(3X)

ilQueryXWC(3X)

NAME

ilQueryXWC() − returns information on an X Write Context (XWC)

SYNOPSIS

ilBool
ilQueryXWC (

ilXWC XWC,

ilXWCInfo *pInfo);

DESCRIPTION

ilQueryXWC() returns information on an X Write Context (XWC). 

XWC is an ilXWC data structure returned by ilCreateXWC(). 

*pInfo receives an ilXWCInfo structure, which contains the following fields:

*display is the pointer to the X server connection structure passed to ilCreateXWC() for this XWC. 

*visual is the pointer to the Xlib visual type passed to ilCreateXWC() for this XWC. 

colormap is the ID of the X colormap passed to ilCreateXWC() for this XWC. 

gc is the Xlib Graphics Context passed to ilCreateXWC() for this XWC. 

visualType defines how the Image Library views the visual for this XWC. 

If visual is NULL (used to output to bitmaps), visualType is IL_XWC_BITONAL; otherwise, visualType is determined based on the class and depth of the visual as follows:

A) If visual is GrayScale or StaticGray: if the depth is eight (8), visualType is IL_XWC_GRAY_8; otherwise, it is IL_XWC_BITONAL. 

B) If visual is PseudoColor or StaticColor: if the depth is eight (8), visualType is IL_XWC_COLOR_8; otherwise, it is IL_XWC_BITONAL. 

C) If visual is DirectColor or TrueColor: if the depth is 24 and the red, green, and blue, masks as defined in XVisualInfo for the visual are 0xff0000, 0xff00, and 0xff respectively, visualType is IL_XWC_COLOR_24; otherwise, it is IL_XWC_BITONAL. 

staticVisual
is TRUE if visual is NULL (used to output to bitmaps) or if the associated X visual is StaticColor, TrueColor, or StaticGray; otherwise, it is FALSE. 

ditherMethod
is the method used to dither to PseudoColor visuals. It is either IL_AREA_DITHER, (the default) IL_DIFFUSION, or IL_QUICK_DIFFUSION.  This value can be set by the IL_XWC_SET_DITHER_METHOD option of ilChangeXWC(). 

rawMode is TRUE if raw mode is enabled. This value can be set by the IL_XWC_SET_RAW_MODE option of ilChangeXWC(); the default is FALSE. 

writeType is set by the last call to ilWriteXDrawable() or ilConvertForXWrite().  For more details, see ilWriteXDrawable(3X) and ilConvertForXWrite(3X). 

filler is reserved for future use. 

RETURN VALUE

Upon successful completion, ilQueryXWC() returns TRUE. 

EXAMPLE

The following example returns information about an X Write Context into variable XWCinfo

ilContext context;

ilXWC XWC;

ilXWCinfo XWCinfo;
.
.
.

if (!ilQueryXWC(XWC, &XWCinfo))  return(context->error);

ERRORS

If the call fails, context->error receives a non-zero error code. 

AUTHOR

ilQueryXWC() was developed by HP. 

SEE ALSO

ilWriteXDrawable(3X), ilConvertForXWrite(3X), ilCreateXWC(3X), ilFeedFromImage(3X), ilFeedPipe(3X), ilerror(3X). 

Using the Image Developer’s Kit.
 

Hewlett-Packard Company  —  Image Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026