NX and the Nokia 770
Posted by George Wright Sun, 18 Feb 2007 04:54:00 GMT
So recently I managed to acquire a Nokia 770 internet tablet (thanks to mjg59). It’s a really nifty device – the screen on it is unparalleled (except, obviously, for the N800 – whose screen is slightly better), and it has quite a nice Linux platform on it. The problem? It runs Hildon, which is GTK-based. The input methods are heavily integrated into the GTK on the device and using any other widget toolkit just doesn’t work (well, it does, but you’re going to need a physical keyboard).
In light of this, I decided to start hacking around with GTK. Its API is not as pretty as Qt in my opinion, but it’s not too shoddy. It just takes a bit of getting used to, although the really verbose function names and endless requirement to call them really annoys me (gtk_foo_bar_baz_lala_eggs_breakfast() anyone?).
Armed with NXClientLib which I developed for my Summer of Code project last year, I decided to try and port my NX client to Hildon. In typical style, I made the architectural decision last year to write the library in C++ and link to QtCore/QtXml simply because it made my life a whole lot easier (I would dread to think how much extra code I’d need to write if I didn’t have QString). Anyway, I’m currently in the process of gluing GTK and Qt together in perfect harmony (haha) so that NX can take over the world, but it’s proving to be less trivial than I thought it would be.
Some gratuitous screenshots:
I’m afraid that’s all there is to “Maemo NX” thus far. I’ve spent most of the time trying to learn how GTK/X11 works and also thinking how best to implement the whole thing. If anyone is an expert at X window reparenting in GTK I’d be most grateful if they could take a look at this code and let me know why it doesn’t reparent the X window whose ID is specified by int wid into the GTK window I create and then make the reparented window visible. It seems to reparent fine, as the window with id wid disappears, but there’s no sign of it in the GTK window. If I can’t get this to work I’ll simply use mozplugger-helper which does a fine job of reparenting a window, but the fewer dependencies I can have the happier I’ll be.
If anyone’s interested in the code so far, it can be found in the FreeNX subversion repository at http://svn.berlios.de/viewcvs/freenx/nxclientlib/maemonx/.



Hey George,
you need to realize your window first? Take a look at the Gtk+ code and see when it actually acquires X11 resources.
Alternatively git clone http://www.linuxtogo.org/~zecke/git/olpc/sugar/.git
or look at http://www.linuxtogo.org/~zecke/git/olpc/sugar/lib/src/sugar-browser.cpp which uses the X11 Embed protocol
I was so free to post this on internettablettalk.
http://www.internettablettalk.com/forums/showthread.php?s=e98c9de37103d96dc6b4817ed67d0e76&p=35361#post35361
www.maemo.org garage.maemo.org www.internettablettalk.com
are great places to look for help.
Geroge,
“Welcome” to the world of Qt-devs-that-now-work-with-GTK, we are not that upset, it’s opensource at least ;-)
http://blog.gustavobarbieri.com.br/2006/08/09/glib-is-a-technical-disaster/
If I were you, I’d solve your problem with DBus. I don’t like DBus that much, I do think it’s overused, but it’s easier than trying to merge GTK and Qt mainloops (although it seems to be easier in lastest Qt4).
Thanks for useful maemo contribution!
If are looking for an alternative to the Hildon stuff, it a Qt 4 based platform is avaliable. Try OpieII
http://qtdeveloper.net/archives/2006/12/21/holidaze-2/
I’ve got an N800 coming to me in a week or so. I’m glad to see some KDE devs working on stuff for Maemo.
Any updates on this one? I am new to linux programming… is there anyway I can help?
Any updates on this one? I am new to linux programming… is there anyway I can help?
please, qt4 is on maemo now, any good news about develop of this ? :-)
Please, port to N900 if possible. This is one of the applications that would be great to have.
Thanks
I like your site very much.324324
I like your site very much.234324
I like your site very much.3253
I like your site very much.2353425
Freethinkers will be individuals who are able to apply its imagination without the need of bias plus without the need of fearing to learn issues that conflict utilizing their private customs, benefits, and also objectives. The following outlook will not be prevalent, nonetheless it is critical to get perfect believing; when its aside, discourse is definitely likely to develop into more intense as compared with inadequate.
Web Builder technologie vous permet toujours de construire votre site sur mesure avec tous les outils que vous pourriezdemander à un concepteur de sites Web pour, mais vous arrivez à assembler le produit final yourself
Got dette de carte de crédit? Transfert de votre dette sur une carte avec un taux d’intérêt inférieur peut sembler la solution idéale et elle peut être. Mais le secret réside dans une attention aux détails lorsque vous demandez une carte de crédit de transfert de solde
I can’t believe you weren’t fully satisfied with the new Nokia tablet. I am not a hacker but I’ve discovered features that I didn’t even know they existed. I am most pleased with mine and I can’t risk messing with it because I just don’t have the necessary programming skills.