Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2009, 01:21 PM   #91
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Well, it seems that "PANGO_MATRIX_INIT" is a special case that lgob does not recognize. It's neither one of the members or one of the Constants.
ericshliao is offline   Reply With Quote
Old 10-31-2009, 04:46 PM   #92
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 710
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
File browser PoC: 2 options

Hi,

here there is a proof of concept of the File Browser I'm working on to be included in Iliad Toolbox.

There is a lot of work yet, but I'm asking for some feedback now because I'm considering two opposite ways.

- one uses a flat treeview
. To enter into a directory, click in the filename or type columns for the proper row.


- the other uses a treeview.
. Clicking on a directory, you select it and expand or collapse it, depending on its previous state.
. To enter into a directory (and it will also be the new root for the treeview), select it and click on the "jump to" button on the top-right.
. For performance reasons, there are only 3 levels of children shown by default. It's an option configured inside the code. If we don't limit it think what would happen when navigating to the '/' of the device, the treeview would contain all the files on the system... too slow.


In both cases, you can go a directory up (or more) clicking on the "path" label (left to "jump to" button").
F.e., if it contains "/media/card/books/computers/ai", you could click on "/media/card/" to go there or on "/media/card/books/computers/", etc.
It's a pretty effect, you can see it completely running the program on your computer to see the hover effect (edit the initial PATH before executing) that can't be fully appreciated on the Iliad.

One of the current problems is that is quiet difficult to press '/' on that path to go the root of your Iliad.


Please note that the selection toggle in last column is not handled correctly by now.


To test both, move the files to the Iliad and run from a terminal with proper DISPLAY setting:
Code:
$ lua treeview.lua | path/to/xx -p

Well, too much talk by now... which one do you prefer? which one is more usable?

Iņigo
Attached Thumbnails
Click image for larger version

Name:	fb-tv-ss.png
Views:	100
Size:	121.3 KB
ID:	38359   Click image for larger version

Name:	fb-ss.png
Views:	94
Size:	43.2 KB
ID:	38360  
Attached Files
File Type: gz fs.tar.gz (4.7 KB, 68 views)
Iņigo is offline   Reply With Quote
 
Enthusiast
Old 11-01-2009, 01:51 AM   #93
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Iņigo View Post
which one do you prefer? which one is more usable?
Iņigo
Haven't tried it, but I personally prefer flat view.
ericshliao is offline   Reply With Quote
Old 11-02-2009, 12:21 AM   #94
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,956
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Wink SPAM

Quote:
Originally Posted by hansel View Post
This is becoming a top thread: 6th if you sort by nr of replies
It even beats the battery hack thread
A very talkative threesome as can be seen... Click image for larger version

Name:	Posters.jpg
Views:	120
Size:	41.8 KB
ID:	38436
Keep up the chatter; I'd love to jump in when I'm up-to-speed!
nrapallo is offline   Reply With Quote
Old 11-02-2009, 03:59 AM   #95
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Installer for Lua/Lgob/xx

Iņigo,

I can make an installer for Lua/Lgob/xx if you want, but I think I will include Lua/Lgob/xx in apps I make: its small enough (750K), It's easier for users (they don't have to install 2 packages), and you are sure that they use a recent version.

It's no problem if a user already has it installed. And ipkg will not downgrade it if sombody tries to install an older version.

Do you still want a dedicated installer?
hansel is offline   Reply With Quote
Old 11-02-2009, 04:00 AM   #96
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 710
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by nrapallo View Post
A very talkative threesome as can be seen... Attachment 38436
Keep up the chatter; I'd love to jump in when I'm up-to-speed!
ouchhh... almost half of my posts in mobileread were written for this thread!
Iņigo is offline   Reply With Quote
Old 11-02-2009, 04:02 AM   #97
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by nrapallo View Post
Keep up the chatter; I'd love to jump in when I'm up-to-speed!
Welcome! Please get up to speed and jump in!
hansel is offline   Reply With Quote
Old 11-02-2009, 04:13 AM   #98
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
tolua++

