summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw19700.pp
blob: 142ba08f02c85be3dd2d9b8819d7c856c0129018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ %target=darwin }
{ %norun }

{$mode objfpc}
{$modeswitch objectivec1}

program Main;
uses
    CocoaAll;

type
    TSomeView = objcclass (NSView)
        function canvasPointFromEvent (theEvent: NSEvent): NSPoint; message 'canvasPointFromEvent:';
    end;

function TSomeView.canvasPointFromEvent (theEvent: NSEvent): NSPoint;
begin
    result := convertPoint_fromView(theEvent.locationInWindow, nil);
end;

var
    argc: LongInt;
    argv: PPChar;
begin
    NSApplicationMain(argc, argv);
end.