Since there's been some discussion over in the ROOL forums about the RISC OS
front-end, it might be useful to provide some kind of overview of how it's
structured.
Remember that the RISC OS front-end is a work in progress: there's been a
lot of restructuring done to tidy things up, but there's a lot still to do.
Some parts have had copious amounts of sticky-tape applied to keep them
working while bits around them have been updated.
This is really only scratching the surface. If (when) there are any
questions, please ask: this list is probably the best place, but it might
take a couple of days for me to reply if I'm busy.
Anyway, here goes... I've found the handy guide that JMB gave me back in
2009
http://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/2009-August/001472.html
and updated it to reflect where things are at present.
In the NetSurf source, the RISC OS front-end lives in netsurf/riscos/. At
present, the files in there look something like this:
> -rw-rw-r-- 1 steve steve 6399 Mar 2 19:56 401login.c
HTTP authentication dialogue.
> -rw-r--r-- 1 steve steve 1183 Feb 24 2013 assert.c
Implementation of a custom assertion function that opens the log file in
a text editor.
> -rw-rw-r-- 1 steve steve 13658 Mar 2 19:56 bitmap.c
> -rw-r--r-- 1 steve steve 1211 Oct 3 2013 bitmap.h
Representation of a bitmap image. Will be plotted with Tinct.
> -rw-r--r-- 1 steve steve 7575 Jun 9 2014 buffer.c
> -rw-r--r-- 1 steve steve965 Feb 24 2013 buffer.h
Redraw buffering (redirects to a sprite, then blits the sprite)
> drwx-- 2 steve steve 4096 Mar 2 19:56 configure
Directory containing implementation of configuration dialogues. I'll
return to this later.
> -rw-r--r-- 1 steve steve 11812 Jun 9 2014 configure.c
> -rw-r--r-- 1 steve steve996 Oct 3 2013 configure.h
Implementation of the main configuration filer-like window.
> drwx-- 2 steve steve 4096 Jun 9 2014 content-handlers
Handlers for different types of page content (drawfile, sprite, ArtWorks).
> -rw-r--r-- 1 steve steve 10165 Jun 9 2014 cookies.c
> -rw-r--r-- 1 steve steve 1173 Oct 3 2013 cookies.h
RISC OS wrapper around the core's cookie viewer.
> -rw-rw-r-- 1 steve steve 22213 Mar 2 19:56 dialog.c
> -rw-r--r-- 1 steve steve 1993 Jun 9 2014 dialog.h
Implementation of generic dialogue boxes. Also includes a bunch of other
UI stuff that probably shouldn't be in here.
> drwx-- 5 steve steve 4096 Mar 2 19:56 distribution
The files that go into a download archive alongside !NetSurf itself.
> -rw-rw-r-- 1 steve steve 44555 Mar 2 19:56 download.c
Download window implementation.
> -rw-r--r-- 1 steve steve 9011 Jun 9 2014 filetype.c
> -rw-rw-r-- 1 steve steve 3268 Mar 2 19:56 filetype.h
Miscellaneous filetype functions -- maps RISC OS filetypes to NetSurf
content types and vice versa.
> -rw-rw-r-- 1 steve steve 15907 Mar 2 19:56 font.c
> -rw-r--r-- 1 steve steve 1437 Jun 9 2014 font.h
Font handling. Mostly a veneer over RUfl.
> -rw-rw-r-- 1 steve steve 11443 Mar 2 19:56 global_history.c
> -rw-r--r-- 1 steve steve 1272 Oct 3 2013 global_history.h
RISC OS wrapper around the core's global history viewer.
> drwx-- 2 steve steve 4096 Mar 2 19:56 gui
Directory containing gui widget implementations. I'll return to this
later, too.
> -rw-rw-r-- 1 steve steve 62862 Mar 2 19:56 gui.c
> -rw-rw-r-- 1 steve steve 8198 Mar 2 19:56 gui.h
Most of the generic GUI code. Includes Wimp_Poll(Idle) calls and a bunch
of message handling. Probably contains other odds and sods, too. Again,
could usefully be split up into multiple files.
> -rw-rw-r-- 1 steve steve 10550 Mar 2 19:56 help.c
> -rw-r--r-- 1 steve steve 1038 Feb 24 2013 help.h
RISC OS help protocol implementation.
> -rw-rw-r-- 1 steve steve 8988 Mar 2 19:56 history.c
Local history window UI -- most logic is in the core.
> -rw-rw-r-- 1 steve steve 19042 Mar 2 19:56 hotlist.c
> -rw-r--r-- 1 steve steve 1641 Jun 9 2014 hotlist.h
RISC OS wrapper around the core's global hotlist viewer.
> -rw-rw-r-- 1 steve steve 6687 Mar 2 19:56 iconbar.c
> -rw-r--r-- 1 steve steve971 Feb 24 2013 iconbar.h
Implementation of the iconbar icon and menu.
> -rw-rw-r-- 1 steve steve 6824 Mar 2 19:56 image.c
> -rw-r--r-- 1 steve steve 1205 Feb 24 2013 image.h
Bitmap image redraw code -- provides a veneer over Tinct/OS_SpriteOp.
> -rw-r--r-- 1 steve steve996 Jun 9 2014 Makefile.defaults
> -rw-rw-r-- 1 steve steve 5767 Mar 2 19:56 Makefile.target
> -rw-rw-r-- 1 steve steve 26465 Mar 2 19:56 menus.c
> -rw-r--r-- 1 steve steve 4492 Jun 9 2014 menus.h
Implementation of core menu functions. It provides the code to build OS menu
structures from their definitions, display them and pass events on to
wimp_event.c for sending out to menu clients. Fairly tangled and unpleasant,
and a work in progress.
> -rw-rw-r-- 1 steve steve 6341 Mar 2 19:56 message.c
> -rw-