Skip to content
Géry Casiez edited this page Feb 13, 2017 · 4 revisions

Setup

In order to use Java bindings, one needs to include libpointing.jar into the project and indicate the native libpointing-library.

Eclipse example for Mac OS X

  1. Please install libpointing
  2. Open Eclipse and create a new Java project

New Java project
3. Click next, choose *Libraries*-tab and click *Add external JARs*
Add external JARs
4. Select libpointing.jar and click Finish
5. Goto Run->Run Configurations, select *Arguments*-tab and write `-Djava.library.path=/path/to/native/pointing/library/` into VM arguments. VM arguments

Syntax

To create objects with URIs, constructors are used. Example:

PointingDevice input = new PointingDevice("any:?debugLevel=1");
DisplayDevice output = new DisplayDevice("any:");
TransferFunction func = new TransferFunction("system:", input, output);

In order to obtain raw HID data from a PointingDevice inherit from PointingDeviceListener, implement callback method and then add an object of this listener to PointingDevice.

Please find some examples here.