#include
Bool XF86MiscQueryExtension(
Display *_d_i_s_p_l_a_y,
int *_e_v_e_n_t___b_a_s_e___r_e_t_u_r_n,
int *_e_r_r_o_r___b_a_s_e___r_e_t_u_r_n);
Bool XF86MiscQueryVersion(
Display *_d_i_s_p_l_a_y,
int *_m_a_j_o_r___v_e_r_s_i_o_n___r_e_t_u_r_n,
int *_m_i_n_o_r___v_e_r_s_i_o_n___r_e_t_u_r_n);
Status XF86MiscGetMouseSettings(
Display *_d_i_s_p_l_a_y,
XF86MiscMouseSettings *_m_s_e_i_n_f_o);
Status XF86MiscSetMouseSettings(
Display *_d_i_s_p_l_a_y,
XF86MiscMouseSettings *_m_s_e_i_n_f_o);
Status XF86MiscGetKbdSettings(
Display *_d_i_s_p_l_a_y,
XF86MiscKbdSettings *_k_b_d_i_n_f_o);
Status XF86MiscSetKbdSettings(
Display *_d_i_s_p_l_a_y,
XF86MiscKbdSettings *_k_b_d_i_n_f_o);
_K_e_y_b_o_a_r_d_:
typedef struct {
int type; /* of keyboard: 84-key, 101-key, Xqueue */
int rate; /* repeat rate */
int delay; /* delay until repeat starts */
Bool servnumlock; /* Server handles NumLock ? */
} XF86MiscKbdSettings;
Not all fields are valid in all cases.
For example, when the protocol indicates a bus mouse (i.e. the
type field has value
_M_T_Y_P_E___B_U_S_M_O_U_S_E
as defined in
_x_f_8_6_m_i_s_c_._h),
then the value in the
_b_a_u_d_r_a_t_e
field should be ignored as it does not apply to bus mice.
The
_s_a_m_p_l_e_r_a_t_e
field contains the resolution in lines per inch when
using the Hitachi tablet protocol.
The device field of the structure points to dynamically
allocated storage which should be freed by the caller.
Any of the fields of the structure can be altered and then passed
to the
_X_F_8_6_M_i_s_c_S_e_t_M_o_u_s_e_S_e_t_t_i_n_g_s
function to change their value in the server,
with the following restrictions:
The server will generate an error if any of the above is attempted,
except the first - the contents of the device field are simply ignored.
A change of the protocol causes the device to be closed and reopened.
Changes to the baud rate, sample rate, resolution or flags,
when applicable to the
selected protocol, also cause a reopen of the device.
A reopen can be forced by using the MF_REOPEN flag, except in the
case of the OsMouse and Xqueue protocols which ignore all attempts
to reopen the device.
Using the
_X_F_8_6_M_i_s_c_S_e_t_K_b_d_S_e_t_t_i_n_g_s
function, the keyboard autorepeat delay and rate can be set.
Requests to change the
_t_y_p_e
and
_s_e_r_v_n_u_m_l_o_c_k
fields are ignored (except for checking for an invalid keyboard type).
This is expected to change in a future release.
ARGUMENTS
STRUCTURES
_M_o_u_s_e_:
typedef struct {
char *device; /* returned path to device */
int type; /* mouse protocol */
int baudrate; /* 1200, 2400, 4800, or 9600 */
int samplerate; /* samples per second */
int resolution; /* resolution, count per inch */
int buttons; /* number of buttons */
Bool emulate3buttons; /* Button1+Button3 -> Button2 ? */
int emulate3timeout; /* in milliseconds */
Bool chordmiddle; /* Button1+Button3 == Button2 ? */
int flags; /* Device open flags */
} XF86MiscMouseSettings;
DESCRIPTION
These functions provide an interface to the
_X_F_r_e_e_8_6_-_M_i_s_c extension
which allows various server settings to be
queried and changed dynamically.
Applications that use these functions must be linked with
_-_l_X_x_f_8_6_m_i_s_c
POWER-SAVER FUNCTIONS
The
_X_F_8_6_M_i_s_c_G_e_t_S_a_v_e_r
and
_X_F_8_6_M_i_s_c_S_e_t_S_a_v_e_r
functions have been removed. This functionality is now provided by
the DPMS extension.
MOUSE FUNCTIONS
Mouse parameters can be queried using the function
_X_F_8_6_M_i_s_c_G_e_t_M_o_u_s_e_S_e_t_t_i_n_g_s.
The structure pointed to by its second argument is filled in
with the current mouse settings.
KEYBOARD FUNCTIONS
The
_X_F_8_6_M_i_s_c_G_e_t_K_b_d_S_e_t_t_i_n_g_s
function allows you to retrieve the current keyboard-related
settings from the server.
OTHER FUNCTIONS
Two functions,
_X_F_8_6_M_i_s_c_Q_u_e_r_y_E_x_t_e_n_s_i_o_n
and
_X_F_8_6_M_i_s_c_Q_u_e_r_y_V_e_r_s_i_o_n,
are provided which allow the client to query some information
regarding the extension itself.
PREDEFINED VALUES
The header file
_X_1_1_/_e_x_t_e_n_s_i_o_n_s_/_x_f_8_6_m_i_s_c_._h
contains definitions for
SEE ALSO
xset(1), xorg.conf(5)
AUTHORS
Joe Moss and David Dawes, The XFree86 Project, Inc.