2006-10-03 01:58:33 +04:00
|
|
|
|
NetSurf Documentation for Developers
|
|
|
|
|
====================================
|
|
|
|
|
|
|
|
|
|
The documents in this directory describe how the NetSurf code works, and any
|
|
|
|
|
other information useful to developers.
|
|
|
|
|
|
|
|
|
|
Directory Structure
|
|
|
|
|
-------------------
|
|
|
|
|
The source is split at top level as follows:
|
|
|
|
|
|
|
|
|
|
content:: Fetching, managing, and converting content
|
|
|
|
|
css:: CSS parser
|
|
|
|
|
desktop:: Non-platform specific front-end
|
2008-09-15 15:30:42 +04:00
|
|
|
|
image:: Image conversion
|
|
|
|
|
render:: HTML processing and layout
|
|
|
|
|
utils:: Misc. useful functions
|
|
|
|
|
|
|
|
|
|
amiga::AmigaOS specific code
|
|
|
|
|
beos::BeOS/Haiku specific code
|
2006-10-03 01:58:33 +04:00
|
|
|
|
debug:: Unix debug build specific code
|
2008-09-26 20:42:00 +04:00
|
|
|
|
framebuffer:: Framebuffer specific code
|
2006-10-03 01:58:33 +04:00
|
|
|
|
gtk:: GTK specific code
|
2008-09-15 15:30:42 +04:00
|
|
|
|
riscos:: RISC OS specific code
|
2006-10-03 01:58:33 +04:00
|
|
|
|
|
|
|
|
|
Other Documentation
|
|
|
|
|
-------------------
|
|
|
|
|
RISC OS specific protocols:
|
|
|
|
|
|
|
|
|
|
- Plugin http://www.ecs.soton.ac.uk/~jmb202/riscos/acorn/funcspec.html[]
|
|
|
|
|
http://www.ecs.soton.ac.uk/~jmb202/riscos/acorn/browse-plugins.html[]
|
|
|
|
|
- URI http://www.ecs.soton.ac.uk/~jmb202/riscos/acorn/uri.html[]
|
|
|
|
|
- URL http://www.vigay.com/inet/inet_url.html[]
|
|
|
|
|
- Nested WIMP http://www.ecs.soton.ac.uk/~jmb202/riscos/acorn/nested.html[]
|
|
|
|
|
|
|
|
|
|
Specifications:
|
|
|
|
|
|
|
|
|
|
- HTML 4.01 http://www.w3.org/TR/html401/[]
|
|
|
|
|
(see also http://www.w3.org/MarkUp/[])
|
|
|
|
|
- XHTML 1.0 http://www.w3.org/TR/xhtml1/[]
|
|
|
|
|
- CSS 2.1 http://www.w3.org/TR/CSS21/[]
|
|
|
|
|
- HTTP/1.1 http://www.w3.org/Protocols/rfc2616/rfc2616.html[]
|
|
|
|
|
and errata http://purl.org/NET/http-errata[]
|
|
|
|
|
(see also http://www.w3.org/Protocols/[])
|
|
|
|
|
- HTTP Authentication http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2617.html[]
|
|
|
|
|
- PNG http://www.w3.org/Graphics/PNG/[]
|
|
|
|
|
- URI http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2396.html[]
|
|
|
|
|
(see also http://www.w3.org/Addressing/[] and RFC 2616)
|
|
|
|
|
- Cookies http://wp.netscape.com/newsref/std/cookie_spec.html[] and
|
|
|
|
|
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2109.html[]
|
|
|
|
|
|
|
|
|
|
Libraries
|
|
|
|
|
---------
|
|
|
|
|
Get these compiled for RISC OS with headers from
|
|
|
|
|
http://netsurf.strcprstskrzkrk.co.uk/developer/[]
|
|
|
|
|
|
|
|
|
|
- libxml (XML and HTML parser) http://www.xmlsoft.org/[]
|
|
|
|
|
- libcurl (HTTP, FTP, etc) http://curl.haxx.se/libcurl/[]
|
|
|
|
|
- OSLib (C interface to RISC OS SWIs) http://ro-oslib.sourceforge.net/[]
|
|
|
|
|
- libmng (PNG, JNG, MNG support) http://www.libmng.com/[]
|
|
|
|
|
- libjpeg (JPEG support) http://www.ijg.org/[]
|
|
|
|
|
- zlib http://www.gzip.org/zlib/[]
|
|
|
|
|
- OpenSSL (HTTPS support) http://www.openssl.org/[]
|
2007-07-04 23:05:52 +04:00
|
|
|
|
|
|
|
|
|
Coding Style
|
|
|
|
|
------------
|
|
|
|
|
NetSurf's source is organised in modules. A module usually consists of a .c and
|
|
|
|
|
.h file. For example the html module is in html.c and html.h.
|
|
|
|
|
|
|
|
|
|
All functions (including static functions) in a module should start <module>_,
|
|
|
|
|
for example html_create(), html_process_data(), etc. This makes functions easy
|
|
|
|
|
to find and names unique through the source, which is<69>helpful for backtraces,
|
|
|
|
|
documentation, etc.
|
|
|
|
|
|
|
|
|
|
Global variables in a module (including static) should also start <module>_.
|
|
|
|
|
|
|
|
|
|
Static functions should all be declared at the top.
|
|
|
|
|
|
|
|
|
|
Put functions in a logical order, for example any init function first, then
|
|
|
|
|
functions it calls, then the next externally available function, functions it
|
|
|
|
|
calls, etc.
|
|
|
|
|
|
2007-07-04 23:09:41 +04:00
|
|
|
|
We use K&R (2nd edition ANSI C) style, tabs for indent, 80 characters wide,
|
2007-07-04 23:05:52 +04:00
|
|
|
|
lower_case_with_underscores.
|
|
|
|
|
|
2008-07-11 23:18:21 +04:00
|
|
|
|
See http://www.netsurf-browser.org/developers/StyleGuide.pdf for further
|
|
|
|
|
information and examples.
|