2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __W_INPUT_SELECTOR_H_
18 #define __W_INPUT_SELECTOR_H_
21 #define PACKAGE "org.tizen.inputdelegator"
28 #define _(str) gettext(str)
30 #define APP_EDJ_FILE_WEARABLE "edje/wearable/w-input-selector.edj"
31 #define STT_EDJ_FILE_WEARABLE "edje/wearable/w-input-stt.edj"
33 #define APP_EDJ_FILE_MOBILE "edje/mobile/w-input-selector.edj"
34 #define STT_EDJ_FILE_MOBILE "edje/mobile/w-input-stt.edj"
36 #define APP_EDJ_FILE_TV "edje/tv/w-input-selector.edj"
37 #define STT_EDJ_FILE_TV "edje/tv/w-input-stt.edj"
39 #define LOCALEDIR "/usr/apps/org.tizen.inputdelegator/res/locale"
40 #define RESOURCEDIR "/usr/apps/org.tizen.inputdelegator/res/"
43 #include <app_control.h>
44 #include <Elementary.h>
46 #include <efl_extension.h>
52 APP_TYPE_SELECT_MODE = 1,
75 TIZEN_PROFILE_UNKNOWN = 0,
76 TIZEN_PROFILE_MOBILE = 0x1,
77 TIZEN_PROFILE_WEARABLE = 0x2,
78 TIZEN_PROFILE_TV = 0x4,
79 TIZEN_PROFILE_IVI = 0x8,
80 TIZEN_PROFILE_COMMON = 0x10,
82 extern tizen_profile_t _get_tizen_profile();
84 #define _TV (_get_tizen_profile() == TIZEN_PROFILE_TV)
87 #define _MOBILE (_get_tizen_profile() == TIZEN_PROFILE_MOBILE)
89 #if !defined(_WEARABLE)
90 #define _WEARABLE (_get_tizen_profile() == TIZEN_PROFILE_WEARABLE)
93 typedef struct appdata{
94 Evas_Object* win_main;
95 Evas_Object* layout_main;
97 Evas_Object* naviframe;
99 Eext_Circle_Surface *circle_surface;
101 app_control_h source_app_control;
106 char* shared_res_path;
112 GESTURE_MODE_DEFAULT,
118 struct _InputKeyboardData
122 string return_key_type;
124 int cursor_position_set;
126 typedef struct _InputKeyboardData InputKeyboardData;
128 struct _InputTypeData
130 char **input_type_array;
131 int input_type_array_len;
133 typedef struct _InputTypeData InputTypeData;
135 void _app_terminate(void* user_data);
136 void reply_to_sender_by_callback_for_back();
137 void reply_to_sender_by_callback(const char *value, const char *type, const char *path[], const char *cursor_pos);
138 char* get_resource_path();
139 char* get_shared_resource_path();
140 void show_gl_focus(Eina_Bool bVisible);
141 void show_popup_toast(const char *text, bool check_img);
142 void _back_to_genlist_for_selector();
143 void set_source_caller_app_id(app_control_h app_control);