Saturday, 17 May 2014

Amiga window data structures

I have been looking at stopping the Amiga front end from #including
desktop/browser_private.h, like I did for the Windows front end earlier
this week.

The big problem with the Amiga code at the moment is that the tabs
implementation seems to depend on being able to dereference struct
browser_window (bw), to get to the struct gui_window (gw).

So, for example, to set the Amiga front end's scroll offset for the
window, it starts with a struct gui_window_2 (gw2), which I assume is the
main window containing all the tabs, then it goes to the bw (representing
current tab?), then the gw:

gw2->bw->gw->scroll_y

The gui management of tabs should not depend on core data structures.

I suggest that the gw2 be changed to have a pointer to a gw representing
the current tab, and add a pointer to bw entry in the gw. So to get the
scroll_y it would be:

gw2->gw->scroll_y

And to use the core browser_window_* functions, you'd be passing the bw
from:

gw2->gw->bw

Does that seem doable Chris?

--

Michael Drake (tlsa) http://www.netsurf-browser.org/

No comments:

Post a Comment