set or query control parameters for a mouse
#include <sys/mouse.h> int mouse_param( struct _mouse_ctrl *mc, int mode, struct _mouse_param *param );
The mouse_param() function can be used to set or query the current control parameters for the mouse associated with mc.
The argument mc is the value returned by a previous mouse_open() call.
If mode is nonzero, mouse_param() sets the current parameters to be those given in param.
If mode is zero, then mouse_param() returns with the current mouse parameters in param.
The _mouse_param structure pointed to by param is defined in <sys/mouse.h>, and contains at least the following members:
Type | Member | Description |
---|---|---|
char | name[] | Symbolic name of this mouse (read only). |
int | threshold | Threshold after which motions are scaled. |
int | gain | Overall scale factor applied to all motions. |
#include <sys/types.h> #include <sys/mouse.h> #include <stdio.h> void main() { struct _mouse_ctrl *mc; struct _mouse_param param; mc = mouse_open( ( nid_t ) 0, 0, 0 ); if( mouse_param( mc, 0, ¶m ) == 0 ) printf( "Mouse is type %s\n", ¶m.name ); else printf( "No mouse in use\n" ); mouse_close( mc ); }
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
errno, mouse_close(), mouse_flush(), mouse_open(), mouse_read()