home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SPX30.ZIP / SPX_DOC.ZIP / SPX_MOS.DOC < prev    next >
Encoding:
Text File  |  1994-06-13  |  4.5 KB  |  120 lines

  1. { SPX Library Version 3.0  Copyright 1993 Scott D. Ramsay }
  2.  
  3.  The SPX_MOS unit provides routines for reading the mouse inputs.
  4.  
  5. ───────────────────────────────────────────────────────────────────────────
  6. Global Variables:
  7.  
  8.    visible     TRUE if the mouse pointer is visiable.
  9.    mousehere   TRUE is a mouse is connected and the driver is installed
  10.    mousewason  TRUE if the mouse was on before the procedure MOUSEOFF was called
  11.    nomouse     same as MOUSEHERE (for compatability)
  12.    mseshp      SPX default small mouse pointer shape
  13.  
  14.    m1,m2,m3,m4 : integer;  { scratch variables, can use for any purpose }
  15.  
  16. ───────────────────────────────────────────────────────────────────────────
  17. procedure mset(var m1,m2,m3,m4:integer);
  18.  
  19.    For users who are familar with the mouse driver interrupt number, they
  20.    can use this procedure for direct interrupt mouse calls.
  21.  
  22.    m1   = register AX
  23.    m2   = register BX
  24.    m3   = register CX
  25.    m4   = register DX
  26.  
  27. ───────────────────────────────────────────────────────────────────────────
  28. function mousereset:integer;
  29.  
  30.   Resets the mouse.  Must be called first to use any of the other
  31.   functions.  Returns 0 if successful
  32. ───────────────────────────────────────────────────────────────────────────
  33. procedure mouseon;
  34.  
  35.   Turns on the mouse.  (display)
  36. ───────────────────────────────────────────────────────────────────────────
  37. function mouseoff:boolean;
  38.  
  39.   Turns off the mouse.  (hide)
  40. ───────────────────────────────────────────────────────────────────────────
  41. procedure getmouse(var m2,m3,m4:integer);
  42.  
  43.   Gets the mouse inputs
  44.  
  45.   m2  Mouse button mask.  Bit set indicates mouse button is down.
  46.         bit 0 set  -  button 1
  47.         bit 1 set  -  button 2
  48.         bit 2 set  -  button 3
  49.   m3  Mouse current X position
  50.   m4  Mouse current Y position
  51. ───────────────────────────────────────────────────────────────────────────
  52. procedure setmouse(m3,m4:integer);
  53.  
  54.   Move the mouse to a location.
  55.  
  56.   m3,m4   (x,y) position (in pixels) to move the mouse.
  57. ───────────────────────────────────────────────────────────────────────────
  58. procedure getmousepresses(var m2,m3,m4:integer);
  59.  
  60.   Get the number of mouse button presses.  Since last call
  61.  
  62.     m2     number of presses.
  63.     m3,m4  Mouse (x,y) position
  64. ───────────────────────────────────────────────────────────────────────────
  65. procedure getmousereleases(var m2,m3,m4:integer);
  66.  
  67.   Get the number of mouse button releases.  Since last call
  68.  
  69.     m2     number of releases.
  70.     m3,m4  Mouse (x,y) position
  71. ───────────────────────────────────────────────────────────────────────────
  72. procedure getmousemotion(var m3,m4:integer);
  73.  
  74.    Get the mouse motion
  75.  
  76.    m3    mouse horzontal speed.  0 = not moving horzontally
  77.    m4    mouse vertical speed.  0 = not moving vertically
  78. ───────────────────────────────────────────────────────────────────────────
  79. procedure setmousecursor(m2,m3:integer; var mask);
  80.  
  81.    Set the mouse to a new shape.
  82.  
  83.    m2,m3  (x,y) offset of the mouse hot spot.
  84.    mask   64 bytes describing the mouse shape. Maximum size of a cursor is
  85.           32x32.  The first 32 bytes is a bit level mask.  The next 32 bytes
  86.           is the cursor shape.  A bit set in the mask defines transparency. A
  87.           bit set in the cursor shape defines white.
  88.  
  89. ───────────────────────────────────────────────────────────────────────────
  90. procedure setmouseratio(m3,m4:integer);
  91.  
  92.   Set the mouse movement speed.
  93.  
  94.   m3  Set the horzontal speed
  95.   m3  Set the vertical speed
  96. ───────────────────────────────────────────────────────────────────────────
  97. procedure setmouseoff(x1,y1,x2,y2:integer);
  98.  
  99.   Set a rectangular region which the mouse will not be displayed (if on)
  100.  
  101.   x1,y1  top-left position of rectangle
  102.   x2,y2  bottom-right position of rectangle
  103. ───────────────────────────────────────────────────────────────────────────
  104. procedure setmousepage(f:byte);
  105.  
  106.   Sets the visual page of the mouse. (Does not work in 320x200x256 mode)
  107. ───────────────────────────────────────────────────────────────────────────
  108. procedure cleanmouse;
  109.  
  110.   Waits until not mouse button is pressed
  111. ───────────────────────────────────────────────────────────────────────────
  112. procedure chkmouseon;
  113.  
  114.   Displays the mouse if it was turned off by the procedure MOUSEOFF
  115. ───────────────────────────────────────────────────────────────────────────
  116. procedure setdefptr;
  117.  
  118.   Sets the mouse shape to the SPX default cursor arrow
  119. ───────────────────────────────────────────────────────────────────────────
  120.