On Tue, Feb 02, 2010 at 09:31:51AM +0100, Rainer Klier wrote: > hi, > > Am Dienstag, den 02.02.2010, 10:22 +1000 schrieb Peter Hutterer: > > On Mon, Feb 01, 2010 at 09:27:34AM +0100, Rainer Klier wrote: > > > > is there a howto oder wiki or anything like this? > > > > generally, any input device features that go past x/y and buttons need to be > > accessed through the X Input extension API. Start with XListInputDevices and > > go from there. There's nothing specific to wacom about this API, it's > > generic for all devices. > > ok, but i really don't need the x-features. > i dont want the tablet act like a mouse. > at least i don't care about working as a mouse. > my scernario whould be: > 1. user runs his computer normally > 2. user plugs in the tablet > 3. user starts my signing-application > 4. user uses normally his mouse to work with my signing-application > 5. but when he reaches the point of signing he takes tha tablet and > "writes" his signature on the tablet. the software catches the > signature-data and incorporates it into the document which was signed. > > so i don't need the tablet to work as a mouse. > i need it as signing-pad only.
right. From an X point-of-view, you can use XI2 to wait for an event coming from the tablet and then parsing the data into the signature. If you grab the tablet device directly once it's pressed, you "detach" it temporarily and thus make sure the data only goes to your app. Once you ungrab the device, it continues to work normally. for a java app this is more tricky, I have no idea if there are decent xlib bindings for java and if so they certainly won't exit for XI2 yet. So I don't think that's a way to go for you. > > Xlib programming anyway. If you're using a toolkit such as GTK or Qt, you > > need to look into the specific ways how they deal with input devices. > > my application is java-based. > i already habe an api to deal with the tablet-data to get them into the > java-application. > all i need is a c-language-layer which gets the data from the tablet and > talks to the java-coda via JNI. look at wacdump, it's a simple kernel debugging tool that dumps the data from the kernel device. That may be enough for the base. however, accessing the kernel device is tricky since the wacom X driver issues an EVIOCGRAB on the kernel device. so while the driver is loaded, no other application will receive data from the kernel device. if you make sure the X driver isn't loaded, you'll be fine. since this is a rather specific use-case where the tablet isn't needed in the desktop itself, I'd say accessing the kernel for data would be enough. If you want the tablet to work with the desktop too, I can't recommend going the kernel way. Cheers, Peter ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
