NAME

XTranslateCoordinates - translate window coordinates

SYNTAX

Bool XTranslateCoordinates(Display *_d_i_s_p_l_a_y, Window _s_r_c___w, _d_e_s_t___w, int _s_r_c___x, int _s_r_c___y, int *_d_e_s_t___x___r_e_t_u_r_n, int *_d_e_s_t___y___r_e_t_u_r_n, Window *_c_h_i_l_d___r_e_t_u_r_n);

ARGUMENTS

_c_h_i_l_d___r_e_t_u_r_n Returns the child if the coordinates are contained in a mapped child of the
destination window.
_d_e_s_t___w Specifies the destination window.
_d_e_s_t___x___r_e_t_u_r_n
_d_e_s_t___y___r_e_t_u_r_n Return the x and y coordinates within the destination window.
_d_i_s_p_l_a_y Specifies the connection to the X server.
_s_r_c___w Specifies the source window.
_s_r_c___x
_s_r_c___y Specify the x and y coordinates within the source window.

DESCRIPTION

If _X_T_r_a_n_s_l_a_t_e_C_o_o_r_d_i_n_a_t_e_s returns _T_r_u_e, it takes the src_x and src_y coordinates relative to the source window's origin and returns these coordinates to dest_x_return and dest_y_return relative to the destination window's origin. If _X_T_r_a_n_s_l_a_t_e_C_o_o_r_d_i_n_a_t_e_s returns _F_a_l_s_e, src_w and dest_w are on different screens, and dest_x_return and dest_y_return are zero. If the coordinates are contained in a mapped child of dest_w, that child is returned to child_return. Otherwise, child_return is set to _N_o_n_e.

_X_T_r_a_n_s_l_a_t_e_C_o_o_r_d_i_n_a_t_e_s can generate a _B_a_d_W_i_n_d_o_w error.

DIAGNOSTICS

_B_a_d_W_i_n_d_o_w
A value for a Window argument does not name a defined Window.

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