NAME

XtOffset, XtOffsetOf, XtNumber - determine the byte offset or number of array elements

SYNTAX

Cardinal XtOffset(Type _p_o_i_n_t_e_r___t_y_p_e, Field _f_i_e_l_d___n_a_m_e); Cardinal XtOffsetOf(Type _s_t_r_u_c_t_u_r_e___t_y_p_e, Field _f_i_e_l_d___n_a_m_e); Cardinal XtNumber(ArrayVariable _a_r_r_a_y);

ARGUMENTS

_a_r_r_a_y Specifies a fixed-size array.
_f_i_e_l_d___n_a_m_e Specifies the name of the field for which to calculate the byte offset.
_p_o_i_n_t_e_r___t_y_p_e Specifies a type that is declared as a pointer to the structure.
_s_t_r_u_c_t_u_r_e___t_y_p_e Specifies a type that is declared as a structure.

DESCRIPTION

The _X_t_O_f_f_s_e_t macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations.

The _X_t_O_f_f_s_e_t_O_f macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than _X_t_O_f_f_s_e_t, which serves the same function.

The _X_t_N_u_m_b_e_r macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays.

SEE ALSO

XtGetResourceList(3Xt), XtSetArg(3Xt)
_X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s _- _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e