GEMLIB
0.44.0
|
input functions More...
Functions | |
void | v_hide_c (VdiHdl) |
void | v_show_c (VdiHdl, short reset) |
void | vex_butv (VdiHdl, void *pusrcode, void **psavcode) |
void | vex_curv (VdiHdl, void *pusrcode, void **psavcode) |
void | vex_motv (VdiHdl, void *pusrcode, void **psavcode) |
void | vex_wheelv (VdiHdl, void *pusrcode, void **psavcode) |
void | vex_timv (VdiHdl, void *time_addr, void **otime_addr, short *time_conv) |
void | vq_key_s (VdiHdl, short *state) |
void | vq_mouse (VdiHdl, short *pstatus, short *x, short *y) |
void | vrq_choice (VdiHdl, short cin, short *cout) |
void | vrq_locator (VdiHdl, short x, short y, short *xout, short *yout, short *term) |
void | vrq_string (VdiHdl, short len, short echo, short echoxy[], char *str) |
void | vrq_valuator (VdiHdl, short in, short *out, short *term) |
void | vsc_form (VdiHdl, short form[]) |
short | vsin_mode (VdiHdl, short dev, short mode) |
short | vsm_choice (VdiHdl, short *choice) |
short | vsm_locator (VdiHdl, short x, short y, short *xout, short *yout, short *term) |
short | vsm_string (VdiHdl, short len, short echo, short echoxy[], char *str) |
void | vsm_valuator (VdiHdl, short in, short *out, short *term, short *status) |
input functions
todo: add description here
void v_hide_c | ( | short | handle | ) |
switches the mouse cursor off
handle | Device handle |
References VDI_CNTRLMAX.
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.
handle | Device handle |
reset |
|
References VDI_CNTRLMAX.
void vex_butv | ( | short | handle, |
void * | new, | ||
void ** | old | ||
) |
installs a routine which is called when a mouse button is pressed
handle | Device handle |
new | address of the new routine |
old | address of the old routine |
Register d0.w contains the button state. The subroutine must save and restore modified registers and call the old status routine.
References VDI_CNTRLMAX.
void vex_curv | ( | short | handle, |
void * | new, | ||
void ** | old | ||
) |
establishes a routine in the mouse interrupt
handle | Device handle |
new | address of the new routine |
old | 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.
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.
References VDI_CNTRLMAX.
void vex_motv | ( | short | handle, |
void * | new, | ||
void ** | old | ||
) |
establishes a routine in the mouse interrupt
handle | Device handle |
new | address of the new routine |
old | 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.
References VDI_CNTRLMAX.
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).
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 |
The subroutine has to save and restore modified registers and call the old timer routine
References VDI_CNTRLMAX.
void vex_wheelv | ( | short | handle, |
void * | new, | ||
void ** | old | ||
) |
establishes a routine in the wheel mouse interrupt
handle | Device handle |
new | address of the new routine |
old | address of the old routine |
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.
References VDI_CNTRLMAX.
void vq_key_s | ( | short | handle, |
short * | state | ||
) |
"SAMPLE KEYBOARD STATE INFORMATION" returns the state of CONTROL, ALTERNATE and the SHIFT key(s).
handle | Device handle |
state | keyboard (bit numbers):
|
References VDI_CNTRLMAX.
void vq_mouse | ( | short | handle, |
short * | pstatus, | ||
short * | x, | ||
short * | y | ||
) |
This function returns the state of the mouse buttons and the mosue position
handle | Device handle |
pstatus | button status |
x | |
y |
References VDI_CNTRLMAX.
void vrq_choice | ( | short | handle, |
short | cin, | ||
short * | cout | ||
) |
returns the number of the function key pressed
handle | Device handle |
cin | initialisierende Taste (0) |
cout | ausgew„hlte Funktionstaste |
References VDI_CNTRLMAX.
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.
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 |
References VDI_CNTRLMAX.
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.
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 |
References vdi_array2str(), VDI_CNTRLMAX, and VDI_INTOUTMAX.
void vrq_valuator | ( | short | handle, |
short | in, | ||
short * | out, | ||
short * | term | ||
) |
returns the value of the valuator device
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 |
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:
References VDI_CNTRLMAX.
void vsc_form | ( | short | handle, |
short | form[] | ||
) |
modifies the appearance of the mouse cursor
handle | Device handle |
form | cursor data:
|
References VDI_CNTRLMAX.
short vsin_mode | ( | short | handle, |
short | dev, | ||
short | mode | ||
) |
sets the input mode for the specified device
handle | Device handle |
dev | input device
|
mode | requested input mode
|
References VDI_CNTRLMAX.
short vsm_choice | ( | short | handle, |
short * | choice | ||
) |
If a function key has been pressed "INPUT CHOICE" returns its number.
handle | Device handle |
choice | key number (1-10) |
References VDI_CNTRLMAX.
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
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 |
References VDI_CNTRLMAX.
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.
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 |
References vdi_array2str(), VDI_CNTRLMAX, and VDI_INTOUTMAX.
void vsm_valuator | ( | short | handle, |
short | in, | ||
short * | out, | ||
short * | term, | ||
short * | status | ||
) |
returns the current value of the valuator device
handle | Device handle |
in | Initial value |
out | New valuator value |
term | Keypress, if keypress event occurred. |
status |
|
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.
References VDI_CNTRLMAX.