NAME

XSetPointerMapping, XGetPointerMapping - manipulate pointer settings

SYNTAX

int XSetPointerMapping(Display *_d_i_s_p_l_a_y, unsigned char _m_a_p[], int _n_m_a_p); int XGetPointerMapping(Display *_d_i_s_p_l_a_y, unsigned char _m_a_p___r_e_t_u_r_n[], int _n_m_a_p);

ARGUMENTS

_d_i_s_p_l_a_y Specifies the connection to the X server.
_m_a_p Specifies the mapping list.
_m_a_p___r_e_t_u_r_n Returns the mapping list.
_n_m_a_p Specifies the number of items in the mapping list.

DESCRIPTION

The _X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g function sets the mapping of the pointer. If it succeeds, the X server generates a _M_a_p_p_i_n_g_N_o_t_i_f_y event, and _X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_S_u_c_c_e_s_s. Element map[i] defines the logical button number for the physical button i+1. The length of the list must be the same as _X_G_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g would return, or a _B_a_d_V_a_l_u_e error results. A zero element disables a button, and elements are not restricted in value by the number of physical buttons. However, no two elements can have the same nonzero value, or a _B_a_d_V_a_l_u_e error results. If any of the buttons to be altered are logically in the down state, _X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_B_u_s_y, and the mapping is not changed.

_X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g can generate a _B_a_d_V_a_l_u_e error.

The _X_G_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g function returns the current mapping of the pointer. Pointer buttons are numbered starting from one. _X_G_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g returns the number of physical buttons actually on the pointer. The nominal mapping for a pointer is map[i]=i+1. The nmap argument specifies the length of the array where the pointer mapping is returned, and only the first nmap elements are returned in map_return.

DIAGNOSTICS

_B_a_d_V_a_l_u_e
Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.

SEE ALSO

XChangeKeyboardControl(3X11), XChangeKeyboardMapping(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e