diff options
-rw-r--r-- | DESIGN.md | 45 | ||||
-rw-r--r-- | src/bin/win.c | 25 |
2 files changed, 70 insertions, 0 deletions
diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..ba46615 --- /dev/null +++ b/DESIGN.md | |||
@@ -0,0 +1,45 @@ | |||
1 | A simple documentation to navige through the C files: | ||
2 | |||
3 | * `src/bin/about.c` handles the About widget | ||
4 | * `src/bin/col.c` is about the colors handled by the terminal | ||
5 | * `src/bin/config.c`: how the configuration is saved/loaded/updated | ||
6 | * `src/bin/controls.c`: the widget when a right-click is done on a terminal | ||
7 | * `src/bin/dbus.c`: all the D-Bus interactions | ||
8 | * `src/bin/extns.c` lists file extensions supported | ||
9 | * `src/bin/gravatar.c` hosts the code to show a Gravatar when hovering an email address | ||
10 | * `src/bin/ipc.c`: various IPC functions | ||
11 | * `src/bin/keyin.c`: handles key input | ||
12 | * `src/bin/main.c` host the main() function: setup/shutdown code | ||
13 | * `src/bin/media.c` handles media interactions like image popups, inlining movies | ||
14 | * `src/bin/miniview.c`: the miniview of the history | ||
15 | * `src/bin/options.c`: the settings widget | ||
16 | * `src/bin/options_behavior.c`: the settings panel that handles the Behaviors | ||
17 | * `src/bin/options_colors.c`: the settings panel about colors in the terminal | ||
18 | * `src/bin/options_elm.c`: the settings panel to configure Elementary | ||
19 | * `src/bin/options_font.c`: the settings panel to choose the Font | ||
20 | * `src/bin/options_helpers.c`: the settings panel on Helpers | ||
21 | * `src/bin/options_keys.c`: the settings panel to configure key bindings | ||
22 | * `src/bin/options_theme.c`: the settings panel to choose a theme | ||
23 | * `src/bin/options_themepv.c`: the widget that handles theme previews | ||
24 | * `src/bin/options_video.c`: the settings panel to configure video rendering | ||
25 | * `src/bin/options_wallpaper.c`: the settings panel to configure a wallpaper | ||
26 | * `src/bin/sel.c`: the tab selector | ||
27 | * `src/bin/termcmd.c` handles custom terminology commands | ||
28 | * `src/bin/termio.c`: the core term widget with the textgrid | ||
29 | * `src/bin/termiolink.c`: link detection in the terminal | ||
30 | * `src/bin/termpty.c`: the PTY interaction | ||
31 | * `src/bin/termptydbl.c`: code to hande double-width characters | ||
32 | * `src/bin/termptyesc.c`: escape codes parsing | ||
33 | * `src/bin/termptyext.c`: extented terminology escape handling | ||
34 | * `src/bin/termptygfx.c`: charset translations | ||
35 | * `src/bin/termptyops.c`: handling history | ||
36 | * `src/bin/termptysave.c`: compression of the backlog | ||
37 | * `src/bin/tyalpha.c`: the `tyalpha` tool | ||
38 | * `src/bin/tybg.c`: the `tybg` tool | ||
39 | * `src/bin/tycat.c`: the `tycat` tool | ||
40 | * `src/bin/tyls.c`: the `tyls` tool | ||
41 | * `src/bin/typop.c`: the `typop` tool | ||
42 | * `src/bin/tyq.c`: the `tyq` tool | ||
43 | * `src/bin/utf8.c`: handles conversion between Eina_Unicode and char * | ||
44 | * `src/bin/utils.c`: small utilitarian functions | ||
45 | * `src/bin/win.c`: handles the windows, splits, tabs | ||
diff --git a/src/bin/win.c b/src/bin/win.c index a17643c..a674922 100644 --- a/src/bin/win.c +++ b/src/bin/win.c | |||
@@ -15,6 +15,31 @@ | |||
15 | #include "controls.h" | 15 | #include "controls.h" |
16 | #include "term_container.h" | 16 | #include "term_container.h" |
17 | 17 | ||
18 | |||
19 | /** | ||
20 | * Design: | ||
21 | * A terminal widget is Term. It hosts various Evas_Object, like a `termio` | ||
22 | * handling the textgrid. | ||
23 | * It is hosted in a Term_Container of type Solo. | ||
24 | * On Term_Container: | ||
25 | * It is a generic structure with a set of function pointers. It is a simple | ||
26 | * way to objectify and have genericity between a Window, a Split or Tabs. | ||
27 | * Solo, Win, Split, Tabs have a Term_Container as their first field and thus | ||
28 | * can be casted to Term_Container to have access to those APIs. | ||
29 | * | ||
30 | * Solo is the simplest container, hosting just a Term. | ||
31 | * Win is a window and has only one container child. | ||
32 | * Split is a widget to separate an area of the screen in 2 and thus has 2 | ||
33 | * children that can be either Solo or Tabs. | ||
34 | * Tabs is a Term_Container containing many containers (at the moment, only | ||
35 | * Solo ones) and have a system of tabs. | ||
36 | * | ||
37 | * All the windows are in the `wins` list. | ||
38 | */ | ||
39 | |||
40 | |||
41 | |||
42 | |||
18 | /* specific log domain to help debug only terminal code parser */ | 43 | /* specific log domain to help debug only terminal code parser */ |
19 | int _win_log_dom = -1; | 44 | int _win_log_dom = -1; |
20 | 45 | ||