vgamouse.pp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. unit vgamouse;
  2. interface
  3. {$linklib vga}
  4. {$linklib c}
  5. Type
  6. PLongint = ^Longint;
  7. const
  8. MOUSE_MICROSOFT = 0;
  9. MOUSE_MOUSESYSTEMS = 1;
  10. MOUSE_MMSERIES = 2;
  11. MOUSE_LOGITECH = 3;
  12. MOUSE_BUSMOUSE = 4;
  13. MOUSE_PS2 = 5;
  14. MOUSE_LOGIMAN = 6;
  15. MOUSE_GPM = 7;
  16. MOUSE_SPACEBALL = 8;
  17. MOUSE_ORIENTATION_VERTICAL = 0;
  18. MOUSE_ORIENTATION_HORIZONTAL = 1;
  19. MOUSE_CHG_DTR = $80000000;
  20. MOUSE_DTR_HIGH = $40000000;
  21. MOUSE_CHG_RTS = $20000000;
  22. MOUSE_RTS_HIGH = $10000000;
  23. MOUSE_TYPE_MASK = $ffff;
  24. MOUSE_LEFTBUTTON = 4;
  25. MOUSE_MIDDLEBUTTON = 2;
  26. MOUSE_RIGHTBUTTON = 1;
  27. MOUSE_FOURTHBUTTON = 8;
  28. MOUSE_FIFTHBUTTON = 16;
  29. MOUSE_SIXTHBUTTON = 32;
  30. MOUSE_RESETBUTTON = 64;
  31. MOUSE_XDIM = 1;
  32. MOUSE_YDIM = 2;
  33. MOUSE_ZDIM = 4;
  34. MOUSE_RXDIM = 8;
  35. MOUSE_RYDIM = 16;
  36. MOUSE_RZDIM = 32;
  37. MOUSE_2DIM = 3;
  38. MOUSE_3DIM = 7;
  39. MOUSE_6DIM = 63;
  40. MOUSE_DEFAULTSAMPLERATE = 150;
  41. function mouse_init(dev:pchar; thetype:longint; samplerate:longint):longint;cdecl;
  42. function mouse_init_return_fd(dev:pchar; thetype:longint; samplerate:longint):longint;cdecl;
  43. type
  44. __mouse_handler = procedure (button:longint; dx:longint; dy:longint; dz:longint; drx:longint;
  45. dry:longint; drz:longint);CDECL;
  46. procedure mouse_seteventhandler(handler:__mouse_handler);cdecl;
  47. procedure mouse_close;cdecl;
  48. function mouse_update:longint;cdecl;
  49. procedure mouse_waitforupdate;cdecl;
  50. const
  51. MOUSE_NOWRAP = 0;
  52. MOUSE_WRAPX = 1;
  53. MOUSE_WRAPY = 2;
  54. MOUSE_WRAPZ = 4;
  55. MOUSE_WRAPRX = 8;
  56. MOUSE_WRAPRY = 16;
  57. MOUSE_WRAPRZ = 32;
  58. MOUSE_WRAP = 63;
  59. MOUSE_ROT_COORDS = 196;
  60. MOUSE_ROT_INFINITESIMAL = 0;
  61. MOUSE_ROT_RX_RY_RZ = 64;
  62. MOUSE_ROT_ZXZ = 128;
  63. MOUSE_ROT_YPR = 196;
  64. procedure mouse_setdefaulteventhandler;cdecl;
  65. procedure mouse_setposition(x:longint; y:longint);cdecl;
  66. procedure mouse_setposition_6d(x:longint; y:longint; z:longint; rx:longint; ry:longint;
  67. rz:longint; dim_mask:longint);cdecl;
  68. procedure mouse_setxrange(x1:longint; x2:longint);cdecl;
  69. procedure mouse_setyrange(y1:longint; y2:longint);cdecl;
  70. procedure mouse_setrange_6d(x1:longint; x2:longint; y1:longint; y2:longint; z1:longint;
  71. z2:longint; rx1:longint; rx2:longint; ry1:longint; ry2:longint;
  72. rz1:longint; rz2:longint; dim_mask:longint);cdecl;
  73. procedure mouse_setscale(s:longint);cdecl;
  74. procedure mouse_setwrap(w:longint);cdecl;
  75. function mouse_getx:longint;cdecl;
  76. function mouse_gety:longint;cdecl;
  77. procedure mouse_getposition_6d(x:plongint; y:plongint; z:plongint; rx:plongint; ry:plongint;
  78. rz:plongint);cdecl;
  79. function mouse_getbutton:longint;cdecl;
  80. implementation
  81. function mouse_init(dev:pchar; thetype:longint; samplerate:longint):longint;CDECL; external;
  82. function mouse_init_return_fd(dev:pchar; thetype:longint; samplerate:longint):longint;CDECL; external;
  83. procedure mouse_seteventhandler(handler:__mouse_handler);CDECL; external;
  84. procedure mouse_close;CDECL; external;
  85. function mouse_update:longint;CDECL; external;
  86. procedure mouse_waitforupdate;CDECL; external;
  87. procedure mouse_setdefaulteventhandler;CDECL; external;
  88. procedure mouse_setposition(x:longint; y:longint);CDECL; external;
  89. procedure mouse_setposition_6d(x:longint; y:longint; z:longint; rx:longint; ry:longint;
  90. rz:longint; dim_mask:longint);CDECL; external;
  91. procedure mouse_setxrange(x1:longint; x2:longint);CDECL; external;
  92. procedure mouse_setyrange(y1:longint; y2:longint);CDECL; external;
  93. procedure mouse_setrange_6d(x1:longint; x2:longint; y1:longint; y2:longint; z1:longint;
  94. z2:longint; rx1:longint; rx2:longint; ry1:longint; ry2:longint;
  95. rz1:longint; rz2:longint; dim_mask:longint);CDECL; external;
  96. procedure mouse_setscale(s:longint);CDECL; external;
  97. procedure mouse_setwrap(w:longint);CDECL; external;
  98. function mouse_getx:longint;CDECL; external;
  99. function mouse_gety:longint;CDECL; external;
  100. procedure mouse_getposition_6d(x:plongint; y:plongint; z:plongint; rx:plongint; ry:plongint;
  101. rz:plongint);CDECL; external;
  102. function mouse_getbutton:longint;CDECL; external;
  103. end.
  104. $Log$
  105. Revision 1.2 2000-07-13 11:33:31 michael
  106. + removed logs
  107. }