summaryrefslogtreecommitdiff
path: root/src/calcurse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 7a7f4f2..d7b5093 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -456,6 +456,22 @@ enum win {
#define FLAG_STA (1 << STA)
#define FLAG_ALL ((1 << NBWINS) - 1)
+#define WINS_NBAR_LOCK \
+ pthread_cleanup_push(wins_nbar_cleanup, NULL); \
+ wins_nbar_lock();
+
+#define WINS_NBAR_UNLOCK \
+ wins_nbar_unlock(); \
+ pthread_cleanup_pop(0);
+
+#define WINS_CALENDAR_LOCK \
+ pthread_cleanup_push(wins_calendar_cleanup, NULL); \
+ wins_calendar_lock();
+
+#define WINS_CALENDAR_UNLOCK \
+ wins_calendar_unlock(); \
+ pthread_cleanup_pop(0);
+
enum ui_mode {
UI_CURSES,
UI_CMDLINE,
@@ -977,8 +993,10 @@ void vars_init(void);
extern struct window win[NBWINS];
unsigned wins_nbar_lock(void);
void wins_nbar_unlock(void);
+void wins_nbar_cleanup(void *);
unsigned wins_calendar_lock(void);
void wins_calendar_unlock(void);
+void wins_calendar_cleanup(void *);
int wins_refresh(void);
int wins_wrefresh(WINDOW *);
int wins_doupdate(void);