On Sat, 2009-08-08 at 12:06 +0100, Steve Fryatt wrote:

> I would be interested in finding out more, if you're struggling to find anyone
> to take on the RISC OS front-end.  I use NetSurf a lot, and it would be a pity
> if its support for RISC OS were to reduce.  My main worry -- which has stopped
> my getting involved before -- is lack of time: due to my other commitments,
> there are likely to be some (possibly longish) periods when I can't spend any
> time on NetSurf.

Worry not. It's better to have some development than none at all.

> I have some experience of the RISC OS wimp (and other aspects of the system),
> although none of developing as part of a team.  My main language (on RISC OS)
> these days is C, using OSLib and compiling on GCC.

I guess the first thing is for you to get the source code from SVN and
get it compiling. While we can talk you through this over email, IRC is
somewhat less laggy :)

The relevant channel is #netsurf on irc.freenode.net. There's usually
people around at most sane times (02:00-09:00 UK time is considered
insane for these purposes).

As we've said, the current code could use a fair bit of love. Here's a
breakdown of what's in each file:

> -rw-r--r-- 1 jmb jmb  6158 2009-08-05 20:42 401login.c

HTTP authentication dialogue.

> -rw-r--r-- 1 jmb jmb  8713 2009-03-28 19:18 artworks.c
> -rw-r--r-- 1 jmb jmb  1395 2008-09-16 19:07 artworks.h

Artworks content handler. [NB: a content is NetSurf's terminology for a
stream of data with a given type. So things like HTML, CSS, JPEG, GIF,
PNG, etc.]

> -rw-r--r-- 1 jmb jmb  1616 2008-09-16 19:07 assert.c

Implementation of a custom assertion function that opens the log file in
a text editor.

> -rw-r--r-- 1 jmb jmb  7976 2008-09-16 19:07 awrender.s

Binding to AWRender for the Artworks content handler.

> -rw-r--r-- 1 jmb jmb 30603 2009-03-27 02:45 bitmap.c
> -rw-r--r-- 1 jmb jmb  1887 2009-03-27 02:39 bitmap.h

Representation of a bitmap image. Will be plotted with Tinct.

> -rw-r--r-- 1 jmb jmb  7552 2009-05-28 11:37 buffer.c
> -rw-r--r-- 1 jmb jmb   965 2008-09-16 19:07 buffer.h

Redraw buffering (redirects to a sprite, then blits the sprite)

> drwxr-xr-x 3 jmb jmb  4096 2009-07-27 18:08 configure

Directory containing implementation of configuration dialogues. I'll
return to this later.

> -rw-r--r-- 1 jmb jmb 11889 2009-05-29 23:53 configure.c
> -rw-r--r-- 1 jmb jmb  1029 2008-09-16 19:07 configure.h

Implementation of the main configuration filer-like window.

> -rw-r--r-- 1 jmb jmb  5579 2009-05-29 23:56 cookies.c
> -rw-r--r-- 1 jmb jmb   872 2008-09-16 19:07 cookies.h

Cookies frontend code (hideously entwined with treeview, mostly migrated
to the core in one of the development branches that's blocked on merge
until the RO frontend is ported to the new core API).

> -rw-r--r-- 1 jmb jmb  5137 2008-09-16 19:07 debugwin.c

Debug window (shift-adjust click on the iconbar icon to see this)

> -rw-r--r-- 1 jmb jmb 20042 2009-03-28 01:14 dialog.c
> -rw-r--r-- 1 jmb jmb  2073 2009-01-20 01:17 dialog.h

Implementation of generic dialogue boxes. Also includes a bunch of other
UI stuff that probably shouldn't be in here.

> -rw-r--r-- 1 jmb jmb 42475 2009-06-20 20:38 download.c

Download window implementation.

> -rw-r--r-- 1 jmb jmb  3617 2009-03-27 02:25 draw.c
> -rw-r--r-- 1 jmb jmb  1283 2008-09-16 19:07 draw.h

Drawfile content handler.

> -rw-r--r-- 1 jmb jmb  8870 2009-03-27 02:23 filetype.c

