summaryrefslogtreecommitdiff
path: root/Docs/00-overview
blob: b2090584bca4b237634844dc5470c82d90d4fe86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
render:: HTML processing and layout
css:: CSS parser
image:: Image conversion
desktop:: Non-platform specific front-end
riscos:: RISC OS specific code
debug:: Unix debug build specific code
gtk:: GTK specific code
utils:: Misc. useful functions

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/[]

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 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.

We use K&R (2nd edition ANSI C) style, tabs for indent, 80 characters wide,
lower_case_with_underscores.

See http://www.netsurf-browser.org/developers/StyleGuide.pdf for further
information and examples.