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

  1. /**
  2. *
  3. * Name        mospeed -- Set mouse sensitivity.
  4. *
  5. * Synopsis    ercode = mospeed(vert,horiz);
  6. *
  7. *        int ercode      Error return code:
  8. *                    MO_OK if successful;
  9. *                    MO_ABSENT if mouse not found.
  10. *        unsigned vert      New mouse vertical sensitivity
  11. *                    (mickeys per 8 pixels).
  12. *                    Limits are 1 to 32767.
  13. *        unsigned horiz      New mouse horizontal sensitivity
  14. *                    (mickeys per 8 pixels).
  15. *                    Limits are 1 to 32767.
  16. *
  17. * Description    This function sets the mouse sensitivity, i.e., the
  18. *        speed with which the mouse cursor moves in response to
  19. *        physical mouse motion.
  20. *
  21. *        The sensitivity is expressed in terms of mickeys per
  22. *        pixel of cursor movement.  (Mickeys are units of
  23. *        physical mouse motion.    On the Microsoft mouse, one
  24. *        mickey is 0.005 inches.)  Low values correspond to
  25. *        faster cursor motion, while high values provide greater
  26. *        control over fine motion.
  27. *
  28. *        The default sensitivity when the mouse is reset is 16
  29. *        mickeys per 8 pixels vertically and 8 mickeys per 8
  30. *        pixels horizontally.
  31. *
  32. * Returns    ercode          Error return code:
  33. *                    MO_OK if successful;
  34. *                    MO_ABSENT if mouse driver not installed.
  35. *        b_mouse       Number of mouse buttons (0 if no driver).
  36. *
  37. * Version    6.00 (C)Copyright Blaise Computing Inc.  1989
  38. *
  39. **/
  40.  
  41. #include <bmouse.h>
  42.  
  43. int mospeed(vert,horiz)
  44. unsigned vert,horiz;
  45. {
  46.     DOSREG regs;
  47.  
  48.     regs.ax = 15;
  49.     regs.cx = horiz;
  50.     regs.dx = vert;
  51.     return mogate(®s,®s);
  52. }
  53.