blob: 4d157909a9cb008744775e70d6e5e690b2d8fb33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
/*
* Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
*
* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://floralicense.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __SAT_UI_H_
#define __SAT_UI_H_
#include <stdbool.h>
#include <Elementary.h>
#include <Ecore_IMF.h>
#include <glib.h>
#include <tapi_common.h>
#include <ITapiSat.h>
#include <TapiUtility.h>
#ifndef PREFIX
#define PREFIX "/usr/apps/org.tizen.sat-ui"
#endif
#ifdef _
#undef _
#endif
#ifdef N_
#undef N_
#endif
#define PKGNAME "sat-ui"
#define SAT_UI_PKG "org.tizen.sat-ui"
#define _(string) gettext(string)
#define dgettext_noop(s) (s)
#define N_(s) dgettext_noop(s)
#define _EDJ(o) elm_layout_edje_get(o)
#define PACKAGE PKGNAME
#define LOCALEDIR PREFIX"/res/locale"
#define ICON_PATH PREFIX"/res/images"
#define EDJ_PATH PREFIX"/res/edje"
#define EDJ_NAME EDJ_PATH"/sat-ui.edj"
#define NORMAL_LAYOUT "normal_layout"
#define TONE_FILE_PATH PREFIX"/res/media"
#define STK_BEEP_TONE TONE_FILE_PATH"/stk_tone_beep.wav"
#define STK_BUSY_TONE TONE_FILE_PATH"/stk_tone_call_busy.wav"
#define STK_DROPPED_TONE TONE_FILE_PATH"/stk_tone_call_dropped.wav"
#define STK_WAITING_TONE TONE_FILE_PATH"/stk_tone_call_waiting.wav"
#define STK_CONGESTION_TONE TONE_FILE_PATH"/stk_tone_congestion.wav"
#define STK_DIAL_TONE TONE_FILE_PATH"/stk_tone_dial.wav"
#define STK_ERROR_TONE TONE_FILE_PATH"/stk_tone_error.wav"
#define STK_NEG_ACK_TONE TONE_FILE_PATH"/stk_tone_negative_ack.wav"
#define STK_POS_ACK_TONE TONE_FILE_PATH"/stk_tone_positve_ack.wav"
#define STK_RADIO_ACK_TONE TONE_FILE_PATH"/stk_tone_radio_ack.wav"
#define STK_RINGING_TONE TONE_FILE_PATH"/stk_tone_ringing.wav"
#define HELP_ICON_FILE ICON_PATH"/67_SAT_button_icon_question.png"
#define SAT_UI_MAIN_W 720
#define SAT_UI_MAIN_H 1280
#define GET_INPUT_DURATION 30.0
#define GET_INKEY_DURATION 30.0
#define SELECT_MENU_DURATION 30.0
#define LAUNCHED_BY_MENU 0
#define LAUNCHED_BY_TELEPHONY 1
#define MAX_TEXT_LENGTH 255
#define MAX_LOCAL_BUF_SIZE 10
typedef struct {
Evas *evas;
Evas_Object *win_main;
Elm_Object_Item *navi_it;
Evas_Object *nf;
Evas_Object *layout_main;
Evas_Object *content;
Evas_Object *r_button;
Evas_Object *back_btn;
Evas_Object *help_btn;
Evas_Object *waiting_bar;
Evas_Object *popup;
Evas_Object *entry;
Eina_Bool repeat_sound;
char tone_file[100];
Ecore_Timer *timer;
Ecore_IMF_Context *imf_context;
int exec_type;
/*Handle*/
int sound_handle;
TapiHandle *tapi_handle;
/* Event Data */
void *tapi_data;
int cmd_type;
int cmd_id;
int is_immediately_resp;
/* GET INPUT */
unsigned int min;
/* Genlist item class*/
Elm_Genlist_Item_Class *itc_text_icon;
Elm_Genlist_Item_Class *itc_no_edit_text;
Elm_Genlist_Item_Class *itc_editfield_icon;
Elm_Genlist_Item_Class *itc_ok_icon;
Elm_Genlist_Item_Class *itc_help_icon;
Elm_Genlist_Item_Class *itc_2icon;
} SatUiAppData_t;
typedef struct _menu_item
{
int index;
char *text;
Evas_Object *icon;
Eina_Bool icon_is_present;
Eina_Bool help_is_present;
SatUiAppData_t *ad;
struct _menu_item *next;
} menu_item;
Evas_Object* load_edj(Evas_Object *parent, const char *file, const char *group);
char *strip_control_char(const char *src_str);
void create_popup_progressbar(SatUiAppData_t *ad);
#endif /* __SAT_UI_H_ */
|