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!