05-15-2010, 09:51 AM | #1 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
dillo2 & porting non gtk+ based programs
Hi,
as we know, DR way to manage screen refresh is handled by some modifications of the gtk+ code. Thus, porting non gtk+ based applications need to refresh screen on their own, similar to what xournal port does due to its use of a special gtk+ widget not covered by the method iRex uses. So, here am I, trying to port dillo2, a tiny but quite functional web browser. I've already compiled it successfully (btw, porting fltk2 library has been quite hard), but it's not usable because of the lack of screen refresh and the keyboard issues. A good way to solve these problems would be to develop an external library we could call from these programs, managing refresh and keyboard, or an external daemon as some hacks on Iliad used. Sadly, this is beyond my skills... is anyone tempted to help? I have the same problem with xboard, a frontend for gnuchess. I've attached a screenshot to show how beautiful dillo browsing could be |
05-16-2010, 02:02 AM | #2 |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
IMHO, porting xepdmgr to DR800 should be more feasible than adding eink-refresh code to FLTK.
In xepdmgr, "xepdmgr_einkfb.c" contains most eink-refresh control code. Some of them are iLiad-specific. I don't know if the required functions are available for DR800. |
Advert | |
|
05-16-2010, 04:07 AM | #3 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Hi Iņigo,
I only studied this part of the firmware briefly, but it seems that there are already some provisions. See: \Sources\3.0\iRex\libs\erutils\src\display_utils.c . The code is used by the keyboard app: \Sources\3.0\iRex\erkeyb\src\erkeyb-display-sched.c. The messages send by display_utils.c are handled by sysd (\Sources\3.0\iRex\sysd\src\display.c) there you can see what the effect will be from a message. |
05-16-2010, 08:05 PM | #4 | ||
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
[1] https://www.mobileread.com/forums/showthread.php?t=81119 Quote:
Code:
#include <sys/ioctl.h> #include "delta.h" int fb0fd=-1; [...] struct display_update_info duinfo; if (fb0fd < 0) fb0fd = open("/dev/fb0", O_RDWR); duinfo.waveform = 1; // 1=full, 6=quick, 9=partial duinfo.color = 0; ioctl(fb0fd, FBIO_DELTA_UPDATE_DISPLAY, &duinfo); |
||
05-17-2010, 02:36 AM | #5 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Providing a separate library is a good idea. The proposed interface is sufficient, maybe add a (library-)prefix to the commands to avoid conflict with local names in the application. |
|
Advert | |
|
05-17-2010, 07:29 AM | #6 |
ex-IRX developer
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
|
I suggest giving the code in liberutils (display_utils) a second look. It provides quite similar functionality all within the already available API of the iOn framework. I know it currently lacks documentation but Im happy to answer questions.
|
05-17-2010, 05:07 PM | #7 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
I think you mean the display_update_xxx() functions. They call send_message: Code:
static void send_message(int take_control, int waveform) but what means take_control? lock and unlock display... but with which purpose? Thanks, Iņigo |
|
05-18-2010, 03:30 AM | #8 |
ex-IRX developer
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
|
Code:
/* setup socket for display management (implicitly called by functions below) */ void display_init(); /* close socket for display management */ void display_finialize(); /* take control of display updates, stop automatic GTK+ updates */ void display_gain_control(); /* yield control, resume automatic GTK+ updates */ void display_return_control(); /* force display update and yield control */ void display_update_return_control(gint type); /* force display update and keep control */ void display_update_keep_control(gint type); /* block all display updates (both forced and automatic), expect for splash hints */ void display_splash_lock(); /* force display update to show splash screen */ void display_update_keep_splash_lock(); /* unblock display updates, resume forced/automatic updates */ void display_splash_unlock(); |
05-18-2010, 05:18 AM | #9 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Thanks for the extra information!
|
Tags |
dillo2, refresh |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is a gtk version possible? | frandavid100 | Calibre | 14 | 12-16-2008 03:09 PM |
Cybook & text-based pdfs | StephieP | Bookeen | 17 | 04-28-2008 11:50 AM |
iLiad Problems porting GTK apps | robinwatts | iRex Developer's Corner | 6 | 03-22-2008 06:19 AM |
iLiad Need help getting started with gtk | tribble | iRex Developer's Corner | 4 | 06-05-2007 12:38 PM |