mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 10:42:36 +03:00
fbe6acd30b
svn path=/trunk/netsurf/; revision=5442
87 lines
3.2 KiB
Plaintext
87 lines
3.2 KiB
Plaintext
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
|
||
image:: Image conversion
|
||
render:: HTML processing and layout
|
||
utils:: Misc. useful functions
|
||
|
||
amiga::AmigaOS specific code
|
||
beos::BeOS/Haiku specific code
|
||
debug:: Unix debug build specific code
|
||
framebuffer:: Framebuffer specific code
|
||
gtk:: GTK specific code
|
||
riscos:: RISC OS specific code
|
||
|
||
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<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.
|
||
|
||
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.
|