Miscellaneous filetype functions -- maps RISC OS filetypes to NetSurf
content types and vice versa.

> -rw-r--r-- 1 jmb jmb 14817 2009-07-24 00:06 font.c

Font handling. Mostly a veneer over RUfl.

> -rw-r--r-- 1 jmb jmb 11569 2009-05-30 00:00 global_history.c
> -rw-r--r-- 1 jmb jmb   977 2008-09-16 19:07 global_history.h

Global history implementation. (Similar state to cookies)

> drwxr-xr-x 3 jmb jmb  4096 2009-07-05 02:16 gui

Directory containing gui widget implementations. I'll return to this
later, too.

> -rw-r--r-- 1 jmb jmb 57963 2009-07-24 00:06 gui.c
> -rw-r--r-- 1 jmb jmb  9062 2009-07-20 15:06 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-r--r-- 1 jmb jmb 10298 2009-05-30 00:02 help.c
> -rw-r--r-- 1 jmb jmb  1038 2008-09-16 19:07 help.h

RISC OS help protocol implementation.

> -rw-r--r-- 1 jmb jmb  7972 2009-03-28 01:08 history.c

Local history window UI -- most logic is in the core.

> -rw-r--r-- 1 jmb jmb 10004 2009-05-30 00:03 hotlist.c

Hotlist implementation (c.f. cookies/global history)

> -rw-r--r-- 1 jmb jmb  6864 2009-03-27 02:15 image.c
> -rw-r--r-- 1 jmb jmb  1205 2009-07-24 00:06 image.h

Bitmap image redraw code -- provides a veneer over Tinct/OS_SpriteOp.

> -rw-r--r-- 1 jmb jmb 77192 2009-06-20 20:25 menus.c
> -rw-r--r-- 1 jmb jmb  4291 2009-02-02 00:54 menus.h

Implementation of Menus. This is possibly the least pleasant part of the
entire RO frontend.

> -rw-r--r-- 1 jmb jmb  6316 2008-09-16 19:07 message.c
> -rw-r--r-- 1 jmb jmb  1513 2008-09-16 19:07 message.h

Generic dispatch and routing of Wimp messages to handler functions.

> -rw-r--r-- 1 jmb jmb  6415 2008-09-16 19:07 options.h

RISC OS frontend specific options. These are loaded and saved by the
core options code.

> -rw-r--r-- 1 jmb jmb  1436 2008-09-16 19:07 oslib_pre7.h

Compatibility header for versions of OSLib before OSLib 7.00 (i.e. all
current OSLib releases).

> -rw-r--r-- 1 jmb jmb  8203 2008-09-16 19:07 palettes.c
> -rw-r--r-- 1 jmb jmb  1095 2008-09-16 19:07 palettes.h

Default sprite palettes.

> -rw-r--r-- 1 jmb jmb 14045 2009-07-20 14:57 plotters.c

Drawing primitives. These functions are called by the core when it's
redrawing something.

> -rw-r--r-- 1 jmb jmb 45063 2009-07-24 00:06 plugin.c
> -rw-r--r-- 1 jmb jmb  2986 2009-07-24 00:06 plugin.h

