04f874d2663119bd6b5ace1ead30a12e23073047
[apps/core/preloaded/ug-camera-efl.git] / include / cam_ui_rotate_utils.h
1 /*\r
2  * Copyright 2012  Samsung Electronics Co., Ltd\r
3  *\r
4  * Licensed under the Flora License, Version 1.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *        http://floralicense.org/license/\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 \r
18 #ifndef __H_CAM_UI_ROTATE_UTILS_H__\r
19 #define __H_CAM_UI_ROTATE_UTILS_H__\r
20 \r
21 #include "cam.h"\r
22 \r
23 struct cam_ui_rotate_obj_params\r
24 {\r
25         Evas_Coord x, y;/*start_x, start_y*/\r
26         double degree;\r
27 \r
28         Evas_Object *obj;\r
29 };\r
30 \r
31 /**\r
32  * @brief               set @obj rotate @degree, the @obj left_top coordinate (start_x, start_y)\r
33  * @param[in]   obj     The object to be set\r
34  * @param[in]   start_x         left_top coordinate x,\r
35  * @param[in]   start_y         left_top coordinate y,\r
36  * @param[in]   degree  the rotate angle\r
37  * @return                      Operation result\r
38  * @return                      void\r
39  */\r
40 void cam_ui_rotate_utils_map_rotate(Evas_Object *obj,\r
41                                                 Evas_Coord start_x,\r
42                                                 Evas_Coord start_y,\r
43                                                 double degree);\r
44 /**\r
45  * @brief               set @obj rotate from@from_degree to @to_degree, the time is @duration\r
46  * @param[in]   obj     The object to be set\r
47  * @param[in]   from_degree     start angle\r
48  * @param[in]   to_degree       end angle\r
49  * @param[in]   duration        effect duration time\r
50  * @param[in]   cb              callback function, it will be called in the rotation end\r
51  * @param[in]   data            @cb user data.\r
52  * @return                      Operation result\r
53  * @return                      void\r
54  */\r
55 void cam_ui_rotate_utils_rotation_effect(Evas_Object *obj,\r
56                                                         float from_degree,\r
57                                                         float to_degree,\r
58                                                         double duration,\r
59                                                         void (*cb) (void *data, Elm_Transit *transit),\r
60                                                         void *data);\r
61 /**\r
62  * @brief               set @setting popup rotate,  @degree, the @obj left_top coordinate (start_x, start_y)\r
63  * @param[in]   obj     The object to be set\r
64  * @param[in]   start_x         left_top coordinate x,\r
65  * @param[in]   start_y         left_top coordinate y,\r
66  * @param[in]   degree  the rotate angle\r
67  * @return                      Operation result\r
68  * @return                      void\r
69  */\r
70 void cam_ui_rotate_utils_map_setting_popup_rotate(Evas_Object *obj,\r
71                                                                         Evas_Coord start_x,\r
72                                                                         Evas_Coord start_y,\r
73                                                                         double degree);\r
74 /**\r
75  * @brief               @data appdata, rotate the camera ui icons\r
76  * @param[in]   data    appdata\r
77  * @param[in]   duration        effect duration time\r
78  * @return                      Operation result\r
79  * @return                      void\r
80  */\r
81 gboolean cam_ui_rotate_utils_rotate_start(void *data, double duration);\r
82 /**\r
83  * @brief               set @obj,  self rotate @degree, using evas_map.\r
84  * @param[in]   obj     The object to be set\r
85  * @param[in]   degree  the rotate angle\r
86  * @return                      Operation result\r
87  * @return                      void\r
88  */\r
89 void cam_ui_rotate_utils_map_self_rotate(Evas_Object *obj,\r
90                                                         double degree);\r
91 /**\r
92  * @brief               @data appdata, rotate the camera ui:toolbar shortcust icons\r
93  * @param[in]   data    appdata\r
94  * @param[in]   duration        effect duration time\r
95  * @return                      Operation result\r
96  * @return                      void\r
97  */\r
98 gboolean cam_ui_rotate_utils_rotate_toolbar_shortcuts(void *data, double duration);\r
99 \r
100 #endif  /* __H_CAM_UI_ROTATE_UTILS_H__ */\r
101 //end file\r