7e2afb23df97b1806fa350759ea8a92b5681acdb
[apps/home/clock.git] / timer / include / timer_lib.h
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   * 
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   * 
8   *     http://www.tizenopensource.org/license
9   * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 /**
18 * timer_lib.h is a head file of timer application.
19 * It declares interfaces which are used by Clock application.
20 *
21 * Timer has two means to run. One means is that it is a standalone application. It
22 * calls timer_view_add to create and show its view. The other means is that it is
23 * a library called by Clock application. The interface timer_view_add is also called
24 * to create and show view.
25 *
26 * Interfaces, like timer_view_add, timer_view_unload, timer_view_reload,
27 * timer_view_free, are called Clock application. Clock application calls timer_view_add
28 * to create and show view. It also calls timer_view_unload to change variable isTimerView,
29 * which indicates whether current view in Clock is timer. The timer_view_reload to reload
30 * view for timer. The timer_view_free is used to delete objects and free memory.
31 *
32 * @author           Zhou Jinhua
33 * @part              Aquila_1
34 * @group            Mobile SW1
35 * @company        SCRC
36 * @date              August 2010
37 * @see               stopwatch.c
38 */
39
40 #ifndef __DEF_TIMER_LIB_H__
41 #define __DEF_TIMER_LIB_H__
42
43 #include <Elementary.h>
44
45 //******************typedef *************************************
46 typedef int (*timer_controlbar_visible) (Eina_Bool);
47
48 /**
49 * @name           timer_view_add
50 * @decription     To create and show view for timer.
51 * @param          parent, [in], a layout in which to create and show view.
52 * @param          cb, [in], a variable to indicate whether controlbar should by shown.
53 * @return          Evas_object*, a pointer to the created view. If failed to create view, it is NULL.
54 *
55 * @remark           N/A
56 * @version          1.1
57 * @author           Zhou Jinhua
58 * @part              Aquila_1
59 * @group            Mobile SW1
60 * @company        SCRC
61 * @date              August 2010
62 */
63 EAPI Evas_Object *timer_view_add(Evas_Object *parent, Evas_Object *win,
64                                  timer_controlbar_visible cb);
65
66 /**
67 * @name           timer_view_free
68 * @decription     To delete objects and free memory used by timer.
69 * @param          obj, [in], the view that will be distroyed.
70 * @return          void
71 *
72 * @remark           N/A
73 * @version          1.1
74 * @author           Zhou Jinhua
75 * @part              Aquila_1
76 * @group            Mobile SW1
77 * @company        SCRC
78 * @date              August 2010
79 */
80 EAPI void timer_view_free(Evas_Object *obj);
81
82 /**
83 * @name           timer_view_reload
84 * @decription     To re-create view according to whether there is an actived alarm in server.
85 * @return          void
86 *
87 * @remark           N/A
88 * @version          1.1
89 * @author           Zhou Jinhua
90 * @part              Aquila_1
91 * @group            Mobile SW1
92 * @company        SCRC
93 * @date              August 2010
94 */
95 EAPI void timer_view_reload(void);
96
97 /**
98 * @name           timer_view_unload
99 * @decription     To set that current view in Clock is not timer.
100 * @return          void
101 *
102 * @remark           N/A
103 * @version          1.1
104 * @author           Zhou Jinhua
105 * @part              Aquila_1
106 * @group            Mobile SW1
107 * @company        SCRC
108 * @date              August 2010
109 */
110 EAPI void timer_view_unload(void);
111
112 #endif                          /* __DEF_TIMER_LIB_H__ */