~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to packages/svgalib/vgamouse.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2001-08-29 23:15:17 UTC
  • Revision ID: james.westby@ubuntu.com-20010829231517-thxsp7ctuab584ia
Tags: upstream-1.0.4
ImportĀ upstreamĀ versionĀ 1.0.4

Show diffs side-by-side

added added

removed removed

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