Tizen 2.1 base
[apps/core/preloaded/calendar.git] / src / day-event-block.h
1 /*\r
2   *\r
3   *  Copyright 2012  Samsung Electronics Co., Ltd\r
4   *\r
5   *  Licensed under the Flora License, Version 1.0 (the "License");\r
6   *  you may not use this file except in compliance with the License.\r
7   *  You may obtain a copy of the License at\r
8   *\r
9   *       http://floralicense.org/license/\r
10   *\r
11   *  Unless required by applicable law or agreed to in writing, software\r
12   *  distributed under the License is distributed on an "AS IS" BASIS,\r
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14   *  See the License for the specific language governing permissions and\r
15   *  limitations under the License.\r
16   */\r
17 \r
18 #ifndef __CALENDAR_DAY_EVENT_BLOCK_H__\r
19 #define __CALENDAR_DAY_EVENT_BLOCK_H__\r
20 \r
21 #include "cld.h"\r
22 #include "base-block.h"\r
23 #include "day-event-data.h"\r
24 \r
25 #define EVEN_BLOCK_EVENT_CLICEKD 0\r
26 #define EVEN_BLOCK_MORE_EVENT_CLICEKD EVEN_BLOCK_EVENT_CLICEKD+1\r
27 #define EVEN_BLOCK_EVENT_LONGPRESS EVEN_BLOCK_MORE_EVENT_CLICEKD + 1\r
28 \r
29 typedef void* cal_day_event_block_h;\r
30 typedef void* cal_day_event_block_event_h;\r
31 typedef Eina_Bool(* cal_day_event_block_foreach_query_event_cb)(cal_day_event_block_event_h event_block, int line_index, int height, void *user_data);\r
32 typedef void(* cal_day_event_block_moving_event_cb)(void *user_data, Evas_Coord time_block_y);\r
33 typedef Evas_Object *(* create_layout_func)(void *data_p, void *data_event);\r
34 typedef void (*move_layout_func)(cal_day_event_block_h event_block, cal_day_event_block_event_h event, Evas_Coord_Rectangle *base);\r
35 \r
36 void cal_day_event_block_longpress_callback(cal_day_event_block_h day_event_block);\r
37 \r
38 Eina_Bool cal_day_event_block_hint_clicked(cal_day_event_block_h event_block, Evas_Coord_Point *mouse_down_coord, calendar_record_h *record);\r
39 Eina_Bool cal_day_event_block_hint_longpress(cal_day_event_block_h day_event_block, Evas_Coord_Point *mouse_down_coord);\r
40 Eina_Bool cal_day_event_block_hint_quit_event_moveable_state(cal_day_event_block_h day_event_block, Evas_Coord_Point *mouse_down_coord);\r
41 \r
42 void cal_day_event_block_get_moveable_event_objects(cal_day_event_block_h day_event_block, Evas_Object **moveable_event, Evas_Object **moveable_event_border);\r
43 void cal_day_event_block_get_moveable_event_geometry(cal_day_event_block_h day_event_block, Evas_Coord_Rectangle *event_r, Evas_Coord_Rectangle *event_b_r);\r
44 void cal_day_event_block_get_moveable_event_state(cal_day_event_block_h day_event_block, Eina_Bool *is_magnify_bottom_down, Eina_Bool *is_magnify_top_down);\r
45 int cal_day_event_block_get_moveable_event_original_line_index(cal_day_event_block_h day_event_block);\r
46 void cal_day_event_block_update_moveable_event(cal_day_event_block_h day_event_block, int line_index, int height);\r
47 void cal_day_event_block_moving_moveable_event(cal_day_event_block_h day_event_block, Evas_Coord_Point *mouse_move_coord, Evas_Coord_Point *mouse_down_coord, cal_day_event_block_moving_event_cb callback, void *usr_data, Evas_Coord time_block_y, Evas_Coord time_block_h);\r
48 \r
49 cal_day_event_block_h cal_day_event_block_create();\r
50 \r
51 #endif\r