bfd8d6e06a9db22696e781a2266c25cea1b40d30
[platform/core/uifw/inputdelegator.git] / inc / w-input-selector.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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 #ifndef __W_INPUT_SELECTOR_H_
18 #define __W_INPUT_SELECTOR_H_
19
20 #if !defined(PACKAGE)
21 #define PACKAGE "org.tizen.inputdelegator"
22 #endif
23
24 #ifdef _
25 #undef _
26 #endif
27
28 #define _(str) gettext(str)
29
30 #define APP_EDJ_FILE "edje/w-input-selector.edj"
31 #define STT_EDJ_FILE "edje/w-input-stt.edj"
32 #define LOCALEDIR       "/usr/apps/org.tizen.inputdelegator/res/locale"
33 #define RESOURCEDIR "/usr/apps/org.tizen.inputdelegator/res/"
34
35
36 #include <app_control.h>
37 #include <Elementary.h>
38 #include <Evas.h>
39 #include <efl_extension.h>
40
41 enum {
42         APP_TYPE_SELECT_MODE = 1,
43         APP_TYPE_STT,
44         APP_TYPE_EMOTICON,
45         APP_TYPE_REPLY,
46         APP_TYPE_HANDWRITING,
47         APP_TYPE_KEYBOARD,
48         APP_TYPE_KEYBOARD_FROM_SMS,
49 };
50
51 enum {
52         REPLY_APP_NORMAL = 0,
53         REPLY_APP_CONTROL,
54 };
55
56
57 typedef struct appdata{
58
59         Evas_Object* win_main;
60         Evas_Object* layout_main;
61         Evas_Object* conform;
62         Evas_Object* naviframe;
63         Evas_Object* genlist;
64         Eext_Circle_Surface *circle_surface;
65
66         app_control_h source_app_control;
67         int app_type;
68         int reply_type;
69         char* res_path;
70         char* shared_res_path;
71
72 } App_Data;
73
74
75 typedef enum
76 {
77         GESTURE_MODE_DEFAULT,
78         GESTURE_MODE_START,
79         GESTURE_MODE_FREEZE,
80         GESTURE_MODE_END,
81 } Gesture_Mode_Type;
82
83 struct _InputKeyboardData
84 {
85         char *app_id;
86         char **data_array;
87         int data_array_len;
88         char *guide_text;
89         char *default_text;
90 };
91
92 typedef struct _InputKeyboardData InputKeyboardData;
93
94
95
96 void _app_terminate(void* user_data);
97 void reply_to_sender_by_callback_for_back();
98 void reply_to_sender_by_callback(const char *value, const char *type);
99 void reply_to_sender_by_appcontrol(void *data, const char *value, const char *type);
100 char* get_resource_path();
101 char* get_shared_resource_path();
102 void show_gl_focus(Eina_Bool bVisible);
103 void show_popup_toast(const char *text, bool check_img);
104 void _back_to_genlist_for_selector();
105 void set_source_caller_app_id(app_control_h app_control);
106
107 #endif