Legacy X applications

Questions and answers about 3Dconnexion devices on macOS.

Moderator: Moderators

Post Reply
blaise
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am

Legacy X applications

Post by blaise »

Hi,

Is there an easy way to emulate the behavior of the old unix driver and send Xevents? I am running CEI ensight on a mac, which is an X11 application.

Blaise
znissan
User
User
Posts: 191
Joined: Tue Nov 28, 2006 12:32 pm
Location: San Jose, CA
Contact:

Post by znissan »

Hello blaise:

You bring up a very interesting topic. We'll have a look at that -- I can't commit to a specific schedule today, but we will evaluate.

Feel free to check back here and/or post again on this or other matters.

Thanks,

Ziva Nissan
3Dconnexion, Inc.
blaise
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am

Post by blaise »

Hi Ziva,

I have been putting a bit more thought into that, and poking around a litle bit.

Using the code in the other threads, I have been able to recover the axis and rotation informations from my spacenavigator.

CEI tell me that they incorporated the sample X11 code from the UNIX SDK, nd that they are just listening to X11 events. Looking at xapp.c and xdrvlib.c from the SDK, it seems to me that all that is to be done is
- Create the atoms MagellanMotionEvent, MagellanButtonPressEvent, MagellanReleaseEvent and MagellanCommandEvent
- in the messageHandlerProc, convert the msg->axis and msg->buttons into MagellanMotionEvent etc, then use XSendEvent

I don't know much about mac or X11 programming. I am a Fortran/Fortran90 scientific computing person, so there is a chance that all I am saying is just nonsensical junk....

Am I completely missing the point?

Blaise
flomotan
Moderator
Moderator
Posts: 287
Joined: Mon Jan 08, 2007 3:37 pm

Post by flomotan »

Your concept on how to possibly add support is correct. Basically you need to create a proxy that will take SpaceNavigator data and forward that to your X11 application.

I've not actually tried doing this so I can't guarantee success but it's how I would proceed.
classen
Posts: 3
Joined: Mon Aug 20, 2012 12:08 pm

Re: Legacy X applications

Post by classen »

I'm bringing this thread back from the dead.

ANy one get their 3DConnexion device talking to X11 or XQuartz?
blaise
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am

Re: Legacy X applications

Post by blaise »

I wrote such a proxy a while ago. It was my first experience coding with Xcode, writing a cocoa application, and writing an X11 application, so the code is a bit ugly, but it worked well enough for me and for CEI to bundle it with ensight. You can download the Xcode project here: https://www.math.lsu.edu/~bourdin/Files ... nProxy.tgz

Blaise
Post Reply