get_pointer- Function
Current position of pointer
Description
Returns the current position of the pointer (ie. mouse) relative to the upper left corner of the screen or a Varkon window. get_pointer() returns immediately when called and does not wait for a button to be pressed or released.
Syntax
get_pointer(code)
INT code;
Principal parameters
None. Optional parameters
code 0 = Pixels relative to upper left of the screen (default) 1 = Pixels relative to upper left of the application window 2 = Pixels relative to upper left of the main graphics window 3 = Model coordinates relative to the basic coordinate system Return value
A VECTOR holding the X- and Y-coordinate. The Z-component is always 0.
Comments
In UNIX code 1 and 2 return the same values. In Windows95/NT code 1 returns the cordinates relative to the Varkon main application window and code 2 returns coordinates relative to the main (default) graphics window.
VARKON Homepage | Index |