source: branches/Independent/Devices/Mouse.pas

Last change on this file was 68, checked in by chronos, 11 days ago
  • Added: Mouse API support.
File size: 514 bytes
Line 
1unit Mouse;
2
3interface
4
5uses
6 Classes, SysUtils;
7
8type
9 TGetPositionEvent = function : TPoint of object;
10
11 { TMouse }
12
13 TMouse = class
14 private
15 FOnGetPosition: TGetPositionEvent;
16 public
17 function GetPosition: TPoint;
18 published
19 property OnGetPosition: TGetPositionEvent read FOnGetPosition write FOnGetPosition;
20 end;
21
22implementation
23
24{ TMouse }
25
26function TMouse.GetPosition: TPoint;
27begin
28 if Assigned(FOnGetPosition) then Result := FOnGetPosition
29 else Result := Point(0, 0);
30end;
31
32end.
33
Note: See TracBrowser for help on using the repository browser.