Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

VDI input functions
[VDI Function Reference]

input functions More...

Functions

void v_hide_c (short)
void v_show_c (short, short reset)
void vex_butv (short, void *pusrcode, void **psavcode)
void vex_curv (short, void *pusrcode, void **psavcode)
void vex_motv (short, void *pusrcode, void **psavcode)
void vex_wheelv (short, void *pusrcode, void **psavcode)
void vex_timv (short, void *time_addr, void **otime_addr, short *time_conv)
void vq_key_s (short, short *state)
void vq_mouse (short, short *pstatus, short *x, short *y)
void vrq_choice (short, short cin, short *cout)
void vrq_locator (short, short x, short y, short *xout, short *yout, short *term)
void vrq_string (short, short len, short echo, short echoxy[], char *str)
void vrq_valuator (short, short in, short *out, short *term)
void vsc_form (short, short form[])
short vsin_mode (short, short dev, short mode)
short vsm_choice (short, short *choice)
short vsm_locator (short, short x, short y, short *xout, short *yout, short *term)
short vsm_string (short, short len, short echo, short echoxy[], char *str)
void vsm_valuator (short, short in, short *out, short *term, short *status)

Detailed Description

input functions

todo: add description here


Function Documentation

void v_hide_c short  handle  ) 
 

switches the mouse cursor off

Parameters:
handle Device handle
Since:
all VDI versions
Note:
Use mt_graf_mouse() to switch the cursor on or off.

void v_show_c short  handle,
short  reset
 

'neutralizes' a preceding call of "HIDE CURSOR". If you want to display the mouse cursor immediately without regard to the hide counter, the paramter reset has to be zero.

Parameters:
handle Device handle
reset 
  • 0 : display cursor immediately
  • any nonzero value: decrement hide counter and display cursor if necessary
Since:
all VDI versions
Note:
Use mt_graf_mouse() to switch the cursor on or off.

void vex_butv short  handle,
void *  new,
void **  old
 

installs a routine which is called when a mouse button is pressed

Parameters:
handle Device handle
new address of the new routine
old address of the old routine
Since:
all VDI versions
Register d0.w contains the button state. The subroutine must save and restore modified registers and call the old status routine.

void vex_curv short  handle,
void *  new,
void **  old
 

establishes a routine in the mouse interrupt

Parameters:
handle Device handle
new address of the new routine
old address of the old routine
Since:
all VDI versions
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.

Please note that this interrupt routine is called after the one installed by vex_motv(). In contrast to the preceding routine, the mouse coordinates have been clipped.

void vex_motv short  handle,
void *  new,
void **  old
 

establishes a routine in the mouse interrupt

Parameters:
handle Device handle
new address of the new routine
old address of the old routine
Since:
all VDI versions
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.

void vex_timv short  handle,
void *  time_addr,
void **  otime_addr,
short time_conv
 

You can use this function to establish a function in the timer interrupt (etv_timer).

Parameters:
handle Device handle
time_addr address of the new timer routine
otime_addr address of the old timer routine
time_conv interrupt interval in ms
Since:
all VDI versions
The subroutine has to save and restore modified registers and call the old timer routine

void vex_wheelv short  handle,
void *  new,
void **  old
 

establishes a routine in the wheel mouse interrupt

Parameters:
handle Device handle
new address of the new routine
old address of the old routine
Since:
Milan-VDI TOS 4.08
The routine will be called if the wheel of a mouse change; 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.

void vq_key_s short  handle,
short state
 

"SAMPLE KEYBOARD STATE INFORMATION" returns the state of CONTROL, ALTERNATE and the SHIFT key(s).

Parameters:
handle Device handle
state keyboard (bit numbers):
  • 0: Shift right
  • 1: Shift left
  • 2: Control
  • 3: Alternate
Since:
all VDI versions
Note:
Use the AES event functions to inquire the keyboard state

void vq_mouse short  handle,
short pstatus,
short x,
short y
 

This function returns the state of the mouse buttons and the mosue position

Parameters:
handle Device handle
pstatus button status
x 
y 
Since:
all VDI versions
Note:
Use mt_graf_mkstate() or the event functions of the AES.

void vrq_choice short  handle,
short  cin,
short cout
 

returns the number of the function key pressed

Parameters:
handle Device handle
cin initialisierende Taste (0)
cout ausgew„hlte Funktionstaste
Since:
all VDI versions

void vrq_locator short  handle,
short  x,
short  y,
short xout,
short yout,
short term
 

returns the position of the mouse. You can use this function to change the position of the mouse cursor (but you should not because it will only irritate the user). This functions waits until a mouse button is pressed.

