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
Legacy X applications
Moderator: Moderators
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
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
Re: Legacy X applications
I'm bringing this thread back from the dead.
ANy one get their 3DConnexion device talking to X11 or XQuartz?
ANy one get their 3DConnexion device talking to X11 or XQuartz?
Re: Legacy X applications
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