mouse.pp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2006 Karoly Balogh
  4. member of the Free Pascal development team
  5. Mouse unit for Amiga/MorphOS
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit Mouse;
  13. interface
  14. {$i mouseh.inc}
  15. implementation
  16. {$i mouse.inc}
  17. function SysDetectMouse:byte;
  18. var
  19. num : dword;
  20. begin
  21. // Under Amiga/MorphOS, mouse is always there, and it's unable to easily
  22. // detect number of buttons. So lets report 3, which is common nowadays. (KB)
  23. SysDetectMouse:=3;
  24. end;
  25. const
  26. SysMouseDriver : TMouseDriver = (
  27. UseDefaultQueue : True;
  28. InitDriver : Nil;
  29. DoneDriver : Nil;
  30. DetectMouse : @SysDetectMouse;
  31. ShowMouse : Nil;
  32. HideMouse : Nil;
  33. GetMouseX : Nil;
  34. GetMouseY : Nil;
  35. GetMouseButtons : Nil;
  36. SetMouseXY : Nil;
  37. GetMouseEvent : Nil;
  38. PollMouseEvent : Nil;
  39. PutMouseEvent : Nil;
  40. );
  41. begin
  42. SetMouseDriver(SysMouseDriver);
  43. end.