The input functions enable a program to inquire the status of
the keyboard and mouse, taking into consideration the input modes.
They also offer routines for linking in timer and mouse interrupts.
The following functions are available:
Name: |
»Exchange button change vector« - Adapt the interrupt vector
for a mouse button press.
|
Opcode: |
125
|
Syntax: |
void vex_butv ( int16_t handle, int16_t (*pusrcode)(), int16_t
(**psavcode)() );
|
Description: |
The call vex_butv permits the installation of a custom routine
that is called by the VDI each time a mouse button is pressed. The
following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
pusrcode |
Address of the new routine
|
psavcode |
Address of the old routine
|
On entry to pusrcode, the mouse status is contained in
register d0 (in the same format as the button return value in
vq_mouse). The subroutine must save and restore modified registers and
call the old status routine.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Return value: |
The function does not return a result.
|
Availability: |
Supported by all screen drivers.
|
Group: |
Input functions
|
See also: |
Binding vex_timv vex_motv vex_curv
|
Name: |
»Exchange cursor change vector« - Adapt the interrupt vector
for cursor pointer drawing.
|
Opcode: |
127
|
Syntax: |
void vex_curv ( int16_t handle, int16_t (*pusrcode)(), int16_t
(**psavcode)() );
|
Description: |
The call vex_curv permits the installation of a routine that is
called each time a mouse pointer is drawn, allowing a customized mouse
pointer form to replace that drawn by the system. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
pusrcode |
Address of the new routine
|
psavcode |
Address of the old routine
|
The routine will be called if the mouse is moved and d0.w/d1.w
contain the coordinates of the mouse cursor. The subroutine must save
and restore modified registers and call the old interrupt routine.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Return value: |
The function does not return a result.
|
Availability: |
Supported by all screen drivers.
|
Group: |
Input functions
|
See also: |
Binding vex_timv vex_butv vex_motv
|
Name: |
»Exchange mouse movement vector« - Adapt the interrupt vector
for mouse movements.
|
Opcode: |
126
|
Syntax: |
void vex_motv ( int16_t handle, int16_t (*pusrcode)(), int16_t
(**psavcode)() );
|
Description: |
The call vex_motv permits the installation of a custom routine
that is called by the VDI each time a mouse pointer is moved. The
following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
pusrcode |
Address of the new routine
|
psavcode |
Address of the old routine
|
On entry to pusrcode, the mouse's X and Y location is
contained in registers d0 and d1 respectively. The subroutine must
save and restore modified registers and call the old status routine.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Return value: |
The function does not return a result.
|
Availability: |
Supported by all screen drivers.
|
Group: |
Input functions
|
See also: |
Binding vex_timv vex_butv vex_curv
|
Name: |
»Exchange timer interrupt vector« - Adapt the interrupt
vector for the timer.
|
Opcode: |
118
|
Syntax: |
void vex_timv ( int16_t handle, int16_t (*tim_addr)(), int16_t
(**otim_addr)(), int16_t *tim_conv );
|
Description: |
The call vex_timv permits the installation of a user-defined
routine that will be called at each timer tick (currently every 50
milliseconds). The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
tim_addr |
Address of the new timer routine
|
otim_addr |
Address of the old timer routine
|
tim_conv |
Interrupt interval in ms
|
The subroutine has to save and restore modified registers and
call the old timer routine.
Notes: The input functions of the VDI work only on
the physical workstation, which is normally used by the
AES.
As this vector is jumped through frequently, the new routine
should be very simple to avoid degrading the system performance.
|
Return value: |
The function does not return a result.
|
Availability: |
Supported by all screen drivers.
|
Group: |
Input functions
|
See also: |
Binding vex_butv vex_motv vex_curv
|
Name: |
»Exchange wheel interrupt vector« - Adapt the interrupt
vector for the mouse wheel.
|
Opcode: |
134
|
Syntax: |
void vex_wheelv ( int16_t handle, void *new, void **old );
|
Description: |
The call vex_wheelv installs a routine which is called by the
VDI every time a mouse wheel event occurs. d0.w contain the
wheel_number, d1.w contain the wheel_amount of the wheel from the
mouse. The subroutine must save and restore modified registers and
call the old interrupt routine.
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
new |
Address of the new routine
|
old |
Address of the old routine
|
|
Return value: |
The function does not return a result.
|
Availability: |
As of MilanTOS 4.08 Release 5.10.2002, not yet documented,
internals may still change.
|
Group: |
Input functions
|
See also: |
Binding vex_butv vex_motv vex_curv vex_timv
|
Name: |
»Input choice, Request mode« - Return the status of the
'choice' device (e.g. function keys when one was pressed).
|
Opcode: |
30
|
Syntax: |
void vrq_choice ( int16_t handle, int16_t ch_in, int16_t
*ch_out );
|
Description: |
The call vrq_choice ascertains the actuation of a 'choice'
device (e.g. function key) in REQUEST mode. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
ch_in |
Starting value for choice device
|
ch_out |
Selected key or code number
|
The number of function keys depends on each individual device.
If another key is pressed, the corresponding code number will be
returned.
|
Return value: |
The function does not return a result.
|
Availability: |
Although the function is implemented in ROM, it does not seem
to work in any way. The function is not supported by all
device drivers.
The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Group: |
Input functions
|
See also: |
Binding vsm_choice vsin_mode
|
Name: |
»Input locator, Request mode« - Obtain the mouse position
when a key was pressed.
|
Opcode: |
28
|
Syntax: |
void vrq_locator ( int16_t handle, int16_t x, int16_t y,
int16_t *xout, int16_t *yout, int16_t *term );
|
Description: |
The call vrq_locator ascertains or sets the position of the
graphic cursor (the 'locator') in REQUEST mode. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
x |
Initial X-coordinate, and
|
y |
Y-coordinate of the graphic cursor
|
xout |
Final X-coordinate, and
|
yout |
Y-coordinate of graphic cursor on return
|
term |
The low byte contains a character terminator. For
keyboard-terminated locator input, this is the ASCII character code of
the key struck to terminate input. For nonkeyboard-terminated input
(tablet, mouse, and so on), valid locator terminators begin with 20
Hex (space) and increase from there.
|
The user only gets the result when a key is pressed. The graphic
cursor is always visible on the screen at the specified position in
the current form. One should note that any desired key (including the
mouse buttons) may be pressed.
Normally the movement of the graphic cursor takes place in large
steps when the cursor keys are pressed, or in small steps when these
are pressed in combination with the Shift key. On the Atari, however,
the Alternate key is required as well.
|
Return value: |
The function does not return a result.
|
Availability: |
The function is not supported by all device drivers. The input
functions of the VDI work only on the physical workstation,
which is normally used by the AES.
|
Group: |
Input functions
|
See also: |
Binding vsm_locator vsin_mode
|
Name: |
»Input string, Request mode« - Read in a string in REQUEST
mode.
|
Opcode: |
31
|
Syntax: |
void vrq_string ( int16_t handle, int16_t max_length, int16_t
echo_mode, int16_t *echo_xy, int8_t *string );
|
Description: |
The call vrq_string reads a string from the 'string' device
(normally the keyboard) in REQUEST mode into a buffer, with an
optional echo to the screen. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
max_length |
Maximum string length
|
echo_mode |
Mode:
0 = |
No echo
|
1 = |
Echo input characters to specified position
|
|
echo_xy[0] |
X-coordinate, and
|
echo_xy[1] |
Y-coordinate of echo area
|
string |
Address of character string
|
The echo output is not available on all devices; the text attributes will
be paid regard to.
If max_length is negative, the absolute value is
considered to be the maximum length and scancodes are returned instead
of ASCII values.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Return value: |
The function does not return a result.
|
Availability: |
This call is not guaranteed to be available with any driver and
its use should therefore be restricted.
|
Group: |
Input functions
|
See also: |
Binding vswr_mode vs_color vst_alignment vst_height
vst_point vst_rotation vst_font vst_color vst_effects
vsm_string
|
Name: |
»Input valuator, Request mode« - Obtain value changes of
input devices.
|
Opcode: |
29
|
Syntax: |
void vrq_valuator ( int16_t handle, int16_t valuator_in,
int16_t *valuator_out, int16_t *terminator );
|
Description: |
The call vrq_valuator obtains a value change that is the result
of various key presses (on the valuator device) until a terminating
character is entered in REQUEST mode. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
valuator_in |
Initial value of valuator device
|
valuator_out |
Output value of valuator
|
terminator |
Actuated key causing termination
|
All values lie between 1 and 100. Typcal keys for value changes
are cursor-up or cursor-down. With these one gets the following value
changes to the value current at the time:
Keypress |
Value |
Cursor-up |
+ 10 |
Cursor-down |
- 10 |
Shift + Cursor-up |
+ 01 |
Shift + Cursor-down |
- 01 |
|
Return value: |
The function does not return a result.
|
Availability: |
The function is not supported by all device drivers
(also not in the ROM). The input functions of the VDI work only on
the physical workstation, which is normally used by the
AES.
|
Group: |
Input functions
|
See also: |
Binding vsm_valuator vsin_mode
|
Name: |
»Set mouse form« - Set the mouse pointer shape.
|
Opcode: |
111
|
Syntax: |
void vsc_form ( int16_t handle, int16_t *pcur_form );
|
Description: |
The call vsc_form permits the definition of the shape of the
mouse pointer, which is stored in the MFORM structure. The following
apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
pcur_form[0] |
X-coordinate, and
|
pcur_form[1] |
Y-coordinate of hot-spot
|
pcur_form[2] |
Number of planes, must be 1
|
pcur_form[3] |
Colour index of background mask (should be 0)
|
pcur_form[4] |
Colour index of foreground mask (should be 1)
|
pcur_form[05..20] |
Definition of background mask
|
pcur_form[21..36] |
Definition of foreground mask
|
Each mask is dimensioned as a 16-WORD field each of 16 bits. Bit
15 of the first WORD is here the top left corner of the mask, and bit
0 of WORD 16 is the bottom right corner.
Under hot-spot one understands the exact position of the
active part of the graphic cursor. With an arrow this corresponds to
the arrow's tip, with a cross it is the crossing-point. The
coordinates are specified relative to the top left corner of the mask.
For setting the mouse pointer shape, all GEM programs should use
the AES function graf_mouse. Otherwise the mouse pointer shape
management of the AES will become permanently confused.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
Therefore it is better to fall back to using graf_mouse instead.
Under NVDI it is also possible to obtain the current shape of
the mouse pointer (see Binding).
|
Return value: |
The function does not return a result.
|
Availability: |
Supported by all screen drivers.
|
Group: |
Input functions
|
See also: |
Binding graf_mouse MFORM
|
Name: |
»Input choice, Sample mode« - Ascertain which function key
was pressed last.
|
Opcode: |
30
|
Syntax: |
int16_t vsm_choice ( int16_t handle, int16_t *choice );
|
Description: |
The call vsm_choice obtains the current value of the 'choice'
device, normally the number of the last pressed function key. The
folowing apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
choice |
Pressed function key or 0, if none such was struck
|
The number of function keys depends on the device in each case.
If another key has been activated, then the associated code number
will be returned.
|
Return value: |
The function returns the selection status (0 = no key, 1 = key
pressed).
|
Availability: |
Although the function is implemented in ROM, it does not seem
to work properly. The function is not supported by all device
drivers. The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Group: |
Input functions
|
See also: |
Binding vrq_choice vsin_mode
|
Name: |
»Input locator, Sample mode« - Obtain the position of the
graphic cursor.
|
Opcode: |
28
|
Syntax: |
int16_t vsm_locator ( int16_t handle, int16_t x, int16_t y,
int16_t *xout, int16_t *yout, int16_t *term );
|
Description: |
The call vsm_locator sets or obtains the position of the
'locator' (graphic cursor) in SAMPLE mode. The following apply:
Position |
Meaning
|
|
|
handle |
Workstation identifier
|
x |
Initial X-coordinate, and
|
y |
Y-coordinate of the graphic cursor
|
xout |
Final X-coordinate, and
|
yout |
Y-coordinate of graphic cursor on return
|
term |
In the low byte, the ASCII code of the terminating key will be
filled in; since special keys (mouse buttons, etc.) are assigned
values from 32 (left button) and 33 (right button), they cannot be
differentiated directly from keys of the keyboard
|
This function does not make the graphic cursor visible;
key presses or cursor movements will only be reported if they have
actually taken place.
Notes: The input functions of the VDI work only on
the physical workstation, which is normally used by the
AES.
Using this call will confuse the AES.
|
Return value: |
The function returns coded information about whether the cursor
position has changed (bit 0 set) and whether a key was pressed (bit 1
set).
|
Availability: |
The function is not supported by all device drivers.
|
Group: |
Input functions
|
See also: |
Binding vrq_locator vsin_mode
|
Name: |
»Input string, Sample mode« - Read in a string in SAMPLE
mode.
|
Opcode: |
31
|
Syntax: |
int16_t vsm_string ( int16_t handle, int16_t max_length,
int16_t echo_mode, int16_t *echo_xy, int8_t *string );
|
Description: |
The call vsm_string retrieves input from the 'string' device
(normally the keyboard) in SAMPLE mode into a buffer, with an optional
echo to the screen. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
max_length |
Maximum string length
|
echo_mode |
Mode:
0 = |
No echo
|
1 = |
Echo input characters
|
|
echo_xy[0] |
X-coordinate, and
|
echo_xy[1] |
Y-coordinate of echo area
|
string |
Address of character string buffer
|
The echo output is not available on all devices; the text attributes will
be paid regard to.
If max_length is negative, the absolute value is
considered to be the maximum length and scancodes are returned instead
of ASCII values, occupying the full WORD in intout rather than just
the lower 8 bits.
The input of a character string is terminated by:
- A carriage return is encountered
- The intout buffer is full
- Data is no longer available
If the character string is basically to be terminated with
Return, then you should use REQUEST mode with vrq_string.
Note: The input functions of the VDI work only on the
physical workstation, which is normally used by the AES.
|
Return value: |
The function returns either the number of read in characters,
or NULL if the input was terminated by an invalid key. The text that
was input lies in string.
|
Availability: |
The function is not supported by all device drivers.
|
Group: |
Input functions
|
See also: |
Binding vswr_mode vs_color vst_alignment vst_height
vst_point vst_rotation vst_font vst_color vst_effects
vrq_string
|
Name: |
»Input valuator, Sample mode« - Obtain value changes of input
devices in SAMPLE mode.
|
Opcode: |
29
|
Syntax: |
void vsm_valuator ( int16_t handle, int16_t val_in, int16_t
*val_out, int16_t *term, int16_t *status );
|
Description: |
The call vsm_valuator retrieves value changes from the
'valuator' device in SAMPLE mode. The following apply:
Parameter |
Meaning
|
|
|
handle |
Workstation identifier
|
val_in |
Initial value
|
val_out |
Final value
|
term |
ASCII-code of pressed key
|
status |
Evaluation:
0 = |
No change
|
1 = |
Value changed
|
2 = |
Key pressed
|
|
Values between 1 and 100 are returned if a corresponding event
has occurred; otherwise no value is returned.
Note: The function is not supported by all
device drivers (also not in the ROM). The input functions of the
VDI work only on the physical workstation, which is
normally used by the AES.
|
Return value: |
The function does not return a result.
|
Availability: |
The function is not guaranteeed to be available with any driver
and its use should therefore be restricted.
|
Group: |
Input functions
|
See also: |
Binding vrq_valuator vsin_mode
|