Fix build error on callback of widget 31/272731/2
authortscholb <scholb.kim@samsung.com>
Wed, 23 Mar 2022 06:40:59 +0000 (15:40 +0900)
committertscholb <scholb.kim@samsung.com>
Wed, 23 Mar 2022 09:15:41 +0000 (18:15 +0900)
Widget's new keyEvent only work over tizen 7.0.
For avoid build error, i added this patch

Change-Id: I3ee52451e75ef1e6ca6fd64abd2c4b134d864dd2

dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp

index 92c7e6c..2faa238 100644 (file)
@@ -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<Dali::Internal::Adaptor::WidgetApplicationTizen*>(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);