View Single Post
Old 09-27-2008, 04:53 PM   #3
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
Souce code is included. Compile command:
Code:
gcc -o gtktextview gtktextview.c -I`pkg-config --cflags --libs gtk+-2.0`
I've started to look at it, but I've found something estrange. The source code doesn't match the executable. Is that intentional? (To avoid confusion?)

I mean, the executable has calls to liberipc that are missing in the code.

If it was intentional, I can try to add the needed calls. If it was unintentional, I prefer to modify the code you intend to use and not the vanilla version :-).

Anyway, a couple of things about porting apps to the iliad:

1. You have to set the window class to "sh" or your application will not receive kepresses (as they're are routed to the window class of the same name as the app registered in iRex's contentlister, and all apps launched from .sh files are "sh"). Look at one of the Gtk+2 apps ported by Adam as to how to do it.

2. To supress the blinking led after program launch you have to do a call to erbusy using liberipc, you have a example in the patch to libX11 http://projects.mobileread.com/iliad...0061203-2.diff

3. To stop the blinking led after any hardware button press, I don't know the correct way, but Adam has managed to do it right, so ask him

4. To handle the refreshes you have three ways at the moment:
4a. Explicit calls to liberdm (again, look at libX11 patch above as to how to do them)
4b. Using the patched libX11 (download the latest dillo from http://projects.mobileread.com/iliad..._iliad-0.7.zip and look at the launcher shell script and the files in the lib/ directory).
4c. Using xepdmgr and, if needed for your program, use calls to xepdmgrclient.[ch] to fine tune it's behaviour. It's as simple as launching your program using xepdmgr as a wrapper: ./xepdmgr ./gtktextview (see https://dev.mobileread.com/trac/xepdmgr/wiki and https://www.mobileread.com/forums/showthread.php?t=22215 for more information).

Hope that helps .

Last edited by Antartica; 09-27-2008 at 04:58 PM. Reason: sp
Antartica is offline   Reply With Quote