3 * Copyright 2012 Samsung Electronics Co., Ltd
5 * Licensed under the Flora License, Version 1.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://floralicense.org/license/
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef __MONTH_DATA_H__
19 #define __MONTH_DATA_H__
23 #define WEEKS_OF_MONTH 6
24 #define DAYS_OF_WEEK 7
25 #define DAYS_OF_WEEKLY_MONTHS_VIEW 42
26 #define LINES_OF_WEEKLY_MONTHS_EVENT 3
27 #define LINES_OF_WEEKLY_MONTHS_EVENT_LANDSCAPE 1
29 #define CAL_MONTH_MAX_ROWS_PER_CELL 3
37 } cal_month_calendar_event;
39 typedef void* cal_month_data_h;
41 cal_month_data_h cal_month_data_create(struct appdata *ad, int rows_per_cell);
43 int cal_month_data_load(cal_month_data_h month_data);
45 int cal_month_data_get_event_count(cal_month_data_h month_data, int week, int wday);
47 cal_month_calendar_event* cal_month_data_get_event(cal_month_data_h month_data, int mweek, int wday, int row);
49 void cal_month_data_clear(cal_month_data_h month_data);
51 int cal_month_data_get_day_time_by_pos(struct appdata *ad,
52 int pos_today, int pos_selected, int pos_start, int pos_end,
53 int *first_day, int *last_day, struct tm *start_time, struct tm *end_time, int day_pos);
55 void cal_month_data_destroy(cal_month_data_h month_data);