Tizen version check for some ecore_wl2 API 09/300409/4
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 24 Oct 2023 06:37:37 +0000 (15:37 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 27 Oct 2023 12:03:44 +0000 (21:03 +0900)
To ensure the ecore & tizen version, let we make define keyword
for tizen major version.

Change-Id: I421085f8851b80b768ad1a0ebf13edf7c0ddd910
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
build/tizen/deps-check.cmake
dali/internal/adaptor/common/application-impl.cpp
dali/internal/adaptor/tizen-wayland/framework-tizen.cpp
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
packaging/dali-adaptor.spec

index 66028c0..be3798b 100755 (executable)
@@ -246,6 +246,10 @@ ELSE()
   SET( cachePath /home/owner )
 ENDIF()
 
+IF( enable_appfw AND (enable_tizen_major_version GREATER_EQUAL 8) )
+  ADD_DEFINITIONS( -DUI_THREAD_AVAILABLE )
+ENDIF()
+
 IF( enable_appfw )
   ADD_DEFINITIONS( -DUSE_APPFW -DCOMPONENT_APPLICATION_SUPPORT)
 ENDIF()
index c5d0c23..a513be2 100644 (file)
@@ -81,8 +81,10 @@ void Application::PreInitialize(int* argc, char** argv[])
 {
   if(!gPreInitializedApplication)
   {
-    char* retEnv        = std::getenv("TIZEN_UI_THREAD");
-    bool  isUseUIThread = false;
+    bool isUseUIThread = false;
+
+#ifdef UI_THREAD_AVAILABLE
+    char* retEnv = std::getenv("TIZEN_UI_THREAD");
     if(retEnv)
     {
       std::string uiThreadEnv   = retEnv;
@@ -92,11 +94,14 @@ void Application::PreInitialize(int* argc, char** argv[])
         isUseUIThread = true;
       }
     }
+#endif
 
     Dali::TextAbstraction::FontClientPreInitialize();
     WindowData windowData;
     gPreInitializedApplication                  = new Application(argc, argv, "", Framework::NORMAL, isUseUIThread, windowData);
     gPreInitializedApplication->mLaunchpadState = Launchpad::PRE_INITIALIZED;
+
+#ifdef UI_THREAD_AVAILABLE
     if(isUseUIThread)
     {
       DALI_LOG_RELEASE_INFO("PRE_INITIALIZED with UI Threading");
@@ -104,6 +109,7 @@ void Application::PreInitialize(int* argc, char** argv[])
       gPreInitializedApplication->mUIThreadLoader->Run([&]() { gPreInitializedApplication->CreateWindow(); });
     }
     else
+#endif
     {
       DALI_LOG_RELEASE_INFO("Only PRE_INITIALIZED");
       gPreInitializedApplication->CreateWindow(); // Only create window
index ec679e3..9f9e1ff 100644 (file)
 #include <widget_base.h>
 #include <app_core_ui_base.hh>
 #include <app_event_internal.hh>
+
+#ifdef UI_THREAD_AVAILABLE
 #include <app_core_ui_thread_base.hh>
+#endif
 
 // CONDITIONAL INCLUDES
 #ifdef APPCORE_WATCH_AVAILABLE
@@ -1055,6 +1058,7 @@ struct FrameworkTizen::Impl
                           AppCoreUiBase::HINT_HW_ACC_CONTROL |
                           AppCoreUiBase::HINT_WINDOW_AUTO_CONTROL;
 
+#ifdef UI_THREAD_AVAILABLE
       // For testing UIThread model, This code turns on the UI Thread feature forcibly.
       //  ex) app_launcher -e [APPID] __K_UI_THREAD enable
       // This code doesn't change mUseUiThread in Internal::Application
@@ -1074,6 +1078,7 @@ struct FrameworkTizen::Impl
       {
         hint |= AppCoreUiBase::HINT_DUAL_THREAD;
       }
+#endif
 
       mUiAppContext = std::make_unique<UiAppContext>(hint, mFramework);
     }
@@ -1403,21 +1408,25 @@ std::string FrameworkTizen::GetRegion() const
 struct UIThreadLoader::Impl
 {
   // Constructor
-  Impl(void *data)
+  Impl(voiddata)
   {
-    mUIThreadLoader = static_cast<UIThreadLoader*>(data);
+#ifdef UI_THREAD_AVAILABLE
+    mUIThreadLoader      = static_cast<UIThreadLoader*>(data);
     mAppCoreUiThreadBase = new AppCoreUiThreadBase();
     print_log(DLOG_INFO, "DALI", "%s: %s(%d) > Create mAppCoreUiThreadBase(%p)", __MODULE__, __func__, __LINE__, mAppCoreUiThreadBase);
+#endif
   }
 
   // Destructor
   ~Impl()
   {
+#ifdef UI_THREAD_AVAILABLE
     if(mAppCoreUiThreadBase)
     {
       mAppCoreUiThreadBase->Exit();
       delete mAppCoreUiThreadBase;
     }
+#endif
   }
 
   /**
@@ -1425,8 +1434,10 @@ struct UIThreadLoader::Impl
    */
   void Run(Runner runner)
   {
+#ifdef UI_THREAD_AVAILABLE
     mAppCoreUiThreadBase->Post(runner);
     mAppCoreUiThreadBase->Run(*(mUIThreadLoader->mArgc), *(mUIThreadLoader->mArgv));
+#endif
   }
 
 private:
@@ -1434,9 +1445,11 @@ private:
   Impl(const Impl& impl);
   Impl& operator=(const Impl& impl);
 
+#ifdef UI_THREAD_AVAILABLE
   // Data
   AppCoreUiThreadBase* mAppCoreUiThreadBase;
   UIThreadLoader*      mUIThreadLoader;
+#endif
 };
 
 /**
index 52f3bd0..b3c3123 100644 (file)
@@ -25,8 +25,8 @@
 
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h>
-#include <dali/internal/window-system/common/window-system.h>
 #include <dali/internal/window-system/common/window-impl.h>
+#include <dali/internal/window-system/common/window-system.h>
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // DragAndDrop
@@ -329,7 +329,7 @@ void DragAndDropEcoreWl::CallSourceEvent(Dali::DragAndDrop::SourceEventType type
     mSourceCallback(type);
     if(type != Dali::DragAndDrop::SourceEventType::START)
     {
-       mDragWindow.Reset();
+      mDragWindow.Reset();
     }
   }
 }
@@ -412,8 +412,10 @@ void DragAndDropEcoreWl::ReceiveData(void* event)
   }
   mTargetIndex = -1;
 
-  Ecore_Wl2_Display* display      = ecore_wl2_connected_display_get(NULL);
-  Ecore_Wl2_Input*   input        = ecore_wl2_input_default_input_get(display);
+#ifdef OVER_TIZEN_VERSION_8
+  Ecore_Wl2_Display* display = ecore_wl2_connected_display_get(NULL);
+  Ecore_Wl2_Input*   input   = ecore_wl2_input_default_input_get(display);
+#endif
 
   if(mWindowTargetIndex != -1)
   {
@@ -421,11 +423,12 @@ void DragAndDropEcoreWl::ReceiveData(void* event)
     mDropWindowTargets[mWindowTargetIndex].callback(dragEvent);
     mDropWindowTargets[mWindowTargetIndex].inside = false;
   }
+#ifdef OVER_TIZEN_VERSION_8
   else if(ev->offer != ecore_wl2_dnd_selection_get(input))
   {
-    for (std::size_t i = 0; i< mDropWindowTargets.size(); i++)
+    for(std::size_t i = 0; i < mDropWindowTargets.size(); i++)
     {
-      if (ev->win == mDropWindowTargets[i].windowId)
+      if(ev->win == mDropWindowTargets[i].windowId)
       {
         Dali::DragAndDrop::DragEvent dragEvent(Dali::DragAndDrop::DragType::DROP, mWindowPosition, ev->mimetype, ev->data);
         mDropWindowTargets[i].callback(dragEvent);
@@ -433,6 +436,7 @@ void DragAndDropEcoreWl::ReceiveData(void* event)
       }
     }
   }
+#endif
 
   mWindowTargetIndex = -1;
 }
@@ -443,7 +447,7 @@ Vector2 DragAndDropEcoreWl::RecalculatePositionByOrientation(int x, int y, Dali:
   Internal::Adaptor::WindowSystem::GetScreenSize(screenWidth, screenHeight);
   int angle = DevelWindow::GetPhysicalOrientation(window);
 
-  int newX, newY;
+  int           newX, newY;
   Dali::Vector2 newPosition;
 
   if(angle == 90)
@@ -487,11 +491,11 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event)
       continue;
     }
 
-    Vector2 position      = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SCREEN_POSITION);
-    Vector2 size          = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SIZE);
+    Vector2 position = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SCREEN_POSITION);
+    Vector2 size     = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SIZE);
 
     // Recalculate Cursor by Orientation
-    Dali::Window window = Dali::DevelWindow::Get(mDropTargets[i].target);
+    Dali::Window  window = Dali::DevelWindow::Get(mDropTargets[i].target);
     Dali::Vector2 cursor = RecalculatePositionByOrientation(ev->x, ev->y, window);
 
     bool currentInside = IsIntersection(cursor.x, cursor.y, position.x, position.y, size.width, size.height);
@@ -534,9 +538,9 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event)
     }
 
     // Recalculate Cursor by Orientation
-    Dali::Window window = mDropWindowTargets[i].target;
+    Dali::Window                 window   = mDropWindowTargets[i].target;
     Dali::Window::WindowPosition position = window.GetPosition();
-    Dali::Window::WindowSize size = window.GetSize();
+    Dali::Window::WindowSize     size     = window.GetSize();
 
     bool currentInside = IsIntersection(ev->x + position.GetX(), ev->y + position.GetY(), position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight());
 
@@ -578,7 +582,7 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
   Ecore_Wl2_Event_Dnd_Drop* ev = reinterpret_cast<Ecore_Wl2_Event_Dnd_Drop*>(event);
 
   // Check the target object region
-  mTargetIndex = -1;
+  mTargetIndex       = -1;
   mWindowTargetIndex = -1;
 
   for(std::size_t i = 0; i < mDropTargets.size(); i++)
@@ -592,7 +596,7 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
     Vector2 size     = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SIZE);
 
     // Recalculate Cursor by Orientation
-    Dali::Window window = Dali::DevelWindow::Get(mDropTargets[i].target);
+    Dali::Window  window = Dali::DevelWindow::Get(mDropTargets[i].target);
     Dali::Vector2 cursor = RecalculatePositionByOrientation(ev->x, ev->y, window);
 
     // If the drop position is in the target object region, request drop data to the source object
@@ -622,15 +626,15 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
     }
 
     // Recalculate Cursor by Orientation
-    Dali::Window window = mDropWindowTargets[i].target;
+    Dali::Window                 window   = mDropWindowTargets[i].target;
     Dali::Window::WindowPosition position = window.GetPosition();
-    Dali::Window::WindowSize size = window.GetSize();
+    Dali::Window::WindowSize     size     = window.GetSize();
 
     // If the drop position is in the target object region, request drop data to the source object
     if(IsIntersection(ev->x + position.GetX(), ev->y + position.GetY(), position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight()))
     {
       mWindowTargetIndex = i;
-      mWindowPosition  = Dali::Vector2(position.GetX(), position.GetY());
+      mWindowPosition    = Dali::Vector2(position.GetX(), position.GetY());
 
       char* mimetype = (char*)eina_array_data_get(ecore_wl2_offer_mimes_get(ev->offer), 0);
       if(mimetype)
index c8b8e64..7731f85 100644 (file)
@@ -458,6 +458,7 @@ static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event)
   return ECORE_CALLBACK_PASS_ON;
 }
 
+#ifdef OVER_TIZEN_VERSION_8
 /**
  * Called when a touch motion is received.
  */
@@ -470,6 +471,7 @@ static Eina_Bool EcoreEventMouseButtonRelativeMove(void* data, int type, void* e
   }
   return ECORE_CALLBACK_PASS_ON;
 }
+#endif
 
 /**
  * Called when a touch is canceled.
@@ -484,6 +486,7 @@ static Eina_Bool EcoreEventMouseButtonCancel(void* data, int type, void* event)
   return ECORE_CALLBACK_PASS_ON;
 }
 
+#ifdef OVER_TIZEN_VERSION_8
 /**
  * Called when pointer constraints event is recevied.
  */
@@ -496,6 +499,7 @@ static Eina_Bool EcoreEventPointerConstraints(void* data, int type, void* event)
   }
   return ECORE_CALLBACK_PASS_ON;
 }
