]> Pileus Git - lackey/blobdiff - src/cal.h
Add event selection to day and week views
[lackey] / src / cal.h
index 37412211115d0c072e675b25014ad39b05a70d01..7d308ec23fe47f60dad9681571407685af30941f 100644 (file)
--- a/src/cal.h
+++ b/src/cal.h
@@ -39,6 +39,7 @@ typedef struct event_t {
        date_t          end;
        const cal_t    *cal;
        struct event_t *next;
+       struct event_t *prev;
 } event_t;
 
 typedef struct todo_t {
@@ -50,14 +51,18 @@ typedef struct todo_t {
        date_t         due;
        cal_t         *cal;
        struct todo_t *next;
+       struct todo_t *prev;
 } todo_t;
 
 /* Global data */
-extern cal_t   *CALS;
-extern event_t *EVENTS;
-extern todo_t  *TODOS;
+extern cal_t   *CAL,   *CALS;
+extern event_t *EVENT, *EVENTS;
+extern todo_t  *TODO,  *TODOS;
 
 /* Calendar functions */
 void cal_init(void);
 void cal_load(year_t year, month_t month, day_t day, int days);
 void cal_config(const char *group, const char *name, const char *key, const char *value);
+
+/* Event functions */
+event_t *find_event(date_t *target);