From f7cc8f7cbd3e7b83c33fe85b2311895b8d5ee242 Mon Sep 17 00:00:00 2001 From: Bolian Yin Date: Tue, 11 Nov 2003 10:34:29 +0000 Subject: Fixes #50538 2003-11-11 Bolian Yin Fixes #50538 * e-calendar-item: make e_calendar_item_normalize_date public func. add "selection_preview_changed" signal. move some definition of constants to .h svn path=/trunk/; revision=23284 --- widgets/misc/e-calendar-item.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'widgets/misc/e-calendar-item.h') diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h index 218095f741..f7f1110b68 100644 --- a/widgets/misc/e-calendar-item.h +++ b/widgets/misc/e-calendar-item.h @@ -36,9 +36,39 @@ extern "C" { #define E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME 1 #define E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME 1 +/* The number of rows & columns of days in each month. */ +#define E_CALENDAR_ROWS_PER_MONTH 6 +#define E_CALENDAR_COLS_PER_MONTH 7 + /* Used to mark days as bold in e_calendar_item_mark_day(). */ #define E_CALENDAR_ITEM_MARK_BOLD 1 +/* + * These are the padding sizes between various pieces of the calendar. + */ + +/* The minimum padding around the numbers in each cell/day. */ +#define E_CALENDAR_ITEM_MIN_CELL_XPAD 4 +#define E_CALENDAR_ITEM_MIN_CELL_YPAD 0 + +/* Vertical padding. */ +#define E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS 1 +#define E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS 0 +#define E_CALENDAR_ITEM_YPAD_ABOVE_CELLS 1 +#define E_CALENDAR_ITEM_YPAD_BELOW_CELLS 2 + +/* Horizontal padding in the heading bars. */ +#define E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME_WITH_BUTTON 16 +#define E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME 3 +#define E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME 3 +#define E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME_WITH_BUTTON 16 + +/* Horizontal padding in the month displays. */ +#define E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS 4 +#define E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS 2 +#define E_CALENDAR_ITEM_XPAD_BEFORE_CELLS 1 +#define E_CALENDAR_ITEM_XPAD_AFTER_CELLS 4 + /* These index our colors array. */ typedef enum @@ -231,6 +261,7 @@ struct _ECalendarItemClass void (* date_range_changed) (ECalendarItem *calitem); void (* selection_changed) (ECalendarItem *calitem); + void (* selection_preview_changed) (ECalendarItem *calitem); }; @@ -332,6 +363,14 @@ void e_calendar_item_set_get_time_callback (ECalendarItem *calitem, ECalendarItemGetTimeCallback cb, gpointer data, GtkDestroyNotify destroy); +void e_calendar_item_normalize_date (ECalendarItem *calitem, + gint *year, + gint *month); +gint e_calendar_item_get_week_number (ECalendarItem *calitem, + gint day, + gint month, + gint year); + #ifdef __cplusplus } -- cgit v1.2.3