path: root/src/calcurse.h
diff options
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-09-14 21:32:52 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-10-21 20:02:57 +0200
commit2112b1ca2e821e08bbfe6c197856860b6d49b69f (patch)
treef3098f89779bd05fad8096defca9c11e01d83bce /src/calcurse.h
parent2339d78cbd562319473a34a36390378df64ade00 (diff)
System message queue
The screen and user interaction is managed by the main thread. Other parts of calcurse (threads) wishing to use the screen or communicate with the user, must do it via the main thread. For this purpose the main input loop is extended with a message queue. A thread may insert a message in the queue. The main thread tests for messages before listening for user commands. If a message is present, it is displayed (in a popup window) for the user to acknowledge. Depending on the message other actions may be performed, e.g. the message could be turned into a "system appointment/event" and inserted among the usual appointments. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
1 files changed, 7 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 27337fd..be2199a 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -1287,4 +1287,11 @@ void wins_erase_status_bar(void);
void wins_other_status_page();
void wins_reset_status_page(void);
+/* queue.c */
+void que_init(void);
+int que_ued(void);
+struct event *que_ins(char *, time_t, int);
+void que_rem(void);
+void que_show(void);
+void que_save(void);
#endif /* CALCURSE_H */