3 * Copyright 2012 Samsung Electronics Co., Ltd
\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
9 * http://floralicense.org/license/
\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
18 #ifndef __CALENDAR_BASE_TIME_BLOCK_H__
\r
19 #define __CALENDAR_BASE_TIME_BLOCK_H__
\r
20 #include <Ecore_X.h>
\r
23 #include "base-block.h"
\r
25 #define TIME_BLOCK_SLICE_COUNT 24
\r
26 #define TIME_BLOCK_DAY_HOURS 12
\r
27 #define TIME_BLOCK_TEXT_HEIGHT 30
\r
28 #define TIME_BLOCK_EXPAND_HEIGHT 520
\r
29 #define TIME_BLOCK_CONTENT_HEIGHT 16
\r
30 #define TIME_BLOCK_CONTRACT_HEIGHT 60
\r
31 #define TIME_BLOCK_NORMAL_HEIGHT 158
\r
32 #define TIME_BLOCK_MIN_HEIGHT 16
\r
34 typedef void *cal_base_time_block_h;
\r
35 typedef void *cal_base_time_block_slice_h;
\r
37 typedef cal_base_time_block_h(* cal_base_time_block_new_func_ptr)(void *data);
\r
38 typedef void(* cal_base_time_block_delete_func_ptr)(cal_base_time_block_h base_time_block);
\r
39 typedef void(* cal_base_time_block_update_func_ptr)(cal_base_time_block_h base_time_block);
\r
42 cal_base_time_block_new_func_ptr new_func_ptr;
\r
43 cal_base_time_block_delete_func_ptr delete_func_ptr;
\r
44 cal_base_time_block_update_func_ptr update_func_ptr;
\r
45 } cal_base_time_block_operations;
\r
53 Eina_Bool hide_text;
\r
54 int slice_block_count;
\r
55 Eina_Bool is_contracted;
\r
56 } cal_base_time_block_slice;
\r
58 typedef struct cal_base_time_block{
\r
61 cal_base_block_h base_block;
\r
63 Evas_Object *parent;
\r
67 cal_base_time_block_slice time_block_slice_array[TIME_BLOCK_SLICE_COUNT];
\r
69 Evas_Object *event_block_slice_object_array[EVENT_SLICE_COUNT];
\r
71 Evas_Coord normal_height;
\r
80 cal_base_time_block_operations base_operations;
\r
81 } cal_base_time_block_s;
\r
83 cal_base_time_block_h cal_base_time_block_new(cal_base_type type, Evas_Object *parent, Evas_Object *clip, Evas_Object *clip_block, int current_hour, void *data);
\r
84 cal_base_time_block_h cal_base_time_block_create(cal_base_time_block_operations *base_operations, void *data);
\r
85 void cal_base_time_block_update(cal_base_time_block_h base_time_block);
\r
86 void cal_base_time_block_delete(cal_base_time_block_h base_time_block);
\r
87 void cal_base_time_block_move(cal_base_time_block_h base_time_block, Evas_Coord x, Evas_Coord y);
\r
88 void cal_base_time_block_resize_time_block_slices(cal_base_time_block_h base_time_block);
\r
89 void cal_base_time_block_move_event_blocks(cal_base_time_block_h base_time_block);
\r
90 void cal_base_time_block_figure_time_block_slice_block_count(cal_base_time_block_h base_time_block);
\r
91 void cal_base_time_block_clear_time_block_slice_block_count(cal_base_time_block_h base_time_block);
\r
92 void cal_base_time_block_get_geometry(cal_base_time_block_h base_time_block, Evas_Coord_Rectangle *r);
\r
93 void cal_base_time_block_move_to_time_line(cal_base_time_block_h base_time_block);
\r
94 int cal_base_time_block_get_time_block_slice_index_by_coord_point(cal_base_time_block_h base_time_block, Evas_Coord_Point *mouse_down_coord);
\r
95 void cal_base_time_block_show(cal_base_time_block_h base_time_block);
\r
96 void cal_base_time_block_hide(cal_base_time_block_h base_time_block);
\r