summaryrefslogtreecommitdiff
path: root/src/calendar.h
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-07-01 17:46:13 +0000
committerFrederic Culot <calcurse@culot.org>2007-07-01 17:46:13 +0000
commit21bb522bf08db0ffb9777c0251d3e44f411a8910 (patch)
tree286493325e5e02ff5da038278eee55fca85e78bb /src/calendar.h
parent725837e93639961abe8f4b20aecb0d5747347dcc (diff)
downloadcalcurse-21bb522bf08db0ffb9777c0251d3e44f411a8910.zip
functions renamed to be prefixed with 'calendar_'
CALHEIGHT and CALWIDTH defined goto_day() prototype updated to take into account date_t type calendar_store_current_date() created calendar_goto_day() moved to calendar_change_day() calendar_get_slctd_day() and calendar_get_slctd_day_sec() added calendar_init_slctd_day() created calendar_move_up(), calendar_move_down(), calendar_move_left() and calendar_move_right() created wday_t and date_t type defined calendar_set_first_day_of_week(), calendar_change_first_day_of_week() and calendar_week_begins_on_monday() created
Diffstat (limited to 'src/calendar.h')
-rwxr-xr-xsrc/calendar.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/src/calendar.h b/src/calendar.h
index e65551f..7abbd42 100755
--- a/src/calendar.h
+++ b/src/calendar.h
@@ -1,4 +1,4 @@
-/* $calcurse: calendar.h,v 1.2 2007/03/10 15:54:59 culot Exp $ */
+/* $calcurse: calendar.h,v 1.3 2007/07/01 17:46:13 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -29,11 +29,41 @@
#include <stdbool.h>
-void update_cal_panel(WINDOW *cwin, int nl_cal, int nc_cal, int sel_month,
- int sel_year, int sel_day, int day, int month, int year, bool monday_first);
-int isBissextile(unsigned);
-long ymd_to_scalar(unsigned, unsigned, unsigned);
-void goto_day(int day, int month, int year, int *sel_day, int *sel_month,
- int *sel_year);
+#define CALHEIGHT 12
+#define CALWIDTH 30
+
+typedef enum { /* days of week */
+ SUNDAY,
+ MONDAY,
+ TUESDAY,
+ WEDNESDAY,
+ THURSDAY,
+ FRIDAY,
+ SATURDAY,
+ WDAYS
+} wday_t;
+
+typedef struct {
+ unsigned dd;
+ unsigned mm;
+ unsigned yyyy;
+} date_t;
+
+void calendar_start_date_thread(void);
+void calendar_stop_date_thread(void);
+void calendar_set_current_date(void);
+void calendar_set_first_day_of_week(wday_t);
+void calendar_change_first_day_of_week(void);
+bool calendar_week_begins_on_monday(void);
+void calendar_store_current_date(date_t *);
+void calendar_init_slctd_day(void);
+date_t *calendar_get_slctd_day(void);
+long calendar_get_slctd_day_sec(void);
+void calendar_update_panel(WINDOW *);
+void calendar_change_day(void);
+void calendar_move_right(void);
+void calendar_move_left(void);
+void calendar_move_up(void);
+void calendar_move_down(void);
#endif /* CALCURSE_CALENDAR_H */