2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
17 #ifndef __STOPWATCH_APP_COMMON_H__
18 #define __STOPWATCH_APP_COMMON_H__
21 #include <Elementary.h>
22 #include <appcore-efl.h>
24 #include <vconf-keys.h>
28 #include "stopwatch_define.h"
29 #include "stopwatch_widget.h"
30 #include "clock_fwk_widget.h"
31 #include "stopwatch_lib.h"
34 STW_STATE_TYPE_RESET = 0,
41 STW_PANEL_TYPE_WITHOUT_HOUR = 0,
42 STW_PANEL_TYPE_WITH_HOUR,
45 // define data structure for lap
47 char index[32]; // to record the index of lap record
48 char lap_data[20]; // to record the time in UI at tapping "lap" button
49 char lap_data_small[10]; // to record the small time in UI at tapping "lap" button
50 char interval_data[20]; // to record the intarval time on the time pannel
53 // define data structure for application
57 Evas_Object *layout_main; // main layout
58 Evas_Object *ly_main; // main layout of ly_main
59 Evas_Object *eo_panel; // panel
60 Evas_Object *eo_btn_lft; // lbtn
61 Evas_Object *eo_btn_rht; // rbtn
62 Evas_Object *eo_btn_back; //back button
64 Evas_Object *navi_bar;
65 Elm_Object_Item *ei_naviframe;
66 Evas_Object *parent; // a object inputed from Clock
67 STW_STATE_TYPE cur_state; //current state
68 STW_PANEL_TYPE cur_panel; //current panel
69 /* add more variables here */
71 struct timeval time_past; // record time elapsed
73 double start_time; //when start/restart
74 double elapsed_time; //
75 double last_lap_time; //
76 double last_record_time; //
77 int lap_num; // to record the number of lap records
78 Evas_Object *gl; // to point genlist object
80 Evas_Object *controlbar; // used for control bar
81 stopwatch_controlbar_visible controlbar_cb;
84 #endif /* __APP_COMMON_H__ */