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://www.tizenopensource.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.
22 #include <Elementary.h>
23 #include <appcore-efl.h>
25 #include <vconf-keys.h>
27 #include <alarm-engine.h>
28 #include <mm_session_private.h>
29 #include <mm_message.h>
30 #include <mm_player.h>
35 #include <Ecore_File.h>
36 #include <ui-gadget.h>
37 #include <ui-gadget-module.h>
38 #include "alarm_lib.h"
39 #include "alarm_define.h"
40 #include "alarm_fwk_db.h"
41 #include "alarm_fwk_alarmmgr.h"
42 #include "alarm_fwk_genlist.h"
43 #include "alarm_fwk_icu.h"
44 #include "clock_fwk_sound.h"
45 #include "clock_fwk_view.h"
46 #include "alarm_fwk_widget.h"
47 /**********************************************************************
48 ******************define, struct ,typedef, union, enum, global val *************************************
49 ***********************************************************************/
51 //******************typedef *************************************
52 typedef struct _genlist_view genlist_view;
53 typedef struct _delete_view delete_view;
54 typedef struct _setting_view setting_view;
55 typedef struct _snooze_view snooze_view;
56 //typedef struct appdata appdata;
58 //******************enum *************************************
60 PAGE_ALARM_GENLIST = 0x01,
69 TYPE_ENTER_PG_SETTING_NORMAL = 0,
70 TYPE_ENTER_PG_SETTING_MORNINGCALL,
71 TYPE_ENTER_PG_SETTING_MAX,
72 } TYPE_ENTER_PG_SETTING;
73 //******************struct *************************************
76 struct _genlist_view {
77 Evas_Object *eo_parent; //parent
78 Evas_Object *eo_navibar; //navi_bar
79 Elm_Object_Item *ei_naviframe;
80 Evas_Object *eo_controlbar; //controlbar
81 Evas_Object *eo_btn_lft, *eo_btn_rht; //button
82 Elm_Object_Item *eci_btn_lft, *eci_btn_rht;
83 Evas_Object *eo_btn_back; //button back
84 Evas_Object *eo_layout; //layout
85 Evas_Object *eo_content; //content
87 Evas_Object *eo_genlist; //genlist
88 Evas_Object *eo_noalarm; //noalarm
89 int total_number; //total number
93 Evas_Object *eo_parent; //parent
94 Evas_Object *eo_navibar; //navi_bar
95 Elm_Object_Item *ei_naviframe;
96 Evas_Object *eo_controlbar; //controlbar
97 Evas_Object *eo_btn_lft, *eo_btn_rht; //button
98 Elm_Object_Item *eci_btn_lft, *eci_btn_rht;
99 Evas_Object *eo_btn_back; //button back
100 Evas_Object *eo_layout; //layout
101 Evas_Object *eo_content; //content
103 Evas_Object *eo_selectall_ly; //selectall
104 Evas_Object *eo_selectall_chk; //selectall
105 Evas_Object *eo_genlist; //genlist
106 int total_number; //total number
107 int chk_number; //check number
108 Eina_Bool bSelectAll; //select all is selected
110 Evas_Object *eo_notify_ly; //layout for notify
111 Evas_Object *eo_notify; //notify
114 struct _setting_view {
115 Evas_Object *eo_parent; //parent
116 Evas_Object *eo_navibar; //navi_bar
117 Elm_Object_Item *ei_naviframe; //naviframe
118 Evas_Object *eo_controlbar; //controlbar
119 Evas_Object *eo_btn_lft; //save button on the top
120 Evas_Object *eo_btn_rht; //cancel button on the top
121 Elm_Object_Item *eci_btn_lft; // save button on the bottom
122 Elm_Object_Item *eci_btn_rht; //cancel button on the bottom
123 Evas_Object *eo_btn_back; //button back
124 Evas_Object *eo_layout; //layout
125 Evas_Object *eo_content; //content
126 Evas_Object *eo_genlist; //genlist
127 Evas_Object *eo_conform; //conform
130 Evas_Object *eo_datefield;
131 Elm_Object_Item *item_time;
133 Elm_Object_Item *item_repeat;
135 Elm_Object_Item *item_snooze;
136 Elm_Object_Item *item_snooze_setting;
138 Evas_Object *eo_name_editfield;
139 Evas_Object *eo_name_entry;
140 Ecore_IMF_Context *imf_name;
141 Elm_Object_Item *item_name;
143 Evas_Object *eo_type_radiogroup;
144 clk_sound_mgr_t *pSoundMgrForType;
145 Elm_Object_Item *item_type;
147 Ecore_File_Monitor *pFileMonitor;
148 struct ui_gadget *gadget;
149 Evas_Object *eo_ug_ly_effect; //for ug effect
150 Elm_Object_Item *item_tone;
152 Evas_Object *eo_volume_slider, *eo_volume_sub, *eo_volume_add;
153 clk_sound_mgr_t *pSoundMgrForVolume;
154 Elm_Object_Item *item_volume;
157 struct _snooze_view {
158 Evas_Object *eo_parent; //parent
159 Evas_Object *eo_navibar; //navi_bar
160 Elm_Object_Item *ei_naviframe;
161 //Evas_Object *eo_controlbar; //controlbar
162 //Evas_Object *eo_btn_lft, *eo_btn_rht; //button
163 Evas_Object *eo_btn_back; //button back
164 Evas_Object *eo_layout; //layout
165 Evas_Object *eo_content; //content
167 Evas_Object *eo_genlist; //genlist
169 Evas_Object *eo_radiogroup_duration; //radiogroup for duration
170 Elm_Object_Item *item_duration;
172 Evas_Object *eo_radiogroup_repeat; //radiogroup for repeat
173 Elm_Object_Item *item_repeat;
179 Evas_Object *win_main;
181 Evas_Object *layout_main;
185 Evas_Object *navi_bar;
186 alarm_set_controlbar_visible alarmapp_controlbar_cb;
188 Eina_Bool is_new; //is a new alarm or not, for enter setting view
189 Eina_Bool is_alarm; //clock current view is alarm
190 int time_format; //VCONFKEY_TIME_FORMAT_12/VCONFKEY_TIME_FORMAT_24
191 TYPE_CURRENT_PAGE page; //current view page
192 TYPE_ENTER_PG_SETTING type_enter_pg_setting; //enum TYPE_ENTER_PG_SETTING
194 genlist_view *view_genlist;
195 delete_view *view_delete;
196 setting_view *view_setting;
197 snooze_view *view_snooze;
200 extern clk_view alarm_view_delete;
201 extern clk_view alarm_view_genlist;
202 extern clk_view alarm_view_setting;
203 extern clk_view alarm_view_snooze;
205 #endif /* __ALARM_H__ */