Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

IL_CREATE_CONTEXT(3X)

Xlib(1)

X(1)

ilCreateXWC(3X)

NAME

ilCreateXWC() − create an X Write context

SYNOPSIS

ilXWC
ilCreateXWC (

ilContext context,

Display *display,

Visual *visual,

Colormap colormap,

GC gc,

unsigned long mustBeZero1,

unsigned long mustBeZero2);

DESCRIPTION

ilCreateXWC() creates an X Write Context ( ilXWC ) and returns  a pointer to it.  An ilXWC is needed to display images to an X drawable (window or pixmap).  To destroy an ilXWC, use ilDestroyObject() on it or use ilDestroyContext() on the associated Image Library context. 

Use this function to associate an optional X visual and X colormap with the ilXWC.  If a colormap is specified, it must be compatible with the given visual.  If either the visual or colormap are unspecified, the resulting ilXWC has no X visual or colormap associated with it, and can be used only on drawables of depth one (1).  For example, it can be used to output X bitmaps. 

The returned ilXWC can be destroyed by calling ilDestroyObject().  All colors allocated are freed when the ilXWC is destroyed; see ilChangeXWC(3X). 

context is a context created by IL_CREATE_CONTEXT(). 

*display is a pointer to the X server connection structure returned by the Xlib function XOpenDisplay(). 

*visual is a pointer to the Xlib visual type to which all drawables using this ilXWC are output, or is NULL (0) to output to bitmaps.  If zero, see the preceding DESCRIPTION section for additional guidelines about using visual. 

colormap is the ID of the X colormap to use, or is zero (0) to output to bitmaps.  colormap must be compatible with visual. 

gc is the Xlib Graphics Context to use when writing images to an X drawable. 

mustBeZero1 is a value that must be zero; this parameter is reserved for future use. 

mustBeZero2 is a value that must be zero; this parameter is reserved for future use. 

RETURN VALUE

Upon successful completion, ilCreateXWC() returns a pointer to an X Write Context (ilXWC data structure; if the call fails, it returns a NULL and sets context->error to indicate the error. 

ERRORS

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

EXAMPLE

The following example creates an X Write Context (XWC) for output to a bitmap. 

ilContext context;

Display display;

GC gc;

ilXWC XWC;
.
.
.

if (!(XWC = ilCreateXWC (context, &display, 0, 0, gc, 0, 0)))

return(context->error);

AUTHOR

ilCreateXWC() was developed by HP. 

SEE ALSO

IL_CREATE_CONTEXT(3X), Xlib(1), X(1). 

Using the Image Developer’s Kit.

Hewlett-Packard Company  —  Image Library: February, 1995

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