Magellan-Events and Callbacks

Post questions, comments and feedback to our 3Dconnexion UNIX and Linux Development Team.

Moderator: Moderators

Post Reply
Camael
Posts: 9
Joined: Fri Jan 04, 2008 6:12 pm

Magellan-Events and Callbacks

Post by Camael » Sun Jan 13, 2008 3:59 pm

Hello,

I'm currently making a small app which uses the spacepilot and shall be compilable for windows and linux. What I've recognized is that both API's do not have the same power, especially, the Windows-API supports callbacks through the COM-interface. Is there any decent way for callbacks in the linux API too? Or in other words: does someone know a way to establish a 3dxware-device callback system that is toolkit-independent (means that no specific gtk2/fltk/qt-calls are needed to hook for example a timer or something like that)?

Thanks in advance,
Joachim

P.s. In my current solution the programmer has to call something like "space_pilot_check_state()" (which checks whether a callback shall be triggered) in the event loop of the used toolkit, because every toolkit seems to completely control the event loop by itself and there doesn't seem to be an independent way of putting arbitrary code into this loop (which then WOULD be something like space_pilot_check_state())

Camael
Posts: 9
Joined: Fri Jan 04, 2008 6:12 pm

Post by Camael » Tue Jan 15, 2008 11:15 am

In the meantime I've read a thread in the windows-developer forum that it might be possible to get callbacks by using the HID-api directly. Since I've no experience with this API in linux: Is something like that also possible there (without too much work)? That means that maybe one could put a callback to the device whenever the HID layer reports an update or something like that.

Thanks in Advance,
Joachim

UtaSH
Moderator
Moderator
Posts: 3034
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Re: Magellan-Events and Callbacks

Post by UtaSH » Thu Jan 17, 2008 7:02 am

Hello Camael,

we do not yet have a platform-independent toolkit. :( So you need to code at least a small portion speficially for each OS.

Of course you can address the device on HID level directly in Linux, too. But then you are not device independent. By using 3Dconnexion's driver (and SDK) you make your application work with all our supported devices and not just the one you have now (SpacePilot). Thus we do not recommend this. (And I am sure the workload is higher.)

Uta Ludwig
3Dconnexion

Post Reply