Legacy X applications

Questions and answers about the SpaceNavigator 3D Mouse on Mac OS X

Moderator: Moderators

Legacy X applications

Postby blaise » Wed Jan 17, 2007 10:03 am

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
blaise
 
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am

Postby znissan » Thu Jan 18, 2007 1:52 am

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.
znissan
User
User
 
Posts: 191
Joined: Tue Nov 28, 2006 12:32 pm
Location: San Jose, CA

Postby blaise » Thu Feb 01, 2007 4:23 pm

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
blaise
 
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am

Postby flomotan » Thu Feb 01, 2007 5:26 pm

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.
flomotan
Moderator
Moderator
 
Posts: 287
Joined: Mon Jan 08, 2007 3:37 pm

Re: Legacy X applications

Postby classen » Mon Aug 20, 2012 12:23 pm

I'm bringing this thread back from the dead.

ANy one get their 3DConnexion device talking to X11 or XQuartz?
classen
 
Posts: 3
Joined: Mon Aug 20, 2012 12:08 pm

Re: Legacy X applications

Postby blaise » Mon Aug 20, 2012 1:02 pm

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
blaise
 
Posts: 4
Joined: Wed Jan 17, 2007 9:43 am


Return to Mac OS X Discussion Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron