From 21bb522bf08db0ffb9777c0251d3e44f411a8910 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 1 Jul 2007 17:46:13 +0000 Subject: 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 --- src/calendar.h | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'src') 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 -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 */ -- cgit v1.2.3-54-g00ecf