-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_loop.txt
68 lines (58 loc) · 1.63 KB
/
event_loop.txt
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
Terminal -> SIGWINCH
curses_signal_handler() -> SigWinch=1 (needs to be atomic)
Event loops
-----------
index/pager - custom call to km_dokey()
Simple + others - menu_loop()
mutt_enter_string_full() - custom km_dokey()
questions: mutt_yesorno(), mutt_multi_choice(), query_quadoption()
- custom mutt_getch()
mutt_change_flag(), menu_dialog_dokey() - custom mutt_getch()
mutt_resize_screen()
get LINES, COLUMNS
NT_WINDOW ∀
external event, e.g. edit file
resize and repaint
Event loop - RESIZE
get_ch (convert to OP)
resize
mutt_resize_screen()
set_root(cols, rows)
window_reflow()
window_notify_all()
NT_WINDOW
WA_RECALC
redraw
window_redraw()
window_reflow() # KILL
window_notify_all() # KILL
window_recalc()
window_repaint()
Ctrl-L (OP_REDRAW)
get_ch (OP_REDRAW)
window_invalidate(root)
∀ win WA_REPAINT
redraw
window_redraw() # clearok() first?
window_recalc()
window_repaint() # refresh() after?
clearok()
ctrl-L? YES
resize? NO
external? YES
extract RootWindow, NULL param -> RootWindow, static?
Resize (SBar) needs observer (NT_WINDOW) => WA_REPAINT
Resize (Sidebar) NT_WINDOW -> WA_RECALC -> WA_REPAINT
Resize (SimpleDlg) needs observer (NT_WINDOW) -> WA_RECALC, MENU_FULL, WA_REPAINT
repaint() -> menu_redraw()
Ctrl-L (Index/Pager) -> win_invalidate(), win_redraw()
Index needs observer(NT_WINDOW) -> WA_RECALC, MENU_FULL, WA_REPAINT
Pager - same
OP_NULL - some op with no visual change (event loop startup)
redraw -> window_redraw()
=> window_recalc() NOOP
=> window_repaint() NOOP
mutt_need_hard_redraw()
external tools / pin entry
who repaint(force)?
NONE => win_invalidate()