Basic Info - Getting Started

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

Moderator: Moderators

Post Reply
gertius
Posts: 5
Joined: Fri Jan 18, 2008 6:10 am

Basic Info - Getting Started

Post by gertius »

Hello,
I
crobl
Moderator
Moderator
Posts: 138
Joined: Mon Feb 26, 2007 8:34 am
Location: Freiham, Germany

Post by crobl »

Hi Christian,

the easiest thing to start with would probably be the xapp.c example provided with the SDK. Its a very basic X11 application, that opens a little window, tells the driver that it wants to receive data from opur driver, processes the incoming events and prints the device data.

If you have/want to use a toolkit like QT, GTK or else, things may get a bit more complicated, but will also work.

What kind of software will it be? Will it be a X11/Motif application or do you plan to use a modern toolkit like QT or GTK?

Regards,

Christian Robl
3Dconnexion
gertius
Posts: 5
Joined: Fri Jan 18, 2008 6:10 am

Post by gertius »

Hi again,
I have now read through the docs you sent, succesfully compiled the xapp.c and built it into my existing project.
The project I
Absum
Posts: 53
Joined: Tue Apr 24, 2007 4:00 am
Location: Sweden
Contact:

Post by Absum »

You need a x11 window for receiving events... even if its a invisible window. And if your using QT it has a X11 window as a base. Just figure out how to get it.
crobl
Moderator
Moderator
Posts: 138
Joined: Mon Feb 26, 2007 8:34 am
Location: Freiham, Germany

Post by crobl »

Hi gertius,

just like Absum says :) you always need a X11 window, which you have with your QMainQWindow basing on X11.

Since you are using QT it should be possible to do a MagellanSetWindow() with your QMainWindow's id (I'm sorry I haven't tried with Qt yet). You should then receive events in your Qt event loop, which you'll have to process like in xapp.c or the like.
This will save you this extra window solution you've now.

Maybe this thread can give you a bit of an idea, although I assume its probably not what you're looking for.

Please let me know how things are developing or if I can you help any further!


Regards,

Christian
Post Reply