apply FSL(Flora Software License)
[apps/home/call.git] / ui / vcui-app-data.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 #ifndef _VCUI_APP_DATA_H_
19 #define _VCUI_APP_DATA_H_
20
21 typedef enum {
22         CALL_LOCK = 1,
23         CALL_UNLOCK
24 } vcui_app_lock_type_t;
25
26 typedef enum {
27         CALL_OUTGOING = 1,
28         CALL_INCOMING
29 } vcui_app_call_dirction_t;
30
31 typedef enum {
32         CALL_HOLD = 1,
33         CALL_UNHOLD
34 } vcui_app_call_status_t;
35
36 #define TIME_END_START 1
37 #define TIME_END_NO      0
38 #define TIME_END_MAX_SHOW 8
39
40 #define MY_HANDLE 252
41 #define ALL_HANDLE 253
42 #define NO_HANDLE 254
43 #define NO_STATUS 254
44
45 #define WIN_HIDE 0
46 #define WIN_SHOW 1
47
48 typedef enum {
49         VIEW_DIALLING_VIEW = 0,
50         VIEW_INCOMING_VIEW,
51         VIEW_INCOMING_LOCK_VIEW,
52         VIEW_INCALL_ONECALL_VIEW,
53         VIEW_INCALL_MULTICALL_SPLIT_VIEW,
54         VIEW_INCALL_MULTICALL_CONF_VIEW,
55         VIEW_INCALL_MULTICALL_LIST_VIEW,
56         VIEW_INCALL_KEYPAD_VIEW,
57         VIEW_ENDCALL_VIEW,
58         VIEW_MAX
59 } vcui_app_call_view_id_t;
60
61 typedef struct _appdata {
62         Evas *evas;
63         Evas_Object *win_main;
64
65         int root_w;     /**<Width of a root window */
66         int root_h;     /**<Height of a root window */
67
68         Evas_Coord touch_x;
69         Evas_Coord touch_y;
70
71         double scale_factor;
72
73         Evas_Object *actionslider;
74
75         Ecore_X_Window win;     /* key grab */
76         Ecore_X_Display *disp;  /* key grab */
77
78         Evas_Object *bg;
79
80         int full_image_type;
81         Evas_Object *full_image_eo;
82
83         int headset_status;
84         int speaker_status;
85         int mute_status;
86
87         int brecord_voice;
88         int show_flag;
89         int ball_view_hide;
90
91         struct _view_data *(*func_new[VIEW_MAX]) ();
92         struct _view_data *view_st[VIEW_MAX];
93         vcui_app_call_view_id_t view_top;
94         vcui_app_call_view_id_t view_before_top;
95         vcui_app_call_view_id_t view_before_reject_view;
96
97         Ecore_Timer *popup_delay;
98
99         Evas_Object *popup_mw;
100         Evas_Object *popup_eo;
101         Evas_Object *popup_vol_ly;
102         Evas_Object *popup_progress_eo;
103         Evas_Object *ctxpopup_eo;
104         Evas_Object *ctxpopup_radio_group_eo;
105
106         int child_is;
107
108         /* for multi split view */
109         int bswapped;
110         int bholdisleft;
111
112         /* for one-call view */
113         int beffect_needed;
114
115         /* Volume Control */
116         int bmute_ringtone;
117         int vol_key_status;
118         int vol_longpress_cnt;
119
120         int ringtone_val;
121         int voice_vol_val;
122         int bt_vol_val;
123
124         Ecore_Timer *ringtone_longpress_mute_timer;
125         Ecore_Timer *volup_key_longpress_timer;
126         Ecore_Timer *voldown_key_longpress_timer;
127
128         Evas_Object *vol_ringtone_slider_eo;
129         Evas_Object *vol_ringtone_popup_eo;
130         Ecore_Timer *vol_ringtone_popup_del_timer;
131
132         Evas_Object *vol_voice_slider_eo;
133         Evas_Object *vol_voice_popup_eo;
134         Ecore_Timer *vol_voice_popup_del_timer;
135
136         Evas_Object *vol_bt_slider_eo;
137         Evas_Object *vol_bt_popup_eo;
138         Ecore_Timer *vol_bt_popup_del_timer;
139
140         struct ui_gadget *contact_ug;
141         Evas_Object *ly;
142
143         struct vcui_ugs_array ugs_array_data;
144
145         int call_end_type;
146
147         Ecore_Event_Handler *downkey_handler;
148         Ecore_Event_Handler *upkey_handler;
149         Ecore_Event_Handler *mouse_evnt_handler;
150
151         Ecore_Timer *ticker_tm;
152 } vcui_app_call_data_t;
153
154 typedef struct _view_data {
155         vcui_app_call_view_id_t type;
156         vcui_app_call_data_t *app_data;
157
158         int (*onCreate) (struct _view_data *view_data, int param1, void *param2, void *param3);
159         int (*onUpdate) (struct _view_data *view_data, void *update_data1, void *update_data2);
160         int (*onDestroy) (struct _view_data *view_data);
161         int (*onShow) (struct _view_data *view_data);
162         int (*onHide) (struct _view_data *view_data);
163
164         Evas_Object *layout;
165         void *priv;
166 } voice_call_view_data_t;
167
168 #endif