home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / MOJUMP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  1.8 KB  |  58 lines

  1. /**
  2. *
  3. * Name        mojump -- Set mouse acceleration threshold.
  4. *
  5. * Synopsis    ercode = mojump(speed);
  6. *
  7. *        int ercode      Error return code:
  8. *                    MO_OK if successful;
  9. *                    MO_ABSENT if mouse not found.
  10. *        unsigned speed      Threshold speed (in mickeys per second)
  11. *                    for automatic acceleration of mouse
  12. *                    cursor movement.
  13. *
  14. * Description    This function allows the mouse cursor to move faster
  15. *        than normal when the mouse is moved fast.  Normally, the
  16. *        mouse cursor moves according to the rates set by
  17. *        MOSPEED.  However, when the mouse is moved faster than a
  18. *        specified speed, the cursor speed increases, making it
  19. *        easier to move the cursor across large distances.
  20. *
  21. *        Mickeys are units of physical mouse motion.  On the
  22. *        Microsoft mouse, one mickey is 0.005 inches.
  23. *
  24. *        The exact degree of acceleration depends on the mouse
  25. *        driver software.  For the Microsoft mouse, the speed
  26. *        doubles.
  27. *
  28. *        The default speed-jump threshold when the mouse is
  29. *        reset is 64 mickeys per second.  That is, if you move
  30. *        the mouse faster than 64 mickeys per second, the mouse
  31. *        cursor will begin to move faster than it normally does.
  32. *        If you move the mouse slowly, the cursor will also move
  33. *        slowly, allowing easier control over fine motion.
  34. *
  35. *        You can suppress the speed-jump effect by setting the
  36. *        threshold to a large value such as 32,767.
  37. *
  38. * Returns    ercode          Error return code:
  39. *                    MO_OK if successful;
  40. *                    MO_ABSENT if mouse driver not installed.
  41. *        b_mouse       Number of mouse buttons (0 if no driver).
  42. *
  43. * Version    6.00 (C)Copyright Blaise Computing Inc.  1989
  44. *
  45. **/
  46.  
  47. #include <bmouse.h>
  48.  
  49. int mojump(speed)
  50. unsigned speed;
  51. {
  52.     DOSREG regs;
  53.  
  54.     regs.ax = 19;
  55.     regs.dx = speed;
  56.     return mogate(®s,®s);
  57. }
  58.