3 The whole dependency tree is supposed (in ideal world) to look somewhat like
4 the following. Please note that this deals only with the core parts of ELinks,
5 not extensions like bookmarks, cookies, globhist, mime etc. Those act like
6 modules and are generally self-contained - the main visible difference is that
7 they don't have their UI stuff in dialogs/foo.c but in foo/dialogs.c.
9 Note also that it isn't all that clean-cut as it looks. Some parts of e.g.
10 lowlevel/ or osdep/ are omnipresent as well and it's meant to be so (at least
11 for now). Also some other exceptions are possible; the exception to this is
12 util/, where no exceptions are permitted - it must have no dependencies to the
13 rest of the code whatsoever, not even compile-time ones. The other way around,
14 the gettext part of intl/ is generally omnipresent but the charset part is
15 pretty isolated - it could be probably drawn as connected to document and
16 terminal (actually, it is used when encoding forms in viewer too, but that
17 stuff should be probably moved to document).
19 viewer/ contains code concerning that big rectangle between bars at the top
20 and bars at the bottom, documents usually being shown inside. Logically, it
21 is in fact kind of a BFU widget, but in practice it has little in common with
22 the bfu/ widgets, it is special in many ways and deeply woven to the fabric
23 of session/ (e.g. session history is basically a chain of viewer widget
26 dialogs/ is special too. It in fact means to say "global and unique BFU
27 instances belonging to the ELinks core"/ but that's a rather long and boring
28 name, besides the nightmares associated with maintaining files and directories
29 containing spaces in GIT. The "global and unique BFU instances" part can be
30 represented by exmode, menus and leds (were they there). The "ELinks core"
31 part can be represented by options, document and downloads. The reason those
32 aren't in their respective directories (while bookmarks or formhist have their
33 dialogs.c) is that it's important to keep the dependencies sorted out
34 reasonably. Had there been e.g. terminal/dialogs.c, it would mean libterminal
35 has to depend on libbfu.a and so. (There are two 'managerial' exceptions
36 to this; don't dig into them, please. ;-)
38 scripting/ (== browser scripting) is also expected to hook all around, perhaps
39 it should be better in the omnipresent box.
41 The edges are directed and represent the "using" relation. Therefore,
42 "bfu -> terminal" means "bfu/ is using terminal/ services (but not
43 the other way around)".
46 | util/ | <-- This is omnipresent :)
52 | bfu |<------- | dialogs |
53 `-------' \ `---------'
55 .----------. \ .--------.
56 | terminal | <----- | viewer | <-----------------.
57 / `----------' .> `--------' |
59 .-------. / .----------. | .----------. .----/ecmascript/----.
60 | osdep |<------ | lowlevel | | | document | ----> | document scripting |
61 `-------' \ `----------' | `----------' `--------------------'
63 \ .---------. `> .---------. .----/scripting/----.
64 | network | <----- | session | -----> | browser scripting |
65 `---------' / `---------' `-------------------'