From 92144f335342483cd0b17a2c3997c685cc0417c3 Mon Sep 17 00:00:00 2001 From: tscholb Date: Wed, 23 Mar 2022 15:40:59 +0900 Subject: [PATCH] Fix build error on callback of widget Widget's new keyEvent only work over tizen 7.0. For avoid build error, i added this patch Change-Id: I3ee52451e75ef1e6ca6fd64abd2c4b134d864dd2 --- .../internal/system/tizen-wayland/widget-application-impl-tizen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp b/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp index 92c7e6c..2faa238 100644 --- a/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp +++ b/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp @@ -41,6 +41,7 @@ namespace * In this API, widget framework create a new keyEvent, find the proper widget and send this event. * Finally widget framework receive feedback from widget. */ +#ifdef OVER_TIZEN_VERSION_7 bool OnKeyEventCallback(const char *id, screen_connector_event_type_e eventType, int keyCode, const char *keyName, long long cls, long long subcls, const char* identifier, long long timestamp, void *userData) { Dali::Internal::Adaptor::WidgetApplicationTizen* application = static_cast(userData); @@ -72,6 +73,7 @@ bool OnKeyEventCallback(const char *id, screen_connector_event_type_e eventType, return consumed; } +#endif int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w, int h, void* classData) { @@ -138,7 +140,9 @@ int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w Internal::Adaptor::GetImplementation(widgetInstance).OnCreate(encodedContentString, window); // connect keyEvent for widget +#ifdef OVER_TIZEN_VERSION_7 application->ConnectKeyEvent(window); +#endif return 0; } @@ -376,7 +380,9 @@ void WidgetApplicationTizen::ConnectKeyEvent(Dali::Window window) { if(!mConnectedKeyEvent) { +#ifdef OVER_TIZEN_VERSION_7 screen_connector_provider_set_key_event_cb(OnKeyEventCallback, this); +#endif mConnectedKeyEvent = true; } window.KeyEventSignal().Connect(this, &WidgetApplicationTizen::OnWindowKeyEvent); -- 2.7.4