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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: How to get the mouse position with JEWL? Date: Thu, 21 Oct 2010 19:10:37 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: J4HSNf9Eqj44wTz1J3b8lQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Xref: g2news2.google.com comp.lang.ada:15633 Date: 2010-10-21T19:10:37+00:00 List-Id: > Surely it is better to use it from win32ada than making own binding. There are several reasons: 1. The program that polled for mouse position is a console mode program, not an event driven Windows program (which of course would have watched for a WM_MOUSEMOVE event instead). The call to GetCursorPos is the only inported function it uses, so win32ada would be overkill. 2. The win32ada I have is dated 2002. Much of my Windows code predates that (it uses CLAW) so I never started using win32ada. 3. My copy of win32.ads declares subtype PVOID is System.Address; System.Address is not the same as an access value to my preferred Ada compiler. 4. I also note that my copy of win32-windef.ads says, in the private part, pragma Convention(C_Pass_By_Copy, POINT); which would of course make Jeffrey Carter's suggestion fail. The possibility of surprises like that makes me leary.