summaryrefslogtreecommitdiff
path: root/lib/dialer/include/phone-dialer.h
blob: 5326e4b6f29f7dae65d3c4a9a9b40eaffa34f046 (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
/*
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.0 (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 __PHONE_DIALER_H__
#define __PHONE_DIALER_H__

#include "phone-common.h"

#define MAX_DIAL_NUMBER_FONT_SIZE		100
#define MIN_DIAL_NUMBER_FONT_SIZE		67

#define CURSOR_BEGIN    -1
#define CURSOR_END      -2

#define PH_TAG_TEXT_MAX_LEN		(PH_TEXT_MAX_LEN*2)


enum PH_DAILER_TYPES {
	PH_DAILER_NORMAL = 0,
	PH_DAILER_DURING_CALL,
	PH_DAILER_EMERGENCY
};

enum {
	CONTACT_DATA_CHAGNED = 1 << 0,
	LOG_DATA_CHAGNED = 1 << 1,
	SPEEDDIAL_DATA_CHAGNED = 1 << 2,
};

typedef enum {
	MODE_DIAL_NUMBER = 0,
	MODE_COUNTRY_CODE
} ListMode;

typedef enum {
	DASH_REAL = 1,
	DASH_PREVIEW = DASH_REAL
} DashMode;

typedef struct _InputNumber {
	char num;

	struct _InputNumber *prev;
	struct _InputNumber *next;
} InputNumber;

typedef struct {
	bool alive;
	bool success;
	bool completed;
	pthread_t thread;
	Ecore_Pipe *epipe;
} ph_thread_info;

typedef struct {
	Evas_Object *win;
	Evas_Object *layout;
	Evas_Object *entry;
	Evas_Object *navi;
	Evas_Object *genlist;
	Evas_Object *fast_index;
	Evas_Object *count_button;
	Evas_Object *count_layout;
	Evas_Object *popup;
	Ecore_Timer *search_timer;
	Ecore_Timer *dash_timer;
	Ecore_Timer *longpress_timer;
	Ecore_Timer *update_timer;
	Ecore_Timer *slide_timer;
	Ecore_Job *job;
	Ecore_Idler *search_idler;
	Ecore_Event_Handler *key_press;
	Ecore_Event_Handler *key_release;
	char *longpress_source;
	char *searched_text;
	char* selected_text;
	InputNumber number_head;
	InputNumber *number_cursor;
	int cur_mcc;
	int cur_sim_mcc;
	int cur_cc_index;
	int roaming;
	int entry_font_size;
	int count_button_status;
	int run_mode;
	int compare_N;
	int show_N;
	int searched_speed_id;
	int data_dirty_flag;
	int touch_x;
	int touch_y;
	ListMode list_mode;
	bool is_background;
	bool is_emergency;
	bool cursor_changed;
	bool is_show_items;
	bool has_focus;
	bool initialized;
	bool searching;
	bool loading;
	bool slide;
	ph_thread_info *t_info;	// load contact
	Eina_List *search_list;
	Eina_List *contact_list;
	Eina_List *speeddial_list;
	Eina_List *log_list;
	Eina_List *cc_list;
	Eina_List *cc_list_sorted;
	void *ug;
	void *child_ug;
	Elm_Theme *th;
}ph_dialer_data;

Evas_Object* phone_create_dialer_view(ph_view_info *view_info);
void phone_dialer_set_navi(Evas_Object *layout);
void phone_dialer_check_focus(Evas_Object *base);
void phone_dialer_view_reset(Evas_Object *base);
void phone_dialer_view_language_changed(Evas_Object *layout);
void phone_dialer_view_resume(Evas_Object *base);
void phone_dialer_set_background(Evas_Object *obj, bool is_background);
void phone_dialer_view_set_num(Evas_Object *layout, char *number);
void phone_dialer_view_send_key(Evas_Object *layout);

#endif   /* __PHONE_DIALER_H__ */