'ttrace',
],
},
- 'conditions': [
- ['tizen_feature_web_ime_support == 1', {
- 'defines': ['IME_FEATURE_SUPPORT'],
- }],
- ['tizen_feature_watch_face_support == 1', {
- 'defines': ['WATCH_FACE_FEATURE_SUPPORT'],
- }],
- ],
'direct_dependent_settings': {
'libraries': [
'-lxwalk_tizen_common',
#define TIZEN_FEATURE_rotary_event_support \
(common::getProfile() & ((common::kPROFILE_WEARABLE)))
#define TIZEN_FEATURE_display_resize_support \
- (common::getProfile() & ((common::kPROFILE_WEARABLE)))
+ (common::getProfile() & ((common::kPROFILE_WEARABLE)))
+#define TIZEN_FEATURE_model_formfactor_circle \
+ (common::getProfile() & ((common::kPROFILE_WEARABLE)))
extern enum _profile getProfile(void);
BuildRequires: pkgconfig(ttrace)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(vc-webview)
-
-%define chromium_efl_workaround_ewk_settings 0
-
-%if "%{?profile}" == "mobile"
-%define tizen_feature_rotary_event_support 0
-%define tizen_feature_web_ime_support 0
-%define tizen_feature_watch_face_support 0
-%endif
-
-%if "%{?profile}" == "wearable"
-%define tizen_feature_rotary_event_support 1
-%define tizen_feature_web_ime_support 1
-%define tizen_feature_watch_face_support 1
-%define chromium_efl_workaround_ewk_settings 1
-%endif
-
-%if "%{?profile}" == "tv"
-%define tizen_feature_rotary_event_support 0
-%define tizen_feature_web_ime_support 1
-%define tizen_feature_watch_face_support 0
-%endif
-
-# If it is unified environment.
-%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-%define tizen_feature_rotary_event_support 1
-%define tizen_feature_web_ime_support 1
-%define tizen_feature_watch_face_support 1
-%endif
-
-# In "unified" build environment, where "profile" is none of mobile/wearable/tv/common/ivi, but a new value or undefined,
-# all the "feature"s are to be supported and be activated selectively at runtime/inittime.
-# (the profile is probed at runtime)
-
-# tizen_feature_rotary..._support (==> platform_info / wearable)
-# tizen_feature_web_ime_support (==> platform_info / wearable || TV)
-# tizen_feature_watch_face_support (==> platform_info / wearable)
-# tizen_feature_manual_rotate_support (==> platform_info / mobile)
-
-%if 0%{?tizen_feature_web_ime_support}
BuildRequires: pkgconfig(capi-ui-inputmethod)
-%endif
-
-%if 0%{?tizen_feature_watch_face_support}
BuildRequires: pkgconfig(capi-appfw-watch-application)
BuildRequires: pkgconfig(appcore-watch)
-%endif
-
Requires: /usr/bin/systemctl
%endif
# Feature flags
-# TODO: in unified environment, the following feature flags are useless (always on)
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_rotary_event_support=%{?tizen_feature_rotary_event_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_ime_support=%{?tizen_feature_web_ime_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_watch_face_support=%{?tizen_feature_watch_face_support}"
-# Not required anymore
-#GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_manual_rotate_support=%{?tizen_feature_manual_rotate_support}"
-
# Extension Path
GYP_OPTIONS="$GYP_OPTIONS -Dextension_path=%{extension_path}"
# Injected bundle
GYP_OPTIONS="$GYP_OPTIONS -Dinjected_bundle_path=%{injected_bundle_path}"
-# Chromium-EFL generated CAPI header files differently per profile.
-# Until they are unified a function "ewk_settings_form_candidate_data_enabled_set()" cannot be used for wearable.
-# Therefore, until chromium-efl gets refactored to emit devel packages equally for every profile, let's keep this.
-GYP_OPTIONS="$GYP_OPTIONS -Dchromium_efl_workaround_ewk_settings=%{chromium_efl_workaround_ewk_settings}"
-
# Tizen product tv
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_product_tv=%{!?TIZEN_PRODUCT_TV:0}"
GYP_OPTIONS_BASE="$GYP_OPTIONS"
# TODO: do not use model_build_feature.
-GYP_OPTIONS="$GYP_OPTIONS_BASE -Dtizen_model_formfactor=rectangle"
echo "PROFILE = %{?profile}"
# If it is unified or wearable, create circular-display extension
%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
# TODO: do not use model_build_feature.
-GYP_OPTIONS="$GYP_OPTIONS_BASE -Dtizen_model_formfactor=circle"
mkdir -p build_circle
./tools/gyp/gyp $GYP_OPTIONS xwalk_tizen.gyp
ninja -C out/Default %{?_smp_mflags}
#include "runtime/browser/native_watch_window.h"
#include "common/logger.h"
-#include <watch_app_efl.h>
+#include <appcore-watch/watch_app_efl.h>
#include <Elementary.h>
namespace runtime {
#include "runtime/browser/popup.h"
#include "common/logger.h"
+#include "common/platform_info.h"
#include "runtime/browser/native_window.h"
#include "runtime/browser/popup_string.h"
#include "runtime/common/constants.h"
const char* kWRTEdjePath = "/usr/share/edje/xwalk/xwalk_tizen.edj";
-#ifdef MODEL_FORMFACTOR_CIRCLE
const char* kWRTIconDeletePath = "/usr/share/icons/xwalk/tw_ic_popup_btn_delete.png";
const char* kWRTIconCheckPath = "/usr/share/icons/xwalk/tw_ic_popup_btn_check.png";
const char* kLayoutTheme = "content/circle/buttons2";
-const char* kContentTitle = "elm.text.title";
-const char* kContentText = "elm.text";
-
-const char* kStylePopup = "circle";
-const char* kStyleCheck = "small";
-const char* kStyleButtonLeft = "popup/circle/left";
-const char* kStyleButtonRight = "popup/circle/right";
-#else
-const char* kContentTitle = "title,text";
-const char* kContentText = NULL;
-
-const char* kStylePopup = "default";
-const char* kStyleCheck = "default";
-const char* kStyleButtonLeft = "popup";
-const char* kStyleButtonRight = "popup";
-#endif // MODEL_FORMFACTOR_CIRCLE
+const char* kContentTitle = TIZEN_FEATURE_model_formfactor_circle ? "elm.text.title" : "title,text";
+const char* kContentText = TIZEN_FEATURE_model_formfactor_circle ? "elm.text" : NULL;
+
+const char* kStylePopup = TIZEN_FEATURE_model_formfactor_circle ? "circle" : "default";
+const char* kStyleCheck = TIZEN_FEATURE_model_formfactor_circle ? "small" : "default";
+const char* kStyleButtonLeft = TIZEN_FEATURE_model_formfactor_circle ? "popup/circle/left" : "popup";
+const char* kStyleButtonRight = TIZEN_FEATURE_model_formfactor_circle ? "popup/circle/right" : "popup";
const char* kContentButton1 = "button1";
const char* kContentButton2 = "button2";
elm_object_part_content_set(popup->popup(), content, btn);
evas_object_smart_callback_add(btn, kStateClicked,
ButtonClickedCallback, popup);
-#ifdef MODEL_FORMFACTOR_CIRCLE
- Evas_Object* icon = elm_image_add(btn);
- if (!strcmp(content, kContentButton1)) {
- elm_image_file_set(icon, kWRTIconDeletePath, NULL);
- } else {
- elm_image_file_set(icon, kWRTIconCheckPath, NULL);
+ if (TIZEN_FEATURE_model_formfactor_circle) {
+ Evas_Object* icon = elm_image_add(btn);
+ if (!strcmp(content, kContentButton1)) {
+ elm_image_file_set(icon, kWRTIconDeletePath, NULL);
+ } else {
+ elm_image_file_set(icon, kWRTIconCheckPath, NULL);
+ }
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn, "elm.swallow.content", icon);
+ evas_object_show(icon);
}
- evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_content_set(btn, "elm.swallow.content", icon);
- evas_object_show(icon);
-#endif // MODEL_FORMFACTOR_CIRCLE
return btn;
}
Evas_Object* check = elm_check_add(parent);
elm_object_style_set(check, kStyleCheck);
evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
-#ifndef MODEL_FORMFACTOR_CIRCLE
- elm_object_style_set(check, "multiline");
-#endif // MODEL_FORMFACTOR_CIRCLE
+ if (!TIZEN_FEATURE_model_formfactor_circle)
+ elm_object_style_set(check, "multiline");
elm_check_state_set(check, EINA_TRUE);
return check;
}
elm_object_style_set(popup, kStylePopup);
Evas_Object* layout = elm_layout_add(popup);
-#ifdef MODEL_FORMFACTOR_CIRCLE
- elm_layout_theme_set(layout, "layout", "popup", kLayoutTheme);
- elm_object_content_set(popup, layout);
+ Evas_Object* box;
+ if (TIZEN_FEATURE_model_formfactor_circle) {
+ elm_layout_theme_set(layout, "layout", "popup", kLayoutTheme);
+ elm_object_content_set(popup, layout);
- Evas_Object* box = elm_box_add(layout);
-#else
- Evas_Object* box = elm_box_add(popup);
-#endif // MODEL_FORMFACTOR_CIRCLE
+ box = elm_box_add(layout);
+ } else {
+ box = elm_box_add(popup);
+ }
elm_box_padding_set(box, 0, 10);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
-#ifdef MODEL_FORMFACTOR_CIRCLE
- elm_object_part_content_set(layout, "elm.swallow.content", box);
-#else
- elm_object_part_content_set(popup, "default", box);
-#endif // MODEL_FORMFACTOR_CIRCLE
+ if (TIZEN_FEATURE_model_formfactor_circle)
+ elm_object_part_content_set(layout, "elm.swallow.content", box);
+ else
+ elm_object_part_content_set(popup, "default", box);
evas_object_show(box);
evas_object_event_callback_add(popup, EVAS_CALLBACK_RESIZE, NULL, NULL);
kTextDomainRuntime,
str_id.c_str());
}
-#ifdef MODEL_FORMFACTOR_CIRCLE
- elm_object_part_content_set(box_, "elm.swallow.checkbox", check_box_);
- evas_object_size_hint_min_set(check_box_, 0, 80);
-#endif // MODEL_FORMFACTOR_CIRCLE
+ if (TIZEN_FEATURE_model_formfactor_circle) {
+ elm_object_part_content_set(box_, "elm.swallow.checkbox", check_box_);
+ evas_object_size_hint_min_set(check_box_, 0, 80);
+ }
elm_box_pack_end(box_, check_box_);
evas_object_show(check_box_);
}
void Popup::SetTitle(const std::string& str_id) {
elm_object_domain_translatable_part_text_set(
-#ifdef MODEL_FORMFACTOR_CIRCLE
- layout_,
-#else
- popup_,
-#endif // MODEL_FORMFACTOR_CIRCLE
+ TIZEN_FEATURE_model_formfactor_circle ? layout_ : popup_,
kContentTitle,
kTextDomainRuntime,
str_id.c_str());
elm_entry_utf8_to_markup(str_id.c_str()));
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-#ifdef MODEL_FORMFACTOR_CIRCLE
- evas_object_color_set(label, 255, 255, 255, 255);
- elm_object_part_content_set(box_, "elm.swallow.label", label);
-#else
- evas_object_color_set(label, 0, 0, 0, 255);
-#endif // MODEL_FORMFACTOR_CIRCLE
+ if (TIZEN_FEATURE_model_formfactor_circle) {
+ evas_object_color_set(label, 255, 255, 255, 255);
+ elm_object_part_content_set(box_, "elm.swallow.label", label);
+ } else {
+ evas_object_color_set(label, 0, 0, 0, 255);
+ }
elm_box_pack_end(box_, label);
evas_object_show(label);
}
#include "runtime/common/constants.h"
#include "runtime/browser/runtime.h"
#include "runtime/browser/ui_runtime.h"
-#ifdef IME_FEATURE_SUPPORT
#include "runtime/browser/ime_runtime.h"
-#endif // IME_FEATURE_SUPPORT
-#ifdef WATCH_FACE_FEATURE_SUPPORT
#include "runtime/browser/watch_runtime.h"
-#endif // WATCH_FACE_FEATURE_SUPPORT
#define MAIN_LOOP_INTERVAL 1
std::unique_ptr<Runtime> Runtime::MakeRuntime(
common::ApplicationData* app_data) {
- if (app_data->app_type() == common::ApplicationData::UI) {
- return std::unique_ptr<Runtime>(new UiRuntime(app_data));
- }
-#ifdef IME_FEATURE_SUPPORT
- else if (TIZEN_FEATURE_web_ime_support &&
- app_data->app_type() == common::ApplicationData::IME) {
+ if (TIZEN_FEATURE_web_ime_support &&
+ app_data->app_type() == common::ApplicationData::IME) {
return std::unique_ptr<Runtime>(new ImeRuntime(app_data));
- }
-#endif // IME_FEATURE_SUPPORT
-#ifdef WATCH_FACE_FEATURE_SUPPORT
- else if (TIZEN_FEATURE_watch_face_support &&
- app_data->app_type() == common::ApplicationData::WATCH) {
+ } else if (TIZEN_FEATURE_watch_face_support &&
+ app_data->app_type() == common::ApplicationData::WATCH) {
return std::unique_ptr<Runtime>(new WatchRuntime(app_data));
- }
-#endif // WATCH_FACE_FEATURE_SUPPORT
- else {
+ } else {
return std::unique_ptr<Runtime>(new UiRuntime(app_data));
}
}
* limitations under the License.
*/
-#include <watch_app.h>
-
#include <memory>
#include <string>
#define XWALK_RUNTIME_BROWSER_WATCH_RUNTIME_H_
#include <app.h>
-#include <watch_app.h>
+#include <appcore-watch/watch_app.h>
#include <string>
#include "common/application_data.h"
#include "runtime/browser/web_application.h"
#include <app.h>
+#include <appcore-watch/watch_app.h>
#include <aul.h>
#include <cynara-client.h>
#include <Ecore.h>
#include <sstream>
#include <vector>
-#ifdef WATCH_FACE_FEATURE_SUPPORT
-#include <watch_app.h>
-#endif
-
#include "common/application_data.h"
#include "common/app_db.h"
#include "common/app_control.h"
is_window_inactive_(false),
ewk_context_(
ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH)),
- firstframe_delay_timer_(NULL),
has_ownership_of_ewk_context_(true),
window_(window),
appid_(app_data->app_id()),
app_data_(app_data),
- locale_manager_(new common::LocaleManager()) {
+ locale_manager_(new common::LocaleManager()),
+ firstframe_delay_timer_(NULL) {
Initialize();
}
is_close_page_called_(false),
is_window_inactive_(false),
ewk_context_(context),
- firstframe_delay_timer_(NULL),
has_ownership_of_ewk_context_(false),
window_(window),
appid_(app_data->app_id()),
app_data_(app_data),
- locale_manager_(new common::LocaleManager()) {
+ locale_manager_(new common::LocaleManager()),
+ firstframe_delay_timer_(NULL) {
Initialize();
}
InitPopupWaitCallback();
InitUsermediaCallback();
InitEditorClientImeCallback();
-#ifdef ROTARY_EVENT_FEATURE_SUPPORT
if (TIZEN_FEATURE_rotary_event_support)
InitRotaryEventCallback();
-#endif // ROTARY_EVENT_FEATURE_SUPPORT
Ewk_Settings* settings = ewk_view_settings_get(ewk_view_);
ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE);
// TODO: After chromium-efl is refactored to supply the same header for tizen internal package building, this condition should be removed.
// This is because chromium-efl does not declare ewk_settings_form_candidate_data_enabled_set() if it's wearable.
// Chromium-efl should declare all function for Tizen packages while unsupported functions return errorcode or 0 without doing anything.
-#ifndef CHROMIUM_EFL_WORKAROUND_EWK_SETTINGS
if (common::getProfile() != common::kPROFILE_WEARABLE)
ewk_settings_form_candidate_data_enabled_set(settings, EINA_TRUE);
-#endif
ewk_settings_default_text_encoding_name_set(settings, kDefaultEncoding);
// TODO(sngn.lee): "protocolhandler,registration,requested"
smart_callbacks_["editorclient,ime,closed"] = ime_closed_callback;
}
-#ifdef ROTARY_EVENT_FEATURE_SUPPORT
void WebViewImpl::InitRotaryEventCallback() {
auto rotary_callback = [](void* user_data,
Evas_Object*,
eext_rotary_object_event_callback_add(ewk_view_, rotary_callback, this);
eext_rotary_object_event_activated_set(ewk_view_, EINA_TRUE);
}
-#endif // ROTARY_EVENT_FEATURE_SUPPORT
std::string WebViewImpl::GetUrl() {
return std::string(ewk_view_url_get(ewk_view_));
'browser/prelauncher.cc',
'browser/preload_manager.h',
'browser/preload_manager.cc',
+ 'browser/ime_runtime.h',
+ 'browser/ime_runtime.cc',
+ 'browser/ime_application.h',
+ 'browser/ime_application.cc',
+ 'browser/native_ime_window.h',
+ 'browser/native_ime_window.cc',
+ 'browser/watch_runtime.h',
+ 'browser/watch_runtime.cc',
+ 'browser/native_watch_window.h',
+ 'browser/native_watch_window.cc',
],
'ldflags': [
'-pie',
'notification',
'launchpad',
'vc-webview',
+ 'capi-ui-inputmethod',
+ 'capi-appfw-watch-application',
+ 'appcore-watch',
],
},
'conditions': [
['tizen_product_tv == "1"', {
'defines': ['TIZEN_PRODUCT_TV'],
}],
- ['tizen_model_formfactor == "circle"', {
- 'defines': ['MODEL_FORMFACTOR_CIRCLE',
- 'DISPLAY_RESIZE_SUPPORT'],
- }],
- ['tizen_feature_rotary_event_support == 1', {
- 'defines': ['ROTARY_EVENT_FEATURE_SUPPORT'],
- }],
- ['tizen_feature_web_ime_support == 1', {
- 'defines': ['IME_FEATURE_SUPPORT'],
- 'sources': [
- 'browser/ime_runtime.h',
- 'browser/ime_runtime.cc',
- 'browser/ime_application.h',
- 'browser/ime_application.cc',
- 'browser/native_ime_window.h',
- 'browser/native_ime_window.cc',
- ],
- 'variables': {
- 'packages': [
- 'capi-ui-inputmethod',
- ],
- },
- }],
- ['tizen_feature_watch_face_support == 1', {
- 'defines': ['WATCH_FACE_FEATURE_SUPPORT'],
- 'sources': [
- 'browser/watch_runtime.h',
- 'browser/watch_runtime.cc',
- 'browser/native_watch_window.h',
- 'browser/native_watch_window.cc',
- ],
- 'variables': {
- 'packages': [
- 'capi-appfw-watch-application',
- 'appcore-watch',
- ],
- },
- }],
- ['chromium_efl_workaround_ewk_settings == 1', {
- 'defines': ['CHROMIUM_EFL_WORKAROUND_EWK_SETTINGS'],
- }],
],
}, # end of target 'xwalk_runtime'
{