home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / turbopas / amouse55.zip / MOUSE.DOC next >
Text File  |  1988-02-17  |  8KB  |  203 lines

  1.   Here are the various functions, procedures, variables, constants and data
  2. types defined by the mouse unit...
  3. _______________________________________________________________________________
  4.  
  5.   * function  mouseparams             ( var num_buttons : word        ):boolean;
  6.  
  7.       This procedure must be called to initialize the mouse and mouse
  8.       software before doing anything else. In addition, it will:
  9.  
  10.         * Return the number of mouse buttons in its only parameter
  11.         * Determine if a mouse is installed, returning:
  12.            0     - mouse not installed
  13.            65535 - mouse installed
  14.         * Reset mouse to center of screen
  15.         * Make sure the mouse is off
  16.         * Set default mouse cursor and movement ratios
  17.  
  18.   * function  mouse_swreset    : boolean;
  19.  
  20.       Calling this function resets the mouse software, but not the mouse
  21.       itself. Returns true if mouse was installed.
  22.  
  23.   * procedure mouse_cursor            (     onoff       : boolean     );
  24.  
  25.        This procedure is used to control whether the mouse cursor is
  26.        displayed.
  27.  
  28.          mouse_cursor(true)  - Displays the mouse cursor
  29.          mouse_cursor(false) - Removes the mouse cursor
  30.  
  31.   * procedure mouse_position          ( var button_stat : word;
  32.                                         var x           : word;
  33.                                         var y           : word        );
  34.  
  35.        This procedure returns the button status information and the
  36.        x and y coordinated of the mouse. See mousebutton, mousex and
  37.        mousey for descriptions of the values returned.
  38.  
  39.   * var  mouse_clicked_x,
  40.          mouse_clicked_y  : word;
  41.  
  42.       These variables will hold the x and y coordinates of the position
  43.       that the mouse was last clicked at.
  44.       They hold meaningless data unless you call mouse_clicked first.
  45.  
  46.   * function  mouse_area   (var xma)        : word;
  47.  
  48.       This function returns true if the mouse is currently within one
  49.       of any rectangles defined by the user. Send an array of 1 by 4
  50.       arrays configured as such:
  51.  
  52.         an_array[x,1] - upper left coordinate
  53.         an_array[x,2] - upper right coordinate
  54.         an_array[x,3] - lower left coordinate
  55.         an_array[x,4] - lower right coordinate
  56.  
  57.       In addition, the last entry in the array must consist of zeros.
  58.       Maximum size of this array is currently [1..100,1..4].
  59.  
  60.   * function  mouse_clicked(button:word)    : boolean;
  61.  
  62.        This procedure returns a true if the mouse has been clicked since
  63.        the last call to this function, or since a reset.
  64.  
  65.   * function  mousex           : word;
  66.  
  67.       This function returns the current x coordinate of the mouse.
  68.  
  69.   * function  mousey           : word;
  70.  
  71.       This function returns the current y coordinate of the mouse.
  72.  
  73.   * function  mousebutton      : word;
  74.  
  75.       This function returns the current button status of the mouse.
  76.       The buttons are bit-mapped into the word returned by this function.
  77.       The following table illustrates the meaning of the bits:
  78.  
  79.          Bit       Meaning
  80.       76543210
  81.       ------------------------------------------------
  82.       .......0     Left button not depressed.
  83.       .......1     Left button depressed.
  84.       ......0.     Right button not depressed.
  85.       ......1.     Right button depressed.
  86.       xxxxxx..     Not defined.
  87.  
  88.   * procedure get_sensitivity         ( var x           : word;
  89.                                         var y           : word;
  90.                                         var speed       : word        );
  91.  
  92.       This procedure returns the following information regarding the
  93.       sensitivity of the mouse:
  94.  
  95.         x     - Horizontal coordinates per pixel
  96.         y     - Vertical coordinates per pixel
  97.         speed - Double speed threshold
  98.  
  99.   * procedure set_sensitivity         (     x           : word;
  100.                                             y           : word;
  101.                                             speed       : word        );
  102.  
  103.       This procedure sets the following information regarding the
  104.       sensitivity of the mouse:
  105.  
  106.         x     - Horizontal coordinates per pixel
  107.         y     - Vertical coordinates per pixel
  108.         speed - Double speed threshold
  109.  
  110.   * procedure physical_movement       ( var x           : integer;
  111.                                         var y           : integer     );
  112.  
  113.        This procedure returns the relative movement of the mouse since
  114.        the last call to itself.
  115.  
  116.   * procedure set_ratio               (     x,y         : word        );
  117.  
  118.        This procedure set the ratio between physical movement of the
  119.        cursor and coordinate changes.
  120.  
  121.          x - # physical positions to indicate a change in 8 x coordinates
  122.          y - # physical positions to indicate a change in 8 y coordinates
  123.  
  124.   * procedure set_speed2              (     threshold   : word        );
  125.  
  126.       This procedure sets the threshold speed above which the cursor
  127.       will move at twice its normal speed. This value's units are
  128.       physical positions per second.
  129.  
  130.   * procedure set_mouse_position      (     x,y         : word        );
  131.  
  132.        This procedure sets the mouse position to any x and y coordinate.
  133.  
  134.   * procedure set_mouse_x_bounds      (     xl,xu       : word        );
  135.  
  136.        This procedure sets the horizontal coordinates within which the
  137.        mouse cursor is limited in its travels.
  138.  
  139.        xl - lower coordinate bound
  140.        xu - upper coordinate bound
  141.  
  142.   * procedure set_mouse_y_bounds      (     yl,yu       : word        );
  143.  
  144.        This procedure sets the vertical coordinates within which the
  145.        mouse cursor is limited in its travels.
  146.  
  147.        yl - lower coordinate bound
  148.        yu - upper coordinate bound
  149.  
  150.   * type array32word
  151.  
  152.       This is a data type used to hold graphics cursors. It is used to
  153.       hold the definition for a hand cursor, along with any cursors you
  154.       may define. This data type is an array[0..31] of word.
  155.  
  156.   * const hand
  157.  
  158.       This is a graphics cursor pre-defined in the unit that looks like a
  159.       right hand with the index finger extended. Internally it is defined
  160.       as such:
  161.       const
  162.         hand : array32word = ($ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  163.                               $ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  164.                               $0000,$0000,$0700,$0500,$0500,$05FC,$0554,$0D54,
  165.                               $1554,$1004,$0804,$0404,$0208,$0208,$0208,$0208);
  166.  
  167.   * procedure set_mouse_cursor        (     x,y         : word;
  168.                                         var point       : array32word );
  169.  
  170.        This procedure defines a graphics cursor and hot-spot.
  171.  
  172.          x     - x coordinate of hot spot
  173.          y     - y coordinate of hot spot
  174.          point - array32word data defining the cursor and screen masks
  175.  
  176.   * function  button_pressed          (     button      : word;
  177.                                         var count       : word;
  178.                                         var x           : word;
  179.                                         var y           : word        ):boolean;
  180.  
  181.        This function returns data pertaining to button presses of the
  182.        mouse. Include the button number as the first parameter to this
  183.        function. ( 0 - left button , 1 - right button )
  184.  
  185.          count          - how many presses since the last call or reset
  186.          x              - x coordinate of last click
  187.          y              - y coordinate of last click
  188.          function value - true if button currently depressed
  189.  
  190.   * function  button_released         (     button      : word;
  191.                                         var count       : word;
  192.                                         var x           : word;
  193.                                         var y           : word        ):boolean;
  194.  
  195.        This function returns data pertaining to button releases of the
  196.        mouse. Include the button number as the first parameter to this
  197.        function. ( 0 - left button , 1 - right button )
  198.  
  199.          count          - how many releases since the last call or reset
  200.          x              - x coordinate of last release
  201.          y              - y coordinate of last release
  202.          function value - true if button currently released
  203.