BuildRequires: pkgconfig(launchpad)
BuildRequires: pkgconfig(ttrace)
+%if "%{?profile}" == "mobile"
+%define tizen_feature_rotary_event_support 0
+%endif
+
+%if "%{?profile}" == "wearable"
+%define tizen_feature_rotary_event_support 1
+%endif
+
+%if "%{?profile}" == "tv"
+%define tizen_feature_rotary_event_support 0
+%endif
+
+
Requires: /usr/bin/systemctl
%description
GYP_OPTIONS="$GYP_OPTIONS -Dbuild_type=Release"
%endif
+# Feature flags
+GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_rotary_event_support=%{?tizen_feature_rotary_event_support}"
+
# Extension Path
GYP_OPTIONS="$GYP_OPTIONS -Dextension_path=%{extension_path}"
view_stack_.front()->EvalJavascript(kSoftKeyboardScript.c_str());
}
-#ifdef PROFILE_WEARABLE
+#ifdef ROTARY_EVENT_FEATURE_SUPPORT
void WebApplication::OnRotaryEvent(WebView* /*view*/,
RotaryEventType type) {
LOGGER(DEBUG) << "OnRotaryEvent";
if (view_stack_.size() > 0 && view_stack_.front() != NULL)
view_stack_.front()->EvalJavascript(kRotaryEventScript.c_str());
}
-#endif // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
bool WebApplication::OnContextMenuDisabled(WebView* /*view*/) {
return !(app_data_->setting_info() != NULL
std::function<void(bool)> result_handler);
virtual void OnSoftKeyboardChangeEvent(
WebView* view, SoftKeyboardChangeEventValue softkeyboard_value);
-#ifdef PROFILE_WEARABLE
+#ifdef ROTARY_EVENT_FEATURE_SUPPORT
virtual void OnRotaryEvent(
WebView* view, RotaryEventType type);
-#endif // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
private:
bool Initialize();
virtual void OnSoftKeyboardChangeEvent(
WebView* /*view*/,
SoftKeyboardChangeEventValue /*softkeyboard_value*/) {}
-#ifdef PROFILE_WEARABLE
+#ifdef ROTARY_EVENT_FEATURE_SUPPORT
virtual void OnRotaryEvent(
WebView* /*view*/,
RotaryEventType /*type*/) {}
-#endif // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
};
WebView(NativeWindow* window, Ewk_Context* context);
InitPopupWaitCallback();
InitUsermediaCallback();
InitEditorClientImeCallback();
-#ifdef PROFILE_WEARABLE
+#ifdef ROTARY_EVENT_FEATURE_SUPPORT
InitRotaryEventCallback();
-#endif // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
Ewk_Settings* settings = ewk_view_settings_get(ewk_view_);
ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE);
smart_callbacks_["editorclient,ime,closed"] = ime_closed_callback;
}
-#ifdef PROFILE_WEARABLE
+#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 // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
std::string WebViewImpl::GetUrl() {
return std::string(ewk_view_url_get(ewk_view_));
void InitPopupWaitCallback();
void InitUsermediaCallback();
void InitEditorClientImeCallback();
-#ifdef PROFILE_WEARABLE
+#ifdef ROTARY_EVENT_FEATURE_SUPPORT
void InitRotaryEventCallback();
-#endif // PROFILE_WEARABLE
+#endif // ROTARY_EVENT_FEATURE_SUPPORT
NativeWindow* window_;
Ewk_Context* context_;
['profile == "wearable"', {
'defines': ['PROFILE_WEARABLE'],
}],
+ ['tizen_feature_rotary_event_support == 1', {
+ 'defines': ['ROTARY_EVENT_FEATURE_SUPPORT'],
+ }],
],
}, # end of target 'xwalk_runtime'
{