penmgr.pp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {$MACRO ON}
  2. (******************************************************************************
  3. *
  4. * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
  5. * All rights reserved.
  6. *
  7. * File: PenMgr.h
  8. *
  9. * Release: Palm OS SDK 4.0 (63220)
  10. *
  11. * Description:
  12. * Include file for Pen manager
  13. *
  14. * History:
  15. * 6/5/96 Created by Ron Marianetti
  16. *
  17. *****************************************************************************)
  18. unit penmgr;
  19. interface
  20. uses palmos, coretraps, rect, errorbase;
  21. (********************************************************************
  22. * Pen Manager Errors
  23. * the constant serErrorClass is defined in ErrorBase.h
  24. ********************************************************************)
  25. const
  26. penErrBadParam = penErrorClass or 1;
  27. penErrIgnorePoint = penErrorClass or 2;
  28. (********************************************************************
  29. * Pen manager Routines
  30. ********************************************************************)
  31. // Initializes the Pen Manager
  32. function PenOpen: Err; syscall sysTrapPenOpen;
  33. // Closes the Pen Manager and frees whatever memory it allocated
  34. function PenClose: Err; syscall sysTrapPenClose;
  35. // Put pen to sleep
  36. function PenSleep: Err; syscall sysTrapPenSleep;
  37. // Wake pen
  38. function PenWake: Err; syscall sysTrapPenWake;
  39. // Get the raw pen coordinates from the hardware.
  40. function PenGetRawPen(var penP: PointType): Err; syscall sysTrapPenGetRawPen;
  41. // Reset calibration in preparation for setting it again
  42. function PenResetCalibration: Err; syscall sysTrapPenResetCalibration;
  43. // Set calibration settings for the pen
  44. function PenCalibrate(var digTopLeftP, digBotRightP, scrTopLeftP, scrBotRightP: PointType): Err; syscall sysTrapPenCalibrate;
  45. // Scale a raw pen coordinate into screen coordinates
  46. function PenRawToScreen(var penP: PointType): Err; syscall sysTrapPenRawToScreen;
  47. // Scale a screen pen coordinate back into a raw coordinate
  48. function PenScreenToRaw(var penP: PointType): Err; syscall sysTrapPenScreenToRaw;
  49. (************************************************************
  50. * Assembly Function Prototypes
  51. *************************************************************)
  52. // _PenGetRawPen ASM_SYS_TRAP(sysTrapPenGetRawPen)
  53. implementation
  54. end.