From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be6e28f854440947 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How to get the mouse position with JEWL? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Thu, 21 Oct 2010 09:31:50 +0200 Message-ID: NNTP-Posting-Date: 21 Oct 2010 09:31:48 CEST NNTP-Posting-Host: b966f8d3.newsspool4.arcor-online.net X-Trace: DXC=0cgDonbb@_5NTD55K=4IUK7enW;^6ZC`4\`mfM[68DC3K4Q_UBoKag; X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:15614 Date: 2010-10-21T09:31:48+02:00 List-Id: On Wed, 20 Oct 2010 22:51:00 +0000 (UTC), tmoran@acm.org wrote: > This works for me for Windows > type Points is record > x,y : interfaces.c.int; > end record; > type bool is new interfaces.c.int; > function GetCursorPos(point : access points) return bool; > pragma import(stdcall,GetCursorPos, "GetCursorPos"); > current : aliased points; > ... > if getcursorpos(current'access) = 0 then > -- current now has mouse position > else -- Windows error Surely it is better to use it from win32ada than making own binding. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de