XMakeAssoc()XMakeAssoc()NameXMakeAssoc – create an entry in an association table.
Synopsis
XMakeAssoc(display, table, x_id, data)
Display *display;
XAssocTable *table;
XID x_id;
char * data;
Arguments
display Specifies a connection to an X server; returned from XOpenDis‐
play().
table Specifies the association table in which an entry is to be
made.
x_id Specifies the X resource ID.
data Specifies the data to be associated with the X resource ID.
DescriptionXMakeAssoc() inserts data into an XAssocTable keyed on an XID. Associ‐
ation tables allow you to easily associate data with resource ID's for
later retrieval. Association tables are local, accessible only by this
client.
This function is provided for compatibility with X Version 10. To use
it you must include the file <X11/X10.h> and link with the library
-loldX.
Data is inserted into the table only once. Redundant inserts are mean‐
ingless and cause no problems. The queue in each association bucket is
sorted from the lowest to highest XID.
For more information, see Volume One, Appendix B, X10 Compatibility.
Structure
typedef struct {
XAssoc *buckets; /* pointer to first bucket in bucket array */
int size; /* table size (number of buckets) */
} XAssocTable;
typedef struct _XAssoc {
struct _XAssoc *next; /* next object in this bucket */
struct _XAssoc *prev; /* previous object in this bucket */
Display *display; /* display which owns the ID */
XID x_id; /* X Window System ID */
char *data; /* pointer to untyped memory */
} XAssoc;
See AlsoXCreateAssocTable(), XDeleteAssoc(), XDestroyAssocTable(), XLookUpAs‐
soc().
Xlib - Association Tables XMakeAssoc()