Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME

XSaveContext − save a data value corresponding to a resource ID and context type (not graphics context). 

Synopsis

int XSaveContext(display, rid, context, data)
Display *display;
XID rid;
XContext context;
caddr_t data;

Arguments

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

ridSpecifies the ID of the resource with which the data is associated. 

contextSpecifies the context type to which the data corresponds. 

dataSpecifies the data to be associated with the resource and context. 

Description

XSaveContext() saves data to the context manager database, according to the specified resource and context ID.  The context manager is used for associating data with windows within an application.  The client must have called XUniqueContext() to get the context ID before calling this function.  The meaning of the data is indicated by the context ID, but is completely up to the client.  If an entry with the specified resource and context ID already exists, XSaveContext() writes over it with the specified data.  The XSaveContext() function returns XCNOMEM (a nonzero error code) if an error has occurred and zero (0) otherwise.  For more information, see the description of the context manager in Volume One, Chapter 13, Other Programming Techniques. 

Structures

typedef int XContext;

See Also

XDeleteContext(), XFindContext(), XUniqueContext(). 

Copyright O’Reilly & Assoc.  —  

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