Acorn plugin protocol implementation. Disabled by default as it can
cause crashes (there's a nasty race condition that requires redesigning
NetSurf's multitasking model to fix).

> -rw-r--r-- 1 jmb jmb 24171 2009-07-20 14:54 print.c
> -rw-r--r-- 1 jmb jmb  1177 2009-02-22 15:14 print.h

Printing UI and RISC OS printing protocol implementation.

> -rw-r--r-- 1 jmb jmb 10548 2009-01-20 01:17 query.c
> -rw-r--r-- 1 jmb jmb  1104 2009-01-20 01:17 query.h

Query dialogues (e.g. "There are downloads remaining, are you sure you
want to quit?")

> -rw-r--r-- 1 jmb jmb 37215 2009-07-24 00:06 save.c
> -rw-r--r-- 1 jmb jmb  1708 2009-02-02 00:54 save.h

Save dialogue and drag&drop protocol implementation.

> -rw-r--r-- 1 jmb jmb 18349 2009-07-27 19:00 save_complete.c
> -rw-r--r-- 1 jmb jmb  1006 2009-03-29 00:19 save_complete.h

Full save support (migrated to core, will disappear soon).

> -rw-r--r-- 1 jmb jmb 11337 2009-07-20 14:50 save_draw.c
> -rw-r--r-- 1 jmb jmb   931 2009-06-20 20:14 save_draw.h

Draw export implementation.

> -rw-r--r-- 1 jmb jmb  1614 2009-02-17 16:28 save_pdf.c
> -rw-r--r-- 1 jmb jmb   956 2008-09-16 19:07 save_pdf.h

PDF export frontend binding.

> -rw-r--r-- 1 jmb jmb  3725 2009-02-12 08:44 schedule.c

Callback scheduler (used for e.g. animated gif redraw)

> drwxr-xr-x 3 jmb jmb  4096 2009-03-21 13:24 scripts

Directory containing obey scripts which need preprocessing before they
can be used.

> -rw-r--r-- 1 jmb jmb 22079 2009-03-27 01:33 search.c

Free-text search UI and implementation. Non-UI parts will be migrating
to the core soon.

> -rw-r--r-- 1 jmb jmb  4176 2009-06-20 20:05 sprite.c
> -rw-r--r-- 1 jmb jmb  1360 2009-06-20 20:05 sprite.h

RISC OS Sprite content handler.

> -rw-r--r-- 1 jmb jmb 12731 2009-06-28 21:13 sslcert.c

SSL certificate verification failed dialogue.

> drwxr-xr-x 3 jmb jmb  4096 2008-09-16 19:07 templates

Directory containing templates files in text form for processing with
CCres. To edit these, run CCRes over them to convert to Template format,
edit with your favourite template editor, then convert back to text.

> -rw-r--r-- 1 jmb jmb 29405 2009-06-28 21:13 textarea.c
> -rw-r--r-- 1 jmb jmb  1838 2009-06-28 21:13 textarea.h

Generic UTF-8 textarea implementation. The core now has one of these, so
this one should disappear (or become a very thin veneer over the core
implementation)

> -rw-r--r-- 1 jmb jmb 17840 2009-07-24 00:06 textselection.c
> -rw-r--r-- 1 jmb jmb  1472 2008-09-16 19:07 textselection.h

Text selection implementation.

> -rw-r--r-- 1 jmb jmb 63639 2009-05-28 13:32 theme.c
> -rw-r--r-- 1 jmb jmb  7209 2008-09-16 19:07 theme.h

UI themeing. Much voodoo I've never comprehended. Also includes
toolbars, which should be made into a standalone component, imo.

> -rw-r--r-- 1 jmb jmb  6080 2009-05-30 00:13 theme_install.c

Theme installation.

> -rw-r--r-- 1 jmb jmb 10255 2009-03-27 01:24 thumbnail.c
> -rw-r--r-- 1 jmb jmb   952 2008-09-16 19:07 thumbnail.h

Thumbnail image management.

> -rw-r--r-- 1 jmb jmb  4524 2008-09-16 19:07 tinct.h

Tinct API.

> -rw-r--r-- 1 jmb jmb 44521 2009-06-28 21:13 treeview.c
> -rw-r--r-- 1 jmb jmb  2138 2008-09-16 19:07 treeview.h

Treeview UI code (again, mostly redundant given branch where treeview is
a core widget)

> -rw-r--r-- 1 jmb jmb 24570 2009-05-30 00:14 ucstables.c
> -rw-r--r-- 1 jmb jmb   885 2008-09-16 19:07 ucstables.h

Lookup tables for conversion from Unicode to legacy 8bit character sets.
Also utility functions to convert text to/from the current system
alphabet.

> -rw-r--r-- 1 jmb jmb  2847 2009-07-01 13:01 uri.c
> -rw-r--r-- 1 jmb jmb   967 2009-07-01 12:51 uri.h

URI protocol implementation.

> -rw-r--r-- 1 jmb jmb 21496 2009-05-30 01:29 url_complete.c
> -rw-r--r-- 1 jmb jmb  1380 2008-09-16 19:07 url_complete.h

URL complete dropdown widget.

> -rw-r--r-- 1 jmb jmb  4911 2009-07-01 13:03 url_protocol.c
> -rw-r--r-- 1 jmb jmb  1073 2009-02-22 15:18 url_protocol.h

ANT URL protocol implementation.

> -rw-r--r-- 1 jmb jmb 24016 2009-05-30 01:25 wimp.c
> -rw-r--r-- 1 jmb jmb  3058 2008-09-16 19:07 wimp.h

Various useful veneers over Wimp SWIs.

> -rw-r--r-- 1 jmb jmb 32335 2009-03-27 17:53 wimp_event.c
> -rw-r--r-- 1 jmb jmb  3251 2008-09-16 19:07 wimp_event.h

WIMP event dispatch. All new widgets etc should be using this. Think
Toolbox EventLib and you're pretty close to what this does.

> -rw-r--r-- 1 jmb jmb  1956 2009-03-28 19:08 wimputils.h

Nasty hacks to deal with OSLib's API breaking C's aliasing rules.

> -rw-r--r-- 1 jmb jmb 89230 2009-07-24 00:06 window.c

Main browser window UI. Could do with some major tidying.


Returning to the configuration widgets:

> -rw-r--r-- 1 jmb jmb  2472 2008-09-16 19:07 con_cache.c

Cache configuration dialogue.

> -rw-r--r-- 1 jmb jmb  7854 2008-09-16 19:07 con_connect.c

Connection.

> -rw-r--r-- 1 jmb jmb  3276 2008-09-16 19:07 con_content.c

Content.

> -rw-r--r-- 1 jmb jmb  1568 2008-09-16 19:07 configure.h

Header containing initialisation function names for configuration
widgets. These are called by the main configuration filer-like widget.

> -rw-r--r-- 1 jmb jmb  6789 2009-07-21 11:14 con_fonts.c

Fonts.

> -rw-r--r-- 1 jmb jmb  2819 2008-09-16 19:07 con_home.c

Homepage.

> -rw-r--r-- 1 jmb jmb  8005 2009-03-27 02:32 con_image.c

Image rendering settings.

> -rw-r--r-- 1 jmb jmb  3449 2008-09-16 19:07 con_inter.c

UI configuration.

> -rw-r--r-- 1 jmb jmb  4266 2008-09-16 19:07 con_language.c

Language options.

> -rw-r--r-- 1 jmb jmb  5178 2008-09-16 19:07 con_memory.c

Memory options.

> -rw-r--r-- 1 jmb jmb  2708 2008-09-16 19:07 con_secure.c

Security options.

> -rw-r--r-- 1 jmb jmb 12551 2009-03-28 01:15 con_theme.c

Theme configuration.


Finally, the GUI widgets:

> -rw-r--r-- 1 jmb jmb 12951 2009-07-09 01:18 progress_bar.c
> -rw-r--r-- 1 jmb jmb  1640 2008-09-16 19:07 progress_bar.h

Generic progress bar widget. Currently unused, afaiaa.

> -rw-r--r-- 1 jmb jmb 15751 2009-07-09 01:18 status_bar.c
> -rw-r--r-- 1 jmb jmb  1671 2008-09-16 19:07 status_bar.h

Status bar widget. Again, I don't think this is used. That said, as it's
capable of rendering UTF-8 text, it's rather better than the existing
one (which is probably implemented in window.c).

Both of these widget implementations, although unused, should give some
idea of how to implement useful primitives that expose a simple API.
They both illustrate hiding of data from their clients, which simplifies
all the code. They also show use of the wimp_event API which performs
all the event routing needed, so widgets can get on with their jobs and
not worry too much about Wimp specifics. 

This is the direction that the RISC OS frontend was going in when it was
last actively developed. That is:

- Provision of primitive components which can be combined to 
  provide complex UIs.

- Complete isolation of widget implementation details from outside.

- Simple, clear event routing.

Migration of the protocol handlers to wimp_event will clean things up
greatly, too.

I hope that's of some use.


J.


Reply via email to