7 messages in net.java.dev.jna.usersRe: [jna-users] callback at mouse event
FromSent OnAttachments
Michele CrociOct 23, 2007 1:45 am 
Timothy WallOct 23, 2007 5:41 am 
Michele CrociOct 29, 2007 9:40 am 
Timothy WallOct 29, 2007 12:01 pm 
Daniel KaufmannOct 29, 2007 6:38 pm 
Timothy WallOct 30, 2007 12:54 pm 
Daniel KaufmannOct 30, 2007 6:16 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] callback at mouse eventActions...
From:Michele Croci (mcr@gmail.com)
Date:Oct 29, 2007 9:40:03 am
List:net.java.dev.jna.users

Hi Timothy,

thx for your answer. I want to capture mouse events (also) outside a java window but I don't want to continuously poll the mouse asking if the user is doing something with it. I want do things in such a way that when there is one mouse event a Java-method is callled. Is this possible using JNA? I don't want to know how (event if I would like to know it ;) but only IF it is possible or not.

Thank you again.

-- Michele

2007/10/23, Timothy Wall <twal@dev.java.net>:

Is looking for mouse motion your high-level goal? If so, why? Are you really looking for something else, like user inactivity? Or do you need mouse motion in the absence of any Java windows? The answers to these questions will affect what bits of the native platform you need to hook into.

In general, when accessing native functionality, you need to do the following:

1) find an example written in C on the platform you want to make this work on 2) write JNA interfaces for the native bits you need to access 3) write client code and tests using a dummy implementation of the interface that behaves the way your tests expect it to behave 4) replace the dummy implementation with a Native.loadLibrary, and re- run your tests

On Oct 23, 2007, at 4:45 AM, Michele Croci wrote:

Hi all,

I have to write an application that uses jna and does a callback to a java-method when a mouse motion event happen. Is there a similar example? I have no idea how I can achieve my goal...

thx a lot!