Fix indentation
[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_WEARABLE "edje/wearable/w-input-selector.edj"
31 #define STT_EDJ_FILE_WEARABLE "edje/wearable/w-input-stt.edj"
32
33 #define APP_EDJ_FILE_MOBILE "edje/mobile/w-input-selector.edj"
34 #define STT_EDJ_FILE_MOBILE "edje/mobile/w-input-stt.edj"
35
36 #define LOCALEDIR       "/usr/apps/org.tizen.inputdelegator/res/locale"
37 #define RESOURCEDIR "/usr/apps/org.tizen.inputdelegator/res/"
38
39
40 #include <app_control.h>
41 #include <Elementary.h>
42 #include <Evas.h>
43 #include <efl_extension.h>
44
45 enum {
46         APP_TYPE_SELECT_MODE = 1,
47         APP_TYPE_STT,
48         APP_TYPE_EMOTICON,
49         APP_TYPE_REPLY,
50         APP_TYPE_HANDWRITING,
51         APP_TYPE_KEYBOARD,
52 };
53
54 enum {
55         REPLY_APP_NORMAL = 0,
56         REPLY_APP_CONTROL,
57 };
58
59 typedef enum {
60    TIZEN_PROFILE_UNKNOWN = 0,
61    TIZEN_PROFILE_MOBILE = 0x1,
62    TIZEN_PROFILE_WEARABLE = 0x2,
63    TIZEN_PROFILE_TV = 0x4,
64    TIZEN_PROFILE_IVI = 0x8,
65    TIZEN_PROFILE_COMMON = 0x10,
66 } tizen_profile_t;
67 extern tizen_profile_t _get_tizen_profile();
68 #if !defined(_TV)
69 #define _TV (_get_tizen_profile() == TIZEN_PROFILE_TV)
70 #endif
71 #if !defined(_MOBILE)
72 #define _MOBILE (_get_tizen_profile() == TIZEN_PROFILE_MOBILE)
73 #endif
74 #if !defined(_WEARABLE)
75 #define _WEARABLE (_get_tizen_profile() == TIZEN_PROFILE_WEARABLE)
76 #endif
77
78 typedef struct appdata{
79         Evas_Object* win_main;
80         Evas_Object* layout_main;
81         Evas_Object* conform;
82         Evas_Object* naviframe;
83         Evas_Object* genlist;
84         Eext_Circle_Surface *circle_surface;
85
86         app_control_h source_app_control;
87         int app_type;
88         int reply_type;
89         char* res_path;
90         char* shared_res_path;
91 } App_Data;
92
93
94 typedef enum
95 {
96         GESTURE_MODE_DEFAULT,
97         GESTURE_MODE_START,
98         GESTURE_MODE_FREEZE,
99         GESTURE_MODE_END,
100 } Gesture_Mode_Type;
101
102 struct _InputKeyboardData
103 {
104         char *guide_text;
105         char *default_text;
106 };
107 typedef struct _InputKeyboardData InputKeyboardData;
108
109 struct _InputTypeData
110 {
111         char **input_type_array;
112         int input_type_array_len;
113 };
114 typedef struct _InputTypeData InputTypeData;
115
116 void _app_terminate(void* user_data);
117 void reply_to_sender_by_callback_for_back();
118 void reply_to_sender_by_callback(const char *value, const char *type);
119 char* get_resource_path();
120 char* get_shared_resource_path();
121 void show_gl_focus(Eina_Bool bVisible);
122 void show_popup_toast(const char *text, bool check_img);
123 void _back_to_genlist_for_selector();
124 void set_source_caller_app_id(app_control_h app_control);
125
126 #endif