NAME
XSaveContext, XFindContext, XDeleteContext, XUniqueContext - associative look-up routines
SYNTAX
int XSaveContext(Display *_d_i_s_p_l_a_y, XID _r_i_d, XContext
_c_o_n_t_e_x_t, XPointer _d_a_t_a);
int XFindContext(Display *_d_i_s_p_l_a_y, XID _r_i_d, XContext
_c_o_n_t_e_x_t, XPointer *_d_a_t_a___r_e_t_u_r_n);
int XDeleteContext(Display *_d_i_s_p_l_a_y, XID _r_i_d, XContext
_c_o_n_t_e_x_t);
XContext XUniqueContext(void);
ARGUMENTS
-
_c_o_n_t_e_x_t
Specifies the context type to which the data belongs.
-
-
_d_a_t_a
Specifies the data to be associated with the window and type.
-
-
_d_a_t_a___r_e_t_u_r_n
Returns the data.
-
-
_d_i_s_p_l_a_y
Specifies the connection to the X server.
-
-
_r_i_d
Specifies the resource ID with which the data is associated.
-
DESCRIPTION
If an entry with the specified resource ID and type already exists,
_X_S_a_v_e_C_o_n_t_e_x_t
overrides it with the specified context.
The
_X_S_a_v_e_C_o_n_t_e_x_t
function returns a nonzero error code if an error has occurred
and zero otherwise.
Possible errors are
_X_C_N_O_M_E_M
(out of memory).
Because it is a return value,
the data is a pointer.
The
_X_F_i_n_d_C_o_n_t_e_x_t
function returns a nonzero error code if an error has occurred
and zero otherwise.
Possible errors are
_X_C_N_O_E_N_T
(context-not-found).
The
_X_D_e_l_e_t_e_C_o_n_t_e_x_t
function deletes the entry for the given resource ID
and type from the data structure.
This function returns the same error codes that
_X_F_i_n_d_C_o_n_t_e_x_t
returns if called with the same arguments.
_X_D_e_l_e_t_e_C_o_n_t_e_x_t
does not free the data whose address was saved.
The
_X_U_n_i_q_u_e_C_o_n_t_e_x_t
function creates a unique context type that may be used in subsequent calls to
_X_S_a_v_e_C_o_n_t_e_x_t.
SEE ALSO
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e