TPAD_$SET_MODE Domain/OS TPAD_$SET_MODE
NAME
tpad_$set_mode - set pointing device response characteristics
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/tpad.h>
void tpad_$set_mode(
tpad_$mode_t &mode,
short &x_scale,
short &y_scale,
short &hysteresis,
smd_$pos_t &origin)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/tpad.ins.pas';
procedure tpad_$set_mode(
in mode: tpad_$mode_t;
in x_scale: integer;
in y_scale: integer;
in hysteresis: integer;
in origin: smd_$pos_t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/tpad.ins.ftn'
integer*2 mode, x_scale, y_scale, hysteresis
integer*2 line, column, origin(2)
equivalence (line, origin(1)), (column, origin(2))
call tpad_$set_mode(mode, x_scale, y_scale, hysteresis, origin)
DESCRIPTION
This call sets the mode, scale factors, and hysteresis factors of point-
ing devices. It can also change the origin for relative or
absolute/relative mode. Use the output from tpad_$inquire as the input
to this call to change one aspect of pointing device response without
changing any other aspects.
A program can use this call with the touchpad, mouse, and bit pad point-
ing devices, but the mouse uses only the scale and hysteresis factors and
ignores the other mode settings, since it is inherently a relative dev-
ice.
mode The cursor mode to set. Specify one of the following predefined
values:
tpad_$absolute
Absolute mode maps the pointing space to a part of the screen
dictated by the scaling factor and the origin value. Thus,
there is a one-to-one mapping between points in the pointing
space and a subset of points on the screen.
tpad_$relative
In relative mode, the cursor responds only to device movement
relative to the current position. The response of the cursor
simulates response to mouse movement. This is the only mean-
ingful mode to use with a mouse.
tpad_$rel_abs
In relative/absolute mode, the cursor responds as in absolute
mode on first contact to establish a new current position.
After first contact, the cursor responds as in relative mode.
Momentary lifting of the finger from a touchpad (for less than
about half a second) does not affect the cursor position.
x_scale
The scale factor in the x dimension. Scale factors are not relevent
to absolute mode.
y_scale
The scale factor in the y dimension. Scale factors are not relevent
to absolute mode.
hysteresis
The hysteresis factor, in pixels.
The hysteresis factor prevents minor, unintentional movements from
changing the cursor location. It effectively defines a box around
the current location. The cursor does not move while the current
location stays within the hysteresis box.
If the current location moves beyond the box, the distance the cur-
sor moves is the difference between the new location and the past
location less the hysteresis factor. The default hysteresis factor
is 5.
origin
is scale origin for x- and y-dimensions in smd_$pos_t format.
SEE ALSO
tpad_$inq_dtype.