home *** CD-ROM | disk | FTP | other *** search
- Here are the various functions, procedures, variables, constants and data
- types defined by the mouse unit...
- _______________________________________________________________________________
-
- * function mouseparams ( var num_buttons : word ):boolean;
-
- This procedure must be called to initialize the mouse and mouse
- software before doing anything else. In addition, it will:
-
- * Return the number of mouse buttons in its only parameter
- * Determine if a mouse is installed, returning:
- 0 - mouse not installed
- 65535 - mouse installed
- * Reset mouse to center of screen
- * Make sure the mouse is off
- * Set default mouse cursor and movement ratios
-
- * function mouse_swreset : boolean;
-
- Calling this function resets the mouse software, but not the mouse
- itself. Returns true if mouse was installed.
-
- * procedure mouse_cursor ( onoff : boolean );
-
- This procedure is used to control whether the mouse cursor is
- displayed.
-
- mouse_cursor(true) - Displays the mouse cursor
- mouse_cursor(false) - Removes the mouse cursor
-
- * procedure mouse_position ( var button_stat : word;
- var x : word;
- var y : word );
-
- This procedure returns the button status information and the
- x and y coordinated of the mouse. See mousebutton, mousex and
- mousey for descriptions of the values returned.
-
- * var mouse_clicked_x,
- mouse_clicked_y : word;
-
- These variables will hold the x and y coordinates of the position
- that the mouse was last clicked at.
- They hold meaningless data unless you call mouse_clicked first.
-
- * function mouse_area (var xma) : word;
-
- This function returns true if the mouse is currently within one
- of any rectangles defined by the user. Send an array of 1 by 4
- arrays configured as such:
-
- an_array[x,1] - upper left coordinate
- an_array[x,2] - upper right coordinate
- an_array[x,3] - lower left coordinate
- an_array[x,4] - lower right coordinate
-
- In addition, the last entry in the array must consist of zeros.
- Maximum size of this array is currently [1..100,1..4].
-
- * function mouse_clicked(button:word) : boolean;
-
- This procedure returns a true if the mouse has been clicked since
- the last call to this function, or since a reset.
-
- * function mousex : word;
-
- This function returns the current x coordinate of the mouse.
-
- * function mousey : word;
-
- This function returns the current y coordinate of the mouse.
-
- * function mousebutton : word;
-
- This function returns the current button status of the mouse.
- The buttons are bit-mapped into the word returned by this function.
- The following table illustrates the meaning of the bits:
-
- Bit Meaning
- 76543210
- ------------------------------------------------
- .......0 Left button not depressed.
- .......1 Left button depressed.
- ......0. Right button not depressed.
- ......1. Right button depressed.
- xxxxxx.. Not defined.
-
- * procedure get_sensitivity ( var x : word;
- var y : word;
- var speed : word );
-
- This procedure returns the following information regarding the
- sensitivity of the mouse:
-
- x - Horizontal coordinates per pixel
- y - Vertical coordinates per pixel
- speed - Double speed threshold
-
- * procedure set_sensitivity ( x : word;
- y : word;
- speed : word );
-
- This procedure sets the following information regarding the
- sensitivity of the mouse:
-
- x - Horizontal coordinates per pixel
- y - Vertical coordinates per pixel
- speed - Double speed threshold
-
- * procedure physical_movement ( var x : integer;
- var y : integer );
-
- This procedure returns the relative movement of the mouse since
- the last call to itself.
-
- * procedure set_ratio ( x,y : word );
-
- This procedure set the ratio between physical movement of the
- cursor and coordinate changes.
-
- x - # physical positions to indicate a change in 8 x coordinates
- y - # physical positions to indicate a change in 8 y coordinates
-
- * procedure set_speed2 ( threshold : word );
-
- This procedure sets the threshold speed above which the cursor
- will move at twice its normal speed. This value's units are
- physical positions per second.
-
- * procedure set_mouse_position ( x,y : word );
-
- This procedure sets the mouse position to any x and y coordinate.
-
- * procedure set_mouse_x_bounds ( xl,xu : word );
-
- This procedure sets the horizontal coordinates within which the
- mouse cursor is limited in its travels.
-
- xl - lower coordinate bound
- xu - upper coordinate bound
-
- * procedure set_mouse_y_bounds ( yl,yu : word );
-
- This procedure sets the vertical coordinates within which the
- mouse cursor is limited in its travels.
-
- yl - lower coordinate bound
- yu - upper coordinate bound
-
- * type array32word
-
- This is a data type used to hold graphics cursors. It is used to
- hold the definition for a hand cursor, along with any cursors you
- may define. This data type is an array[0..31] of word.
-
- * const hand
-
- This is a graphics cursor pre-defined in the unit that looks like a
- right hand with the index finger extended. Internally it is defined
- as such:
- const
- hand : array32word = ($ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
- $ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
- $0000,$0000,$0700,$0500,$0500,$05FC,$0554,$0D54,
- $1554,$1004,$0804,$0404,$0208,$0208,$0208,$0208);
-
- * procedure set_mouse_cursor ( x,y : word;
- var point : array32word );
-
- This procedure defines a graphics cursor and hot-spot.
-
- x - x coordinate of hot spot
- y - y coordinate of hot spot
- point - array32word data defining the cursor and screen masks
-
- * function button_pressed ( button : word;
- var count : word;
- var x : word;
- var y : word ):boolean;
-
- This function returns data pertaining to button presses of the
- mouse. Include the button number as the first parameter to this
- function. ( 0 - left button , 1 - right button )
-
- count - how many presses since the last call or reset
- x - x coordinate of last click
- y - y coordinate of last click
- function value - true if button currently depressed
-
- * function button_released ( button : word;
- var count : word;
- var x : word;
- var y : word ):boolean;
-
- This function returns data pertaining to button releases of the
- mouse. Include the button number as the first parameter to this
- function. ( 0 - left button , 1 - right button )
-
- count - how many releases since the last call or reset
- x - x coordinate of last release
- y - y coordinate of last release
- function value - true if button currently released