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.
19 #ifndef __CALENDAR_LIST_BASE_H__
20 #define __CALENDAR_LIST_BASE_H__
22 extern Elm_Genlist_Item_Class cal_list_itc_h;
28 CAL_TASK_DUE_IN_OVER_ONE_WEEK,
29 CAL_TASK_DUE_WITHIN_A_WEEK,
32 }cal_task_group_item_type;
34 // todo: hide this also
36 Elm_Object_Item *it; // Genlist Item pointer
37 calendar_record_h record;
38 Eina_Bool checked; // Check status
40 cal_task_group_item_type todo_group_type;
41 /////////// For delete view only /////////////
42 // TODO: refactor delete view genlist
45 Eina_Bool is_before_today;
46 //////////////////////////////////////////////
47 } cal_list_genlist_item_data;
49 typedef void* cal_list_base_h;
51 typedef void (*cal_list_callback)(void* data);
53 cal_list_base_h cal_list_base_create(
54 struct appdata *ad, Evas_Object* parent, const char* part_name, bool enable_sweep_menu,
55 cal_list_callback select_item_callback, void* select_item_callback_data);
57 void cal_list_base_clear(cal_list_base_h list);
59 void cal_list_base_delete(cal_list_base_h list);
61 Evas_Object* cal_list_base_get_genlist_p(cal_list_base_h list); // todo: get rid of this
63 void cal_list_base_add_item(cal_list_base_h list, calendar_record_h record, bool prepend);
65 void cal_list_base_add_item_after(cal_list_base_h list, calendar_record_h record, Elm_Object_Item* after);
67 int cal_list_base_get_item_count(cal_list_base_h list);
69 // todo: encapsulated these properly
70 Elm_Object_Item* cal_list_base_append_genlist_group_item(Evas_Object *genlist,
71 const Elm_Genlist_Item_Class *itc, const struct tm *tm, cal_task_group_item_type type);
72 Elm_Object_Item* cal_list_base_prepend_genlist_group_item(Evas_Object *genlist,
73 const Elm_Genlist_Item_Class *itc, const struct tm *tm);
75 void cal_list_base_delete_popup(cal_list_base_h list);
77 void cal_list_base_delete_popup_idler(cal_list_base_h list);
79 void cal_list_base_set_search_text(cal_list_base_h list, const char *search_text);