Quote:
Originally Posted by ericshliao View Post
There seems a convenient utility: toLua (http://www.tecgraf.puc-rio.br/~celes/tolua/). But I can't build it on my Linux desktop.
Do you mean tolua++? If not: its better use that. It is better maintained and has good support for C++. I'm using it with success and pleasure.

http://www.codenix.com/~tolua/

A copy of the version I use, and as small script to build it on linux without scons (an overkill if you ask me) can be found at
https://dev.mobileread.com/svn/luail...tools/tolua++/
hansel is offline   Reply With Quote
Old 11-03-2009, 04:00 AM   #99
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
Do you mean tolua++? If not: its better use that. It is better maintained and has good support for C++. I'm using it with success and pleasure.

http://www.codenix.com/~tolua/
It seems that tolua++ is a fork of tolua.
What is the use case of of tolua (or tolua++)? I don't understand. Suppose I have some lib written in C, then can I use tolua to generate lua binding for the lib?

I want to use libxml2 with lua, and currently I only found lua binding for the part of xmlreader of libxml2 (http://asbradbury.org/projects/lua-xmlreader/). I need xmltree part. Can I use tolua to generate lua binding automatically?

Last edited by ericshliao; 11-03-2009 at 04:03 AM.
ericshliao is offline   Reply With Quote
Old 11-03-2009, 05:33 AM   #100
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
It seems that tolua++ is a fork of tolua.
What is the use case of of tolua (or tolua++)? I don't understand. Suppose I have some lib written in C, then can I use tolua to generate lua binding for the lib?
Yes and no . Basically you have to
  1. write a file that decribes the functions you wand to be available in Lua (this looks very much like a C include file)
  2. use tolua++ to generate C file (this handles the interface betwwen C and Lua)
  3. compile and link this C file (+ your own code if you want) to a Lua module (a .so file).
This is easy for simple C libraries, and quite some work for C++ libs with lots of classes and types. If you google around, you will find some examples.
If I have some spare time (and no projects that are more fun ) I wil use tolua++ to do a Lua binding for some Iliad libraries...


Quote:
Originally Posted by ericshliao View Post
I want to use libxml2 with lua, and currently I only found lua binding for the part of xmlreader of libxml2 (http://asbradbury.org/projects/lua-xmlreader/). I need xmltree part. Can I use tolua to generate lua binding automatically?
Any interesting project in the pipeline? Depending on your needs, you might:
Have fun!

Last edited by hansel; 11-03-2009 at 05:48 AM.
hansel is offline   Reply With Quote
Old 11-03-2009, 05:50 AM   #101
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
Any interesting project in the pipeline? Depending on your needs, you might:
Have fun!
Thanx for the detailed reply.
I am trying and learning to expand lua-xmlreader. As to expat, I never understand the way it works. At least, I can understand the xmltree part of libxml2, so I choose libxml2.
What I want to do is to parse some xml file using docbook DTD, draw the contents (using different styles for different tags), and traverse the xmltree. Currently, I only find libxml2 provides me such functions.
ericshliao is offline   Reply With Quote
Old 11-03-2009, 06:36 AM   #102
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
As to expat, I never understand the way it works.
Expat is easy to use: you define callbacks for the things you are interested in (tags, attributes), and expat calls those while traversing the file. Typically you remember some state in the calbacks (to know where you are in the document). You might even render the document while reading it (which is much more effective if you process large docs: no need to store everything in memory).

Lua Expat also has a simple DOM called LOM (Lua Object Model). This may very well be what you are looking for. See http://www.keplerproject.org/luaexpat/lom.html for an example.

Besides that, Expat is very fast, quite small, and already avalable on the Iliad...

Edit: I just checked that libxml2 (the so file, not a Lua binding) is also available on a standard Iliad: /usr/lib/libxml2.so.2.6.26. See http://www.hpelbers.org/iliad/list_of_libraries

Last edited by hansel; 11-03-2009 at 06:41 AM.
hansel is offline   Reply With Quote
Old 11-03-2009, 11:37 AM   #103
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
Lua Expat also has a simple DOM called LOM (Lua Object Model). This may very well be what you are looking for. See http://www.keplerproject.org/luaexpat/lom.html for an example.
Thanx. Just tried it. Lua-expat can fill my needs.
ericshliao is offline   Reply With Quote
Old 11-07-2009, 02:23 AM   #104
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Update: lgob-iliad-0.1.9.ipk

Hi,

I just upgraded the package for Lgob: the Lua binding for GTK+, Glib, GDK and Pango. This version has (probably) less bugs and more features Thanks again to Lucas Hermann Negri for this great Lua binding!

The new version can be downloaded here: https://dev.mobileread.com/dist/hans...liad-0.1.9.ipk. This version is based on the sources at http://downloads.tuxfamily.org/oproj...9.11.1.tar.bz2



Tip: I just discovered that I could browse all gtk, gdk, glib, etc docs with devhelp. It is all nicely indexed and cross-referenced. Much easier and quicker than the on-line docs. On Ubuntu devhelp can be installed with synaptic. I don't know how I got the docs themselves... probably came with the dev packages I installed?

Last edited by hansel; 11-07-2009 at 02:26 AM.
hansel is offline   Reply With Quote
Old 11-07-2009, 04:52 AM   #105
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Thanx. Just tried the 0.1.9 package. Working fine on my iLiad.
I also installed devhelp. I didn't know it until you mentioned. Quite convenient.
ericshliao is offline   Reply With Quote
Reply

Tags
gtk+, iliad, lgob, lua, networking, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pandigital announce the black Novel Nate the great News 0 08-18-2010 05:21 PM
iLiad China iLiad users can get developer package. ericshliao iRex Developer's Corner 35 03-20-2010 05:21 AM
iLiad Announce: Glade4Lua, develop graphical apps for the Iliad hansel iRex Developer's Corner 1 10-27-2009 05:00 PM
Sony to announce colour e-book ? markiehill News 11 08-22-2009 12:45 PM
Proud to announce our new moderator! Alexander Turcic Announcements 5 12-08-2003 11:18 PM


All times are GMT -4. The time now is 07:35 AM.


MobileRead.com is a privately owned, operated and funded community.