aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-09-06 17:08:08 +0000
committerFrederic Culot <calcurse@culot.org>2006-09-06 17:08:08 +0000
commita4ec6c6b3be676b23296e05f2d75b439b79dadae (patch)
tree6e8b78320d8a83da80dd810a4bd6885c0b583097 /src
parent3ffab39ccf494599664232b7672b16d12d854fcc (diff)
downloadcalcurse-a4ec6c6b3be676b23296e05f2d75b439b79dadae.tar.gz
calcurse-a4ec6c6b3be676b23296e05f2d75b439b79dadae.zip
several defines added
reset_status_page() and other_status_page() added
Diffstat (limited to 'src')
-rwxr-xr-xsrc/utils.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h
index e7bdeff..fbc6298 100755
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,4 +1,4 @@
-/* $calcurse: utils.h,v 1.1 2006/07/31 21:00:03 culot Exp $ */
+/* $calcurse: utils.h,v 1.2 2006/09/06 17:08:08 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -27,6 +27,23 @@
#ifndef CALCURSE_UTILS_H
#define CALCURSE_UTILS_H
+#define MAX(x,y) ((x)>(y)?(x):(y))
+#define MIN(x,y) ((x)<(y)?(x):(y))
+
+#define NB_CAL_CMDS 15 /* number of commands while in cal view */
+#define NB_APP_CMDS 18 /* same thing while in appointment view */
+#define NB_TOD_CMDS 18 /* same thing while in todo view */
+#define TOTAL_CMDS NB_CAL_CMDS + NB_APP_CMDS + NB_TOD_CMDS
+#define NB_PANELS 3 /* 3 panels: CALENDAR, APPOINTMENT, TODO */
+#define CMDS_PER_LINE 6 /* max number of commands per line */
+#define KEY_LENGTH 4 /* length of each keybinding + one space */
+#define LABEL_LENGTH 8 /* length of command description */
+
+typedef struct { /* structure defining a keybinding */
+ char *key;
+ char *label;
+} binding_t;
+
void status_mesg(char *mesg_line1, char *mesg_line2);
void erase_window_part(WINDOW *win, int first_col, int first_row,
int last_col, int last_row);
@@ -51,5 +68,7 @@ void item_in_popup(char *saved_a_start, char *saved_a_end, char *msg,
void win_show(WINDOW * win, char *label);
void display_item(WINDOW *win, int incolor, char *msg,
int len, int y, int x);
+void reset_status_page(void);
+void other_status_page(int panel);
#endif /* CALCURSE_UTILS_H */