+#endif
 
 /**
  * Called when a mouse wheel is received.
@@ -1001,10 +1005,12 @@ void WindowBaseEcoreWl2::Initialize(PositionSize positionSize, Any surface, bool
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, EcoreEventMouseButtonUp, this));
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, EcoreEventMouseButtonMove, this));
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_CANCEL, EcoreEventMouseButtonCancel, this));
+#ifdef OVER_TIZEN_VERSION_8
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_RELATIVE_MOVE, EcoreEventMouseButtonRelativeMove, this));
 
   // Register pointer lock/unlock event
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_POINTER_CONSTRAINTS, EcoreEventPointerConstraints, this));
+#endif
 
   // Register Mouse wheel events
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, EcoreEventMouseWheel, this));
@@ -1356,6 +1362,7 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event)
   }
 }
 
+#ifdef OVER_TIZEN_VERSION_8
 void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast<Ecore_Event_Mouse_Relative_Move*>(event);
@@ -1375,6 +1382,7 @@ void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* e
     mMouseRelativeEventSignal.Emit(mouseRelativeEvent);
   }
 }
+#endif
 
 void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
 {
@@ -1395,6 +1403,7 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
   }
 }
 
+#ifdef OVER_TIZEN_VERSION_8
 void WindowBaseEcoreWl2::OnPointerConstraints(void* data, int type, void* event)
 {
   Ecore_Wl2_Event_Pointer_Constraints* constraintsEvent = static_cast<Ecore_Wl2_Event_Pointer_Constraints*>(event);
@@ -1408,6 +1417,7 @@ void WindowBaseEcoreWl2::OnPointerConstraints(void* data, int type, void* event)
     mPointerConstraintsSignal.Emit(position, constraintsEvent->locked, constraintsEvent->confined);
   }
 }
+#endif
 
 void WindowBaseEcoreWl2::OnMouseWheel(void* data, int type, void* event)
 {
@@ -1517,12 +1527,12 @@ void WindowBaseEcoreWl2::OnKeyDown(void* data, int type, void* event)
     GetDeviceSubclass(ecore_device_subclass_get(keyEvent->dev), deviceSubclass);
 
     bool isRepeat = false;
-#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 25)
+#ifdef OVER_TIZEN_VERSION_8
     if(keyEvent->event_flags & ECORE_EVENT_FLAG_REPEAT)
     {
       isRepeat = true;
     }
-#endif // Since ecore 1.25 version
+#endif
 
     Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass);
     keyEvent.isRepeat = isRepeat;
@@ -2279,10 +2289,12 @@ void WindowBaseEcoreWl2::MoveResize(PositionSize positionSize)
 
 void WindowBaseEcoreWl2::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
 {
+#ifdef OVER_TIZEN_VERSION_8
   DALI_LOG_RELEASE_INFO("ecore_wl2_window_layout_set, numCols[%d], numRows[%d], column[%d], row[%d], colSpan[%d], rowSpan[%d]\n", numCols, numRows, column, row, colSpan, rowSpan);
   START_DURATION_CHECK();
   ecore_wl2_window_layout_set(mEcoreWindow, numCols, numRows, column, row, colSpan, rowSpan);
   FINISH_DURATION_CHECK("ecore_wl2_window_layout_set");
+#endif
 }
 
 void WindowBaseEcoreWl2::SetClass(const std::string& name, const std::string& className)
@@ -3424,24 +3436,36 @@ void WindowBaseEcoreWl2::ExcludeInputRegion(const Rect<int>& inputRegion)
 
 bool WindowBaseEcoreWl2::PointerConstraintsLock()
 {
+#ifdef OVER_TIZEN_VERSION_8
   return ecore_wl2_window_pointer_constraints_lock_pointer(mEcoreWindow);
+#else
+  return false;
+#endif
 }
 
 bool WindowBaseEcoreWl2::PointerConstraintsUnlock()
 {
+#ifdef OVER_TIZEN_VERSION_8
   return ecore_wl2_window_pointer_constraints_unlock_pointer(mEcoreWindow);
+#else
+  return false;
+#endif
 }
 
 void WindowBaseEcoreWl2::LockedPointerRegionSet(int32_t x, int32_t y, int32_t width, int32_t height)
 {
+#ifdef OVER_TIZEN_VERSION_8
   ecore_wl2_window_locked_pointer_region_set(mEcoreWindow, x, y, width, height);
   ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
+#endif
 }
 
 void WindowBaseEcoreWl2::LockedPointerCursorPositionHintSet(int32_t x, int32_t y)
 {
+#ifdef OVER_TIZEN_VERSION_8
   ecore_wl2_window_locked_pointer_cursor_position_hint_set(mEcoreWindow, x, y);
   ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
+#endif
 }
 
 bool WindowBaseEcoreWl2::PointerWarp(int32_t x, int32_t y)
@@ -3451,13 +3475,16 @@ bool WindowBaseEcoreWl2::PointerWarp(int32_t x, int32_t y)
 
 void WindowBaseEcoreWl2::CursorVisibleSet(bool visible)
 {
+#ifdef OVER_TIZEN_VERSION_8
   ecore_wl2_window_cursor_visible_set(mEcoreWindow, visible);
+#endif
 }
 
 // Request grab key events according to the requested device subtype
 //(For now, subtype could be '0'/'11'/'12' which equals to ECORE_DEVICE_SUBCLASS_NONE/REMOCON/VIRTUAL_KEYBOARD)
 bool WindowBaseEcoreWl2::KeyboardGrab(Device::Subclass::Type deviceSubclass)
 {
+#ifdef OVER_TIZEN_VERSION_8
   Ecore_Device_Subclass ecoreDeviceSubclass;
   switch(deviceSubclass)
   {
@@ -3483,12 +3510,19 @@ bool WindowBaseEcoreWl2::KeyboardGrab(Device::Subclass::Type deviceSubclass)
     }
   }
   return ecore_wl2_window_keyboard_grab(mEcoreWindow, ecoreDeviceSubclass);
+#else
+  return false;
+#endif
 }
 
 // Request ungrab key events
 bool WindowBaseEcoreWl2::KeyboardUnGrab()
 {
+#ifdef OVER_TIZEN_VERSION_8
   return ecore_wl2_window_keyboard_ungrab(mEcoreWindow);
+#else
+  return false;
+#endif
 }
 
 void WindowBaseEcoreWl2::SetFullScreen(bool fullscreen)
index ff6105b..5b37d06 100644 (file)
@@ -55,7 +55,7 @@ static int32_t gScreenHeight = 0;
 void Initialize()
 {
   auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
-  if(frameworkFactory == nullptr || (frameworkFactory  && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
+  if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
   {
     ecore_wl2_init();
   }
@@ -135,9 +135,9 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
-
 bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
 {
+#ifdef OVER_TIZEN_VERSION_8
   auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
   if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
   {
@@ -145,10 +145,14 @@ bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
     return ecore_wl2_input_keyboard_horizontal_way_repeat_set(input, static_cast<double>(rate), static_cast<double>(delay));
   }
   return false;
+#else
+  return SetKeyboardRepeatInfo(rate, delay);
+#endif
 }
 
 bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
 {
+#ifdef OVER_TIZEN_VERSION_8
   auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
   if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
   {
@@ -161,10 +165,14 @@ bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
     return ret;
   }
   return false;
+#else
+  return GetKeyboardRepeatInfo(rate, delay);
+#endif
 }
 
 bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
 {
+#ifdef OVER_TIZEN_VERSION_8
   auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
   if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
   {
@@ -172,10 +180,14 @@ bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
     return ecore_wl2_input_keyboard_vertical_way_repeat_set(input, static_cast<double>(rate), static_cast<double>(delay));
   }
   return false;
+#else
+  return SetKeyboardRepeatInfo(rate, delay);
+#endif
 }
 
 bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 {
+#ifdef OVER_TIZEN_VERSION_8
   auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
   if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
   {
@@ -188,6 +200,9 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
     return ret;
   }
   return false;
+#else
+  return GetKeyboardRepeatInfo(rate, delay);
+#endif
 }
 
 } // namespace WindowSystem
index c80c451..ef33b04 100644 (file)
@@ -287,6 +287,11 @@ cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 %endif
 
+# Use this conditional when Tizen version is 8.x or greater
+%if 0%{?tizen_version_major} >= 8
+CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
+%endif
+
 %if 0%{?enable_debug}
 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
 %endif