Parameters:
handle Device handle
x new x-coordinate of the mouse cursor
y new y-coordinate of the mouse cursor
xout old x-coordinate of the mouse cursor
yout old x-coordinate of the mouse cursor
term Maustastenstatus+31
Since:
all VDI versions

void vrq_string short  handle,
short  len,
short  echo,
short  echoxy[],
char *  str
 

returns a string from the keyboard, and returns if the maximum string length is reached or if the user has pressed RETURN.

Parameters:
handle Device handle
len is the maximum length of the string returned in vdi_intout. If len is negative, the absolute value is considered to be the maximum length and scan codes are returned instead of ASCII values.
echo 0: no output 1: echo
echoxy 
str input buffer
Since:
all VDI versions

void vrq_valuator short  handle,
short  in,
short out,
short term
 

returns the value of the valuator device

Parameters:
handle Device handle
in Initial value
out Output value
[option CHECK_NULLPTR] out may be NULL
term Terminator
[option CHECK_NULLPTR] term may be NULL
Since:
all VDI versions
The initial value of the valuator is incremented or decremented until a terminating character is struck. Valuator keys are typically the up-arrow and down-arrow keys. Valuator numbers range from 1 to 100. Typical implementation of the up-arrow and down-arrow keys is as follows:
  • Pressing the up-arrow key adds ten to the valuator.
  • Pressing the down-arrow key subtracts ten from the valuator.
  • Pressing the up-arrow key with the Shift key adds one to the valuator.
  • Pressing the down-arrow key with the Shift key subtracts one from the valuator.

Note:
This function is not required and may not be available on all devices.

void vsc_form short  handle,
short  form[]
 

modifies the appearance of the mouse cursor

Parameters:
handle Device handle
form cursor data:
  • form[0]: x-coordinate of hot spot
  • form[1]: y-coordinate of hot spot
  • form[2]: must be 1 (REPLACE)
  • form[3]: background color
  • form[4]: foreground color
  • form[5..20]: background mask
  • form[21..36]: foreground mask
Since:
all VDI versions
Note:
Use mt_graf_mouse() to change the mouse cursor !

short vsin_mode short  handle,
short  dev,
short  mode
 

sets the input mode for the specified device

Parameters:
handle Device handle
dev input device
  • 1: Mouse
  • 2: Cursor
  • 3: Function keys
  • 4: Keyboard
mode requested input mode
  • REQUEST MODE (1): wait until input data is available
  • SAMPLE MODE (2): return device status and input data (if available)
Returns:
selected input mode
Since:
all VDI versions

short vsm_choice short  handle,
short choice
 

If a function key has been pressed "INPUT CHOICE" returns its number.

Parameters:
handle Device handle
choice key number (1-10)
Returns:
0 (no key) or 1 (key pressed)
Since:
all VDI versions

short vsm_locator short  handle,
short  x,
short  y,
short xout,
short yout,
short term
 

returns the coordinates of the mouse cursor and sets new coordinates

Parameters:
handle Device handle
x new x-coordinate of the mouse cursor
y new y-coordinate of the mouse cursor
xout old x-coordinate of the mouse cursor
yout old y-coordinate of the mouse cursor
term mouse button + 31
Returns:
a bitmap value:
  • bit 0 (0x01): mouse movement
  • bit 1 (0x02): button pressed
Since:
all VDI versions

short vsm_string short  handle,
short  len,
short  echo,
short  echoxy[],
char *  str
 

returns a string from the keyboard. "INPUT STRING, SAMPLE MODE" returns if the maximum string length is reached, if the user has pressed RETURN or if the user has not pressed a key.

Parameters:
handle Device handle
len is the maximum length of the string returned in intout. If max_length is negative, the absolute value is considered to be the maximum length and scan codes are returned instead of ASCII values.
echo 0: no output 1: echo
echoxy 
str input buffer
Returns:
0 (no input) or the length of the string otherwise.
Since:
all VDI versions

void vsm_valuator short  handle,
short  in,
short out,
short term,
short status
 

returns the current value of the valuator device

Parameters:
handle Device handle
in Initial value
out New valuator value
term Keypress, if keypress event occurred.
status 
  • 0 = nothing happened
  • 1 = valuator changed
  • 2 = keypress character
Since:
all VDI versions
The valuator device is sampled. If the valuator has changed, GEM VDI increments or decrements the valuator value as required. If a terminating event occurs, GEM VDI returns the value. If nothing happens, GEM VDI returns no value. Valuator numbers range from 1 to 100. The suggested keys are the same as for Input Valuator, Request Mode.

Note: This function is not required and may not be available on all devices.


Generated on Wed Nov 3 22:42:21 2004 for GEMLIB by  doxygen 1.3.9.1