GSoC first week
chris.young at unsatisfactorysoftware.co.uk
Sat Jun 13 18:30:18 BST 2009
On Mon, 8 Jun 2009 02:18:14 +0200, Pawe³ Blokus wrote:
> > At the end of the week I would like to have done the following things:
> > - the treeview history working on any platform
> > - platform dependent code from tree view reduced to a minimum
> > - sorting option for a tree node
> Although I have managed to realise this points (almost) completely it
> took me much more time than intended. One reason for this was that, at
> some points, I had to go into riscos code details more than I expected
> and spent some time on getting it better to know.
I looked at your select widget corewidgets code some time back and
forgot to comment, but this could affect some of your code structure
and your other corewidgets.
In my (Amiga) port I set everything up to write to an off-screen
bitmap, and then transfer that to the visible display. With NetSurf
as-is, you call content_redraw (or history_redraw) from a
platform-specific function, which allows any setup required before
drawing, and any other activity after drawing, to be performed.
In your code, the plotter functions are being called without the
platform code getting any warning, or knowing when it is finished. In
my port, that means the select menu never displays, which obviously
isn't what we want and isn't trivial to fix without modifying the
I would suggest to add a couple of platform-specific functions,
gui_redraw_start(struct gui_window *g)
gui_redraw_end(struct gui_window *g)
which "top and tail" any internal redraws and allow the platform code
to do whatever is required, or a NOP.
I don't know how vital this is to other ports, but at a guess the
plotter code would at least need to know which window it is supposed
to be rendering to.
In my case I need something like this executed after the plotter
functions have finished:
struct IBox *bbox;
(although really it should be limited to the area that has actually
been drawn over)
and nothing beforehand. You'll need to check the normal redraw code
for other platforms to see if they have any particular requirements.
More information about the netsurf-dev