On Tue, Oct 13, 2009 at 07:13:45PM +0200, Johannes Hofmann wrote:
Hi Stefan,
On Tue, Oct 13, 2009 at 06:48:51PM +0200, Stefan Strobl wrote:
Hello
I'm new to both dillo and fltk. I'm trying to do two things and I'm hoping you can point me in the right directions on how to do it.
1) flicker at reload When doing a reload my screen flickers and I'd like to get rid of that. I first tried the dillorc option buffered_drawing=0/1/2 but that didn't make any difference. I then tried to find the source where the screen is cleared before redrawing the page. I followed the source of redraw() until layout.cc where topLevel->draw() is executed but I cannot find its implementation.
I would recommend to start in FltkViewBase::draw(). Or maybe FltkViewport::draw() if you are interested in scrolling too.
Is the flickering an fltk issue or where is the screen cleared?
I'm not sure. It might just be that the freshly loaded page is rendered while it is not 100% loaded, which would blank the screen. Then it is drawn again after loading has completed. I would suggest to put printf()s in FltkViewBase::draw() (the actual draw) and Layout::queueResize() (which requests a complete redraw) to see what is going on. You can also use gdb an breakpoints of course. The flickering is certainly caused by dillo code and is not a general issue of fltk.
2) externally trigger reload I'd like to trigger a page reload externally by another application. I searched a bit about IPC mechanisms of fltk but didn't find any. So I'm thinking about using a UNIX fifo or the system signal SIGUSR2. Do you think this is a good approach?
If you just need to trigger a reload, SIGUSR2 might be ok. For a more general remote control fifo's or maybe stdin might be an option. You can check what other browsers do.
Ditto. I have the idea of a remote control dpi for dillo that allows to command it as necessary (think of a help browser). In this case you'd need reload and maybe the ability to send it to other pages or make it cycle or whatever. This feature needs a revision of the dillo plugin protocol (DPIP). I've been working on it for some time now, and hope to commit big changes this month. With regard to using dillo as a display for embedded devices, the idea is feasible and you'd be good testing with SIGUSR2 and reload by now. The golden idea is to use dpip to be able to update individual widgets using DOM. That would be really good. Specially if there was an interested sponsor! ;) -- Cheers Jorge.-