Revert "[Tizen] Revert "Delete elementary dependency of ui_app_main"" 64/141664/1
authorminho.sun <minho.sun@samsung.com>
Tue, 1 Aug 2017 01:02:42 +0000 (10:02 +0900)
committerminho.sun <minho.sun@samsung.com>
Tue, 1 Aug 2017 01:02:50 +0000 (10:02 +0900)
This reverts commit 011527701cce1d5419b5feeafdf17080a075a800.

Change-Id: I06536ac835cfe631f001623d17c0132d08bb9a7f

adaptors/tizen/adaptor-impl-tizen.cpp
adaptors/tizen/file-3.list [new file with mode: 0644]
adaptors/tizen/framework-tizen-3.cpp [new file with mode: 0644]
adaptors/tizen/framework-tizen.cpp
build/tizen/adaptor-uv/Makefile.am [deleted file]
build/tizen/adaptor-uv/configure.ac [deleted file]
build/tizen/adaptor/Makefile.am
build/tizen/adaptor/configure.ac
packaging/dali-adaptor.spec

index 9972162..1619139 100644 (file)
@@ -19,7 +19,7 @@
 #include <adaptor-impl.h>
 
 // EXTERNAL INCLUDES
-#include <app.h>
+#include <app_common.h>
 #ifdef APPCORE_WATCH_AVAILABLE
 #include <screen_connector_provider.h>
 #include <ecore-wl-render-surface.h>
diff --git a/adaptors/tizen/file-3.list b/adaptors/tizen/file-3.list
new file mode 100644 (file)
index 0000000..116f439
--- /dev/null
@@ -0,0 +1,24 @@
+# tizen
+
+adaptor_tizen_internal_src_files = \
+  $(adaptor_tizen_dir)/adaptor-impl-tizen.cpp \
+  $(adaptor_tizen_dir)/vsync-monitor-tizen.cpp \
+  $(adaptor_tizen_dir)/tilt-sensor-impl-tizen.cpp \
+  $(adaptor_tizen_dir)/tts-player-impl-tizen.cpp
+
+# common to tizen platforms except not for mobile
+adaptor_tizen_internal_non_mobile_src_files = \
+  $(adaptor_tizen_dir)/accessibility-adaptor-impl-tizen.cpp
+
+adaptor_tizen_framework_efl_src_files = $(adaptor_tizen_dir)/framework-tizen-3.cpp
+
+adaptor_tizen_internal_egl_extension_src_files = \
+  $(adaptor_tizen_dir)/gl/egl-image-extensions-tizen.cpp
+
+adaptor_tizen_internal_native_image_src_files = \
+  $(adaptor_tizen_dir)/display-connection-impl-tizen.cpp \
+  $(adaptor_tizen_dir)/native-render-surface-tizen.cpp \
+  $(adaptor_tizen_dir)/native-image-source-impl-tizen.cpp
+
+public_api_adaptor_tizen_header_files = \
+  $(adaptor_tizen_dir)/key-grab.h
diff --git a/adaptors/tizen/framework-tizen-3.cpp b/adaptors/tizen/framework-tizen-3.cpp
new file mode 100644 (file)
index 0000000..aeb25c5
--- /dev/null
@@ -0,0 +1,466 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "framework.h"
+
+// EXTERNAL INCLUDES
+#include <app.h>
+#include <bundle.h>
+#include <Ecore.h>
+
+#include <system_info.h>
+#include <app_control_internal.h>
+#include <bundle_internal.h>
+
+// CONDITIONAL INCLUDES
+#ifdef APPCORE_WATCH_AVAILABLE
+#include <appcore-watch/watch_app.h>
+#endif
+#ifdef DALI_ELDBUS_AVAILABLE
+#include <Eldbus.h>
+#endif // DALI_ELDBUS_AVAILABLE
+
+#if defined( TIZEN_PLATFORM_CONFIG_SUPPORTED ) && TIZEN_PLATFORM_CONFIG_SUPPORTED
+#include <tzplatform_config.h>
+#endif // TIZEN_PLATFORM_CONFIG_SUPPORTED
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <callback-manager.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+#if defined(DEBUG_ENABLED)
+namespace
+{
+Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New( Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DBUS" );
+} // anonymous namespace
+#endif
+
+/**
+ * Impl to hide EFL data members
+ */
+struct Framework::Impl
+{
+// Constructor
+  Impl(void* data, Type type )
+  : mAbortCallBack( NULL ),
+    mCallbackManager( NULL ),
+    mEventCallback()
+#ifdef APPCORE_WATCH_AVAILABLE
+    , mWatchCallback()
+#endif
+  {
+    mFramework = static_cast<Framework*>(data);
+
+#ifndef APPCORE_WATCH_AVAILABLE
+    if ( type == WATCH )
+    {
+      throw Dali::DaliException( "", "Watch Application is not supported." );
+    }
+#endif
+    mApplicationType = type;
+    mCallbackManager = CallbackManager::New();
+  }
+
+  ~Impl()
+  {
+    delete mAbortCallBack;
+
+    // we're quiting the main loop so
+    // mCallbackManager->RemoveAllCallBacks() does not need to be called
+    // to delete our abort handler
+    delete mCallbackManager;
+  }
+
+  int AppMain()
+  {
+    int ret;
+
+    if (mApplicationType == NORMAL)
+    {
+      ret = AppNormalMain();
+    }
+    else
+    {
+      ret = AppWatchMain();
+    }
+    return ret;
+  }
+
+  void AppExit()
+  {
+    if (mApplicationType == NORMAL)
+    {
+      AppNormalExit();
+    }
+    else
+    {
+      AppWatchExit();
+    }
+  }
+
+
+  // Data
+  Type mApplicationType;
+  CallbackBase* mAbortCallBack;
+  CallbackManager *mCallbackManager;
+
+  Framework* mFramework;
+  app_event_handler_h handlers[5];
+  ui_app_lifecycle_callback_s mEventCallback;
+#ifdef APPCORE_WATCH_AVAILABLE
+  watch_app_lifecycle_callback_s mWatchCallback;
+#endif
+
+  static bool AppCreate(void *data)
+  {
+    return static_cast<Framework*>(data)->Create();
+  }
+
+  static void AppTerminate(void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnTerminate();
+  }
+
+  static void AppPause(void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnPause();
+  }
+
+  static void AppResume(void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnResume();
+  }
+
+  static void ProcessBundle(Framework* framework, bundle *bundleData)
+  {
+    if(bundleData == NULL)
+    {
+      return;
+    }
+
+    // get bundle name
+    char* bundleName = const_cast<char*>(bundle_get_val(bundleData, "name"));
+    if(bundleName != NULL)
+    {
+      framework->SetBundleName(bundleName);
+    }
+
+    // get bundle id
+    char* bundleId = const_cast<char*>(bundle_get_val(bundleData, "id"));
+    if(bundleId != NULL)
+    {
+      framework->SetBundleId(bundleId);
+    }
+  }
+
+  /**
+   * Called by AppCore when the application is launched from another module (e.g. homescreen).
+   * @param[in] b the bundle data which the launcher module sent
+   */
+  static void AppControl(app_control_h app_control, void *data)
+  {
+    Framework* framework = static_cast<Framework*>(data);
+    Observer *observer = &framework->mObserver;
+    bundle *bundleData = NULL;
+
+    app_control_to_bundle(app_control, &bundleData);
+    ProcessBundle(framework, bundleData);
+
+    observer->OnReset();
+    observer->OnAppControl(app_control);
+  }
+
+  int AppNormalMain()
+  {
+    int ret;
+
+    mEventCallback.create = AppCreate;
+    mEventCallback.terminate = AppTerminate;
+    mEventCallback.pause = AppPause;
+    mEventCallback.resume = AppResume;
+    mEventCallback.app_control = AppControl;
+
+    ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, AppBatteryLow, mFramework);
+    ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, AppMemoryLow, mFramework);
+    ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, AppDeviceRotated, mFramework);
+    ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
+    ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
+
+    ret = ui_app_main(*mFramework->mArgc, *mFramework->mArgv, &mEventCallback, mFramework);
+
+    return ret;
+  }
+
+  void AppNormalExit()
+  {
+      ui_app_exit();
+  }
+
+#ifdef APPCORE_WATCH_AVAILABLE
+  static bool AppCreateWatch(int width, int height, void *data)
+  {
+    return static_cast<Framework*>(data)->Create();
+  }
+
+  static void AppTimeTick(watch_time_h time, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+    WatchTime curTime(time);
+
+    observer->OnTimeTick(curTime);
+  }
+
+  static void AppAmbientTick(watch_time_h time, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+    WatchTime curTime(time);
+
+    observer->OnAmbientTick(curTime);
+  }
+
+  static void AppAmbientChanged(bool ambient, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnAmbientChanged(ambient);
+  }
+#endif
+
+  int AppWatchMain()
+  {
+    int ret = true;
+
+#ifdef APPCORE_WATCH_AVAILABLE
+    mWatchCallback.create = AppCreateWatch;
+    mWatchCallback.app_control = AppControl;
+    mWatchCallback.terminate = AppTerminate;
+    mWatchCallback.pause = AppPause;
+    mWatchCallback.resume = AppResume;
+    mWatchCallback.time_tick = AppTimeTick;
+    mWatchCallback.ambient_tick = AppAmbientTick;
+    mWatchCallback.ambient_changed = AppAmbientChanged;
+
+    watch_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, AppBatteryLow, mFramework);
+    watch_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, AppMemoryLow, mFramework);
+    watch_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
+    watch_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
+
+    ret = watch_app_main(*mFramework->mArgc, *mFramework->mArgv, &mWatchCallback, mFramework);
+#endif
+    return ret;
+  }
+
+  void AppWatchExit()
+  {
+#ifdef APPCORE_WATCH_AVAILABLE
+    watch_app_exit();
+#endif
+  }
+
+  static void AppLanguageChanged(app_event_info_h event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnLanguageChanged();
+  }
+
+  static void AppDeviceRotated(app_event_info_h event_info, void *data)
+  {
+  }
+
+  static void AppRegionChanged(app_event_info_h event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnRegionChanged();
+  }
+
+  static void AppBatteryLow(app_event_info_h event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnBatteryLow();
+  }
+
+  static void AppMemoryLow(app_event_info_h event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnMemoryLow();
+  }
+
+private:
+  // Undefined
+  Impl( const Impl& impl );
+
+  // Undefined
+  Impl& operator=( const Impl& impl );
+};
+
+Framework::Framework( Framework::Observer& observer, int *argc, char ***argv, Type type )
+: mObserver(observer),
+  mInitialised(false),
+  mRunning(false),
+  mArgc(argc),
+  mArgv(argv),
+  mBundleName(""),
+  mBundleId(""),
+  mAbortHandler( MakeCallback( this, &Framework::AbortCallback ) ),
+  mImpl(NULL)
+{
+  bool featureFlag = true;
+  system_info_get_platform_bool( "tizen.org/feature/opengles.version.2_0", &featureFlag );
+
+  if( featureFlag == false )
+  {
+    set_last_result( TIZEN_ERROR_NOT_SUPPORTED );
+  }
+#ifdef DALI_ELDBUS_AVAILABLE
+  // Initialize ElDBus.
+  DALI_LOG_INFO( gDBusLogging, Debug::General, "Starting DBus Initialization\n" );
+  eldbus_init();
+#endif
+  InitThreads();
+
+  mImpl = new Impl(this, type);
+}
+
+Framework::~Framework()
+{
+  if (mRunning)
+  {
+    Quit();
+  }
+
+#ifdef DALI_ELDBUS_AVAILABLE
+  // Shutdown ELDBus.
+  DALI_LOG_INFO( gDBusLogging, Debug::General, "Shutting down DBus\n" );
+  eldbus_shutdown();
+#endif
+
+  delete mImpl;
+}
+
+bool Framework::Create()
+{
+  mInitialised = true;
+  mObserver.OnInit();
+  return true;
+}
+
+void Framework::Run()
+{
+  mRunning = true;
+  int ret;
+
+  ret = mImpl->AppMain();
+  if (ret != APP_ERROR_NONE)
+  {
+    DALI_LOG_ERROR("Framework::Run(), ui_app_main() is failed. err = %d\n", ret);
+  }
+  mRunning = false;
+}
+
+void Framework::Quit()
+{
+  mImpl->AppExit();
+}
+
+bool Framework::IsMainLoopRunning()
+{
+  return mRunning;
+}
+
+void Framework::AddAbortCallback( CallbackBase* callback )
+{
+  mImpl->mAbortCallBack = callback;
+}
+
+std::string Framework::GetBundleName() const
+{
+  return mBundleName;
+}
+
+void Framework::SetBundleName(const std::string& name)
+{
+  mBundleName = name;
+}
+
+std::string Framework::GetBundleId() const
+{
+  return mBundleId;
+}
+
+std::string Framework::GetResourcePath()
+{
+  std::string resourcePath = "";
+#if defined( TIZEN_PLATFORM_CONFIG_SUPPORTED ) && TIZEN_PLATFORM_CONFIG_SUPPORTED
+  resourcePath = app_get_resource_path();
+#else // For backwards compatibility with older Tizen versions
+
+  // "DALI_APPLICATION_PACKAGE" is used to get the already configured Application package path.
+  const char* environmentVariable = "DALI_APPLICATION_PACKAGE";
+  char* value = getenv( environmentVariable );
+  if ( value != NULL )
+  {
+    resourcePath = value;
+  }
+#endif //TIZEN_PLATFORM_CONFIG_SUPPORTED
+
+  return resourcePath;
+}
+
+void Framework::SetBundleId(const std::string& id)
+{
+  mBundleId = id;
+}
+
+void Framework::AbortCallback( )
+{
+  // if an abort call back has been installed run it.
+  if (mImpl->mAbortCallBack)
+  {
+    CallbackBase::Execute( *mImpl->mAbortCallBack );
+  }
+  else
+  {
+    Quit();
+  }
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index aeb25c5..f437a92 100644 (file)
 #include "framework.h"
 
 // EXTERNAL INCLUDES
-#include <app.h>
+#include <appcore_ui_base.h>
+#include <app_control_internal.h>
+#include <app_common.h>
 #include <bundle.h>
 #include <Ecore.h>
 
 #include <system_info.h>
-#include <app_control_internal.h>
 #include <bundle_internal.h>
 
 // CONDITIONAL INCLUDES
@@ -60,6 +61,90 @@ Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New( Debug::N
 } // anonymous namespace
 #endif
 
+namespace AppCore
+{
+
+typedef enum
+{
+  LOW_MEMORY,                 //< The low memory event
+  LOW_BATTERY,                //< The low battery event
+  LANGUAGE_CHANGED,           //< The system language changed event
+  DEVICE_ORIENTATION_CHANGED, //< The device orientation changed event
+  REGION_FORMAT_CHANGED,      //< The region format changed event
+  SUSPENDED_STATE_CHANGED,    //< The suspended state changed event of the application
+  UPDATE_REQUESTED,           //< The update requested event. This event can occur when an app needs to be updated. It is dependent on target devices.
+} AppEventType;
+
+static int AppEventConverter[APPCORE_BASE_EVENT_MAX] =
+{
+  [LOW_MEMORY] = APPCORE_BASE_EVENT_LOW_MEMORY,
+  [LOW_BATTERY] = APPCORE_BASE_EVENT_LOW_BATTERY,
+  [LANGUAGE_CHANGED] = APPCORE_BASE_EVENT_LANG_CHANGE,
+  [DEVICE_ORIENTATION_CHANGED] = APPCORE_BASE_EVENT_DEVICE_ORIENTATION_CHANGED,
+  [REGION_FORMAT_CHANGED] = APPCORE_BASE_EVENT_REGION_CHANGE,
+  [SUSPENDED_STATE_CHANGED] = APPCORE_BASE_EVENT_SUSPENDED_STATE_CHANGE,
+};
+
+struct AppEventInfo
+{
+  AppEventType type;
+  void *value;
+};
+
+typedef struct AppEventInfo *AppEventInfoPtr;
+
+typedef void (*AppEventCallback)(AppEventInfoPtr eventInfo, void *userData);
+
+struct AppEventHandler
+{
+  AppEventType type;
+  AppEventCallback cb;
+  void *data;
+  void *raw;
+};
+
+typedef struct AppEventHandler *AppEventHandlerPtr;
+
+int EventCallback(void *event, void *data)
+{
+  AppEventHandlerPtr handler = static_cast<AppEventHandlerPtr>(data);
+
+  struct AppEventInfo appEvent;
+
+  appEvent.type = handler->type;
+  appEvent.value = event;
+
+  if (handler->cb)
+    handler->cb(&appEvent, handler->data);
+
+  return 0;
+}
+
+int AppAddEventHandler(AppEventHandlerPtr *eventHandler, AppEventType eventType, AppEventCallback callback, void *userData)
+{
+  AppEventHandlerPtr handler;
+
+  handler = static_cast<AppEventHandlerPtr>( calloc(1, sizeof(struct AppEventHandler)) );
+  if (!handler)
+  {
+    DALI_LOG_ERROR( "failed to create handler" );
+    return TIZEN_ERROR_UNKNOWN;
+  }
+  else
+  {
+    handler->type = eventType;
+    handler->cb = callback;
+    handler->data = userData;
+    handler->raw = appcore_base_add_event( static_cast<appcore_base_event>(AppEventConverter[static_cast<int>(eventType)]), EventCallback, handler);
+
+    *eventHandler = handler;
+
+    return TIZEN_ERROR_NONE;
+  }
+}
+
+} // namespace Appcore
+
 /**
  * Impl to hide EFL data members
  */
@@ -68,8 +153,7 @@ struct Framework::Impl
 // Constructor
   Impl(void* data, Type type )
   : mAbortCallBack( NULL ),
-    mCallbackManager( NULL ),
-    mEventCallback()
+    mCallbackManager( NULL )
 #ifdef APPCORE_WATCH_AVAILABLE
     , mWatchCallback()
 #endif
@@ -130,36 +214,46 @@ struct Framework::Impl
   CallbackManager *mCallbackManager;
 
   Framework* mFramework;
-  app_event_handler_h handlers[5];
-  ui_app_lifecycle_callback_s mEventCallback;
+  AppCore::AppEventHandlerPtr handlers[5];
 #ifdef APPCORE_WATCH_AVAILABLE
   watch_app_lifecycle_callback_s mWatchCallback;
+  app_event_handler_h watchHandlers[5];
 #endif
 
-  static bool AppCreate(void *data)
+  static int AppCreate(void *data)
   {
-    return static_cast<Framework*>(data)->Create();
+    appcore_ui_base_on_create();
+    return static_cast<int>( static_cast<Framework*>(data)->Create() );
   }
 
-  static void AppTerminate(void *data)
+  static int AppTerminate(void *data)
   {
+    appcore_ui_base_on_terminate();
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
     observer->OnTerminate();
+
+    return 0;
   }
 
-  static void AppPause(void *data)
+  static int AppPause(void *data)
   {
+    appcore_ui_base_on_pause();
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
     observer->OnPause();
+
+    return 0;
   }
 
-  static void AppResume(void *data)
+  static int AppResume(void *data)
   {
+    appcore_ui_base_on_resume();
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
     observer->OnResume();
+
+    return 0;
   }
 
   static void ProcessBundle(Framework* framework, bundle *bundleData)
@@ -176,7 +270,7 @@ struct Framework::Impl
       framework->SetBundleName(bundleName);
     }
 
-    // get bundle id
+    // get bundle? id
     char* bundleId = const_cast<char*>(bundle_get_val(bundleData, "id"));
     if(bundleId != NULL)
     {
@@ -188,52 +282,155 @@ struct Framework::Impl
    * Called by AppCore when the application is launched from another module (e.g. homescreen).
    * @param[in] b the bundle data which the launcher module sent
    */
-  static void AppControl(app_control_h app_control, void *data)
+  static int AppControl(bundle* bundleData, void *data)
   {
+    app_control_h appControl = NULL;
+
+    appcore_ui_base_on_control(bundleData);
+
+    if (bundleData)
+    {
+      if (app_control_create_event(bundleData, &appControl) != TIZEN_ERROR_NONE)
+      {
+        DALI_LOG_ERROR("Failed to create an app_control handle");
+      }
+    }
+    else
+    {
+      if (app_control_create(&appControl) != TIZEN_ERROR_NONE)
+      {
+        DALI_LOG_ERROR("Failed to create an app_control handle");
+      }
+    }
+
     Framework* framework = static_cast<Framework*>(data);
     Observer *observer = &framework->mObserver;
-    bundle *bundleData = NULL;
 
-    app_control_to_bundle(app_control, &bundleData);
     ProcessBundle(framework, bundleData);
 
     observer->OnReset();
-    observer->OnAppControl(app_control);
+    observer->OnAppControl(appControl);
+
+    app_control_destroy(appControl);
+
+    return 0;
   }
 
-  int AppNormalMain()
+  static int AppInit(int argc, char **argv, void *data)
   {
-    int ret;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
 
-    mEventCallback.create = AppCreate;
-    mEventCallback.terminate = AppTerminate;
-    mEventCallback.pause = AppPause;
-    mEventCallback.resume = AppResume;
-    mEventCallback.app_control = AppControl;
+    ecore_init();
+    ecore_app_args_set( argc, (const char **)argv );
 
-    ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, AppBatteryLow, mFramework);
-    ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, AppMemoryLow, mFramework);
-    ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, AppDeviceRotated, mFramework);
-    ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
-    ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
+#pragma GCC diagnostic pop
+    return 0;
+  }
 
-    ret = ui_app_main(*mFramework->mArgc, *mFramework->mArgv, &mEventCallback, mFramework);
+  static void AppFinish(void)
+  {
+    ecore_shutdown();
 
-    return ret;
+    if(getenv("AUL_LOADER_INIT"))
+    {
+      unsetenv("AUL_LOADER_INIT");
+      ecore_shutdown();
+    }
+  }
+
+  static void AppRun(void *data)
+  {
+    ecore_main_loop_begin();
+  }
+
+  static void AppExit(void *data)
+  {
+    ecore_main_loop_quit();
+  }
+
+  static void AppLanguageChanged(AppCore::AppEventInfoPtr event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnLanguageChanged();
+  }
+
+  static void AppDeviceRotated(AppCore::AppEventInfoPtr event_info, void *data)
+  {
+  }
+
+  static void AppRegionChanged(AppCore::AppEventInfoPtr event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnRegionChanged();
+  }
+
+  static void AppBatteryLow(AppCore::AppEventInfoPtr event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnBatteryLow();
+  }
+
+  static void AppMemoryLow(AppCore::AppEventInfoPtr event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnMemoryLow();
+  }
+
+
+  int AppNormalMain()
+  {
+    int ret;
+
+    AppCore::AppAddEventHandler(&handlers[AppCore::LOW_BATTERY], AppCore::LOW_BATTERY, AppBatteryLow, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::LOW_MEMORY], AppCore::LOW_MEMORY, AppMemoryLow, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::DEVICE_ORIENTATION_CHANGED], AppCore::DEVICE_ORIENTATION_CHANGED, AppDeviceRotated, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::LANGUAGE_CHANGED], AppCore::LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
+    AppCore::AppAddEventHandler(&handlers[AppCore::REGION_FORMAT_CHANGED], AppCore::REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
+
+    appcore_ui_base_ops ops = appcore_ui_base_get_default_ops();
+
+    /* override methods */
+    ops.base.create = AppCreate;
+    ops.base.control = AppControl;
+    ops.base.terminate = AppTerminate;
+    ops.pause = AppPause;
+    ops.resume = AppResume;
+    ops.base.init = AppInit;
+    ops.base.finish = AppFinish;
+    ops.base.run = AppRun;
+    ops.base.exit = AppExit;
+
+    ret = appcore_ui_base_init(ops, *mFramework->mArgc, *mFramework->mArgv, mFramework, APPCORE_UI_BASE_HINT_WINDOW_GROUP_CONTROL |
+                                                                                        APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL |
+                                                                                        APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL |
+                                                                                        APPCORE_UI_BASE_HINT_HW_ACC_CONTROL |
+                                                                                        APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL );
+
+    if (ret != TIZEN_ERROR_NONE)
+      return ret;
+
+    appcore_ui_base_fini();
+
+    return TIZEN_ERROR_NONE;
   }
 
   void AppNormalExit()
   {
-      ui_app_exit();
+    appcore_ui_base_exit();
   }
 
 #ifdef APPCORE_WATCH_AVAILABLE
-  static bool AppCreateWatch(int width, int height, void *data)
+  static bool WatchAppCreate(int width, int height, void *data)
   {
     return static_cast<Framework*>(data)->Create();
   }
 
-  static void AppTimeTick(watch_time_h time, void *data)
+  static void WatchAppTimeTick(watch_time_h time, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
     WatchTime curTime(time);
@@ -241,7 +438,7 @@ struct Framework::Impl
     observer->OnTimeTick(curTime);
   }
 
-  static void AppAmbientTick(watch_time_h time, void *data)
+  static void WatchAppAmbientTick(watch_time_h time, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
     WatchTime curTime(time);
@@ -249,77 +446,109 @@ struct Framework::Impl
     observer->OnAmbientTick(curTime);
   }
 
-  static void AppAmbientChanged(bool ambient, void *data)
+  static void WatchAppAmbientChanged(bool ambient, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
     observer->OnAmbientChanged(ambient);
   }
-#endif
 
-  int AppWatchMain()
+  static void WatchAppLanguageChanged(app_event_info_h event, void *data)
   {
-    int ret = true;
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
-#ifdef APPCORE_WATCH_AVAILABLE
-    mWatchCallback.create = AppCreateWatch;
-    mWatchCallback.app_control = AppControl;
-    mWatchCallback.terminate = AppTerminate;
-    mWatchCallback.pause = AppPause;
-    mWatchCallback.resume = AppResume;
-    mWatchCallback.time_tick = AppTimeTick;
-    mWatchCallback.ambient_tick = AppAmbientTick;
-    mWatchCallback.ambient_changed = AppAmbientChanged;
-
-    watch_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, AppBatteryLow, mFramework);
-    watch_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, AppMemoryLow, mFramework);
-    watch_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, mFramework);
-    watch_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, mFramework);
+    observer->OnLanguageChanged();
+  }
 
-    ret = watch_app_main(*mFramework->mArgc, *mFramework->mArgv, &mWatchCallback, mFramework);
-#endif
-    return ret;
+  static void WatchAppRegionChanged(app_event_info_h event, void *data)
+  {
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnRegionChanged();
   }
 
-  void AppWatchExit()
+  static void WatchAppBatteryLow(app_event_info_h event, void *data)
   {
-#ifdef APPCORE_WATCH_AVAILABLE
-    watch_app_exit();
-#endif
+    Observer *observer = &static_cast<Framework*>(data)->mObserver;
+
+    observer->OnBatteryLow();
   }
 
-  static void AppLanguageChanged(app_event_info_h event, void *data)
+  static void WatchAppMemoryLow(app_event_info_h event, void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
-    observer->OnLanguageChanged();
+    observer->OnMemoryLow();
   }
 
-  static void AppDeviceRotated(app_event_info_h event_info, void *data)
+  static void WatchAppControl(app_control_h app_control, void *data)
   {
+    Framework* framework = static_cast<Framework*>(data);
+    Observer *observer = &framework->mObserver;
+    bundle *bundleData = NULL;
+
+    app_control_to_bundle(app_control, &bundleData);
+    ProcessBundle(framework, bundleData);
+
+    observer->OnReset();
+    observer->OnAppControl(app_control);
   }
 
-  static void AppRegionChanged(app_event_info_h event, void *data)
+  static void WatchAppTerminate(void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
-    observer->OnRegionChanged();
+    observer->OnTerminate();
   }
 
-  static void AppBatteryLow(app_event_info_h event, void *data)
+  static void WatchAppPause(void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
-    observer->OnBatteryLow();
+    observer->OnPause();
   }
 
-  static void AppMemoryLow(app_event_info_h event, void *data)
+  static void WatchAppResume(void *data)
   {
     Observer *observer = &static_cast<Framework*>(data)->mObserver;
 
-    observer->OnMemoryLow();
+    observer->OnResume();
   }
 
+#endif
+
+  int AppWatchMain()
+  {
+    int ret = true;
+
+#ifdef APPCORE_WATCH_AVAILABLE
+    mWatchCallback.create = WatchAppCreate;
+    mWatchCallback.app_control = WatchAppControl;
+    mWatchCallback.terminate = WatchAppTerminate;
+    mWatchCallback.pause = WatchAppPause;
+    mWatchCallback.resume = WatchAppResume;
+    mWatchCallback.time_tick = WatchAppTimeTick;
+    mWatchCallback.ambient_tick = WatchAppAmbientTick;
+    mWatchCallback.ambient_changed = WatchAppAmbientChanged;
+
+    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, WatchAppBatteryLow, mFramework);
+    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, WatchAppMemoryLow, mFramework);
+    watch_app_add_event_handler(&watchHandlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, WatchAppLanguageChanged, mFramework);
+    watch_app_add_event_handler(&watchHandlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, WatchAppRegionChanged, mFramework);
+
+    ret = watch_app_main(*mFramework->mArgc, *mFramework->mArgv, &mWatchCallback, mFramework);
+#endif
+    return ret;
+  }
+
+  void AppWatchExit()
+  {
+#ifdef APPCORE_WATCH_AVAILABLE
+    watch_app_exit();
+#endif
+  }
+
+
 private:
   // Undefined
   Impl( const Impl& impl );
diff --git a/build/tizen/adaptor-uv/Makefile.am b/build/tizen/adaptor-uv/Makefile.am
deleted file mode 100644 (file)
index 07d093f..0000000
+++ /dev/null
@@ -1,602 +0,0 @@
-#
-# Copyright (c) 2014 Samsung Electronics Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Build the Dali Adaptor library
-
-
-############# INCLUDE FILE LISTS #############
-
-# Base Adaptor
-base_adaptor_src_dir = ../../../adaptors/base
-include ../../../adaptors/base/file.list
-
-# Platform Abstraction
-tizen_platform_abstraction_src_dir = ../../../platform-abstractions/tizen
-portable_platform_abstraction_src_dir = ../../../platform-abstractions/portable
-include ../../../platform-abstractions/tizen/file.list
-
-# Text Abstraction
-text_src_dir = ../../../text
-include ../../../text/file.list
-
-# Integration
-adaptor_integration_api_dir = ../../../adaptors/integration-api
-include ../../../adaptors/integration-api/file.list
-
-# Internal Common
-adaptor_common_dir = ../../../adaptors/common
-include ../../../adaptors/common/file.list
-
-if USE_EFL
-# ECore Common
-adaptor_ecore_common_dir = ../../../adaptors/ecore/common
-include ../../../adaptors/ecore/common/file.list
-else
-# If we're not using any EFL, then we need to use libuv mainloop
-# for the frame work
-adaptor_libuv_dir = ../../../adaptors/libuv
-include ../../../adaptors/libuv/file.list
-endif
-
-# Wayland
-if WAYLAND
-if USE_EFL
-## Use ecore_wayland
-adaptor_ecore_wayland_dir = ../../../adaptors/ecore/wayland
-include ../../../adaptors/ecore/wayland/file.list
-else
-## Use wayland
-adaptor_wayland_dir = ../../../adaptors/wayland
-include ../../../adaptors/wayland/file.list
-endif
-else
-# X11
-adaptor_x11_dir = ../../../adaptors/x11
-include ../../../adaptors/x11/file.list
-endif
-
-# Ubuntu
-if UBUNTU_PROFILE
-adaptor_ubuntu_dir = ../../../adaptors/ubuntu
-include ../../../adaptors/ubuntu/file.list
-else
-# Tizen
-adaptor_tizen_dir = ../../../adaptors/tizen
-include ../../../adaptors/tizen/file.list
-endif
-
-# Mobile
-adaptor_mobile_dir = ../../../adaptors/mobile
-include ../../../adaptors/mobile/file.list
-
-# TV
-if TV_PROFILE
-adaptor_tv_dir = ../../../adaptors/tv
-include ../../../adaptors/tv/file.list
-endif
-
-# Public API
-adaptor_public_api_dir = ../../../adaptors/public-api
-include ../../../adaptors/public-api/file.list
-
-# Devel API ( for use by Toolkit)
-adaptor_devel_api_dir = ../../../adaptors/devel-api
-include ../../../adaptors/devel-api/file.list
-
-
-# Static libraries
-static_libraries_libunibreak_src_dir = ../../../text/dali/internal/libunibreak
-include ../../../text/dali/internal/libunibreak/file.list
-
-static_libraries_image_resampler_src_dir = ../../../third-party/image-resampler
-include ../../../third-party/image-resampler/file.list
-
-# Package doc
-package_doxy_dir = ../../../doc
-include ../../../doc/file.list
-
-############# source files #############
-
-# FRAMEWORK FILES for adaptor
-# Either use ecore mainloop +  appcore / uiman
-# Or libuv main loop with no appcore / uimain
-if USE_EFL
-adaptor_internal_src_files = $(adaptor_tizen_framework_efl_src_files) \
-                             $(adaptor_ecore_common_internal_src_files)
-else
-adaptor_internal_src_files = $(adaptor_tizen_framework_libuv_src_files)
-endif
-
-# COMMON
-if COMMON_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                              $(adaptor_common_internal_default_profile_src_files) \
-                              $(adaptor_tizen_internal_src_files) \
-                              $(adaptor_tizen_internal_non_mobile_src_files) \
-                              $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files) \
-                              $(adaptor_ecore_wayland_internal_default_profile_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
-                              $(adaptor_tizen_internal_native_image_src_files)
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
-                              $(adaptor_common_internal_egl_extension_src_files) \
-                              $(adaptor_x11_internal_default_profile_src_files)
-endif # WAYLAND
-endif # COMMON_PROFILE
-
-
-# UBUNTU
-if UBUNTU_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                             $(adaptor_common_internal_default_profile_src_files) \
-                             $(adaptor_ubuntu_internal_src_files) \
-                             $(adaptor_x11_ubuntu_internal_src_files) \
-                             $(adaptor_x11_internal_default_profile_src_files) \
-                             $(static_libraries_libunibreak_src_files) \
-                             $(adaptor_common_internal_egl_extension_src_files)
-
-endif # UBUNTU_PROFILE
-
-
-# MOBILE
-if MOBILE_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                             $(adaptor_common_internal_mobile_profile_src_files) \
-                             $(adaptor_tizen_internal_src_files) \
-                             $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
-                              $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
-                              $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # MOBILE_PROFILE
-
-# WEARABLE
-if WEARABLE_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                             $(adaptor_common_internal_mobile_profile_src_files) \
-                             $(adaptor_tizen_internal_src_files) \
-                             $(static_libraries_libunibreak_src_files)
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
-                              $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
-                              $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # WEARABLE
-
-
-# TV
-if TV_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                             $(adaptor_common_internal_tv_profile_src_files) \
-                             $(adaptor_tizen_internal_src_files) \
-                             $(adaptor_tizen_internal_non_mobile_src_files) \
-                             $(static_libraries_libunibreak_src_files)
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
-                              $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
-                              $(adaptor_x11_internal_tv_profile_key_src_files) \
-                              $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif
-
-# IVI
-if IVI_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
-                             $(adaptor_common_internal_mobile_profile_src_files) \
-                             $(adaptor_tizen_internal_src_files) \
-                             $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
-                              $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
-                              $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # IVI_PROFILE
-
-
-# Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
-# Used for things like callbacks, file-monintors, x input handling
-if LIB_UV_EVENT_LOOP
-main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
-input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
-else
-main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
-input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
-endif
-
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dali-adaptor-uv.pc
-
-lib_LTLIBRARIES = libdali-adaptor-uv.la
-
-libdali_adaptor_uv_la_SOURCES = \
-                     $(base_adaptor_src_files) \
-                     $(main_loop_integration_src_files) \
-                     $(tizen_platform_abstraction_src_files) \
-                     $(text_abstraction_src_files) \
-                     $(devel_api_src_files) \
-                     $(public_api_src_files) \
-                     $(adaptor_internal_src_files) \
-                     $(input_event_handler_src_files) \
-                     $(image_resampler_src_files)
-
-
-if ENABLE_NETWORK_LOGGING
-libdali_adaptor_uv_la_SOURCES += \
-  $(base_adaptor_networking_src_files)
-endif
-
-libdali_adaptor_uv_la_DEPENDENCIES =
-
-# List include directories with more platform-specific (tizen) before portable root:
-libdali_adaptor_uv_la_includes = \
-                      -I../../.. \
-                      -I../../../platform-abstractions/tizen \
-                      -I../../../platform-abstractions/tizen/resource-loader \
-                      -I../../../platform-abstractions/portable \
-                      -I../../../platform-abstractions/ \
-                      -I../../../adaptors/public-api \
-                      -I../../../adaptors/integration-api \
-                      -I../../../adaptors/public-api/adaptor-framework \
-                      -I../../../adaptors/devel-api/adaptor-framework \
-                      -I../../../adaptors/common \
-                      -I../../../adaptors/base/interfaces \
-                      -I../../../adaptors/ \
-                      -I../../../text \
-                      -I../../../text/dali/internal/libunibreak \
-                      -I../../../third-party/image-resampler
-
-if WAYLAND
-libdali_adaptor_uv_la_includes += -I../../../adaptors/integration-api/wayland
-if USE_ECORE_WAYLAND
-libdali_adaptor_uv_la_includes += \
-                      -I../../../adaptors/ecore/common \
-                      -I../../../adaptors/ecore/wayland
-else
-libdali_adaptor_uv_la_includes += -I../../../adaptors/wayland \
-                               -I../../../adaptors/wayland/input/text/imf \
-                               -I../../../adaptors/wayland/clipboard \
-                               -I../../../adaptors/wayland/native-image
-endif # USE_ECORE_WAYLAND
-
-libdali_adaptor_uv_la_includes += \
-                      -I../../../adaptors/tizen
-
-else
-libdali_adaptor_uv_la_includes += \
-                      -I../../../adaptors/ecore/common \
-                      -I../../../adaptors/x11 \
-                      -I../../../adaptors/integration-api/x11
-endif # WAYLAND
-
-if UBUNTU_PROFILE
-libdali_adaptor_uv_la_includes += \
-                      -I../../../adaptors/ubuntu
-else
-libdali_adaptor_uv_la_includes += \
-                      -I../../../adaptors/tizen
-endif
-
-daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
-daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
-
-libdali_adaptor_uv_la_CXXFLAGS = \
-                      -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
-                      -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
-                      -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
-                      -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
-                      -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
-                      -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
-                      -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
-                      -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
-                      -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
-                      -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
-                      -DTIZEN_PLATFORM_CONFIG_SUPPORTED=${tizenPlatformConfigSupported} \
-                      -DNON_POWER_OF_TWO_TEXTURES \
-                      -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
-                      -Werror -Wall -lgcc \
-                      $(libdali_adaptor_uv_la_includes) \
-                      $(DALI_ADAPTOR_CFLAGS) \
-                      $(DALICORE_CFLAGS) \
-                      $(OPENGLES20_CFLAGS) \
-                      $(FREETYPE_CFLAGS) \
-                      $(FONTCONFIG_CFLAGS) \
-                      $(PNG_CFLAGS) \
-                      $(DLOG_CFLAGS) \
-                      $(VCONF_CFLAGS) \
-                      $(EXIF_CFLAGS) \
-                      $(MMFSOUND_CFLAGS) \
-                      $(TTS_CFLAGS) \
-                      $(LIBDRM_CFLAGS) \
-                      $(LIBEXIF_CFLAGS) \
-                      $(LIBCURL_CFLAGS) \
-                      $(TPKP_CURL_CFLAGS)
-
-# Todo, as soon as common repos are updated on build server remove this.
-if !COMMON_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
-endif
-
-libdali_adaptor_uv_la_CFLAGS = \
-                      -Werror -Wall \
-                      -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
-                      $(DALI_ADAPTOR_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD = \
-                      $(DALICORE_LIBS) \
-                      $(OPENGLES20_LIBS) \
-                      $(FREETYPE_LIBS) \
-                      $(FONTCONFIG_LIBS) \
-                      $(PNG_LIBS) \
-                      $(DLOG_LIBS) \
-                      $(VCONF_LIBS) \
-                      $(EXIF_LIBS) \
-                      $(TTS_LIBS) \
-                      $(LIBDRM_LIBS) \
-                      $(LIBEXIF_LIBS) \
-                      $(LIBCURL_LIBS) \
-                      $(HARFBUZZ_LIBS) \
-                      $(TPKP_CURL_LIBS) \
-                      -lgif \
-                      -lpthread \
-                      -lturbojpeg
-
-if USE_EFL
-# EVAS used indicator
-libdali_adaptor_uv_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
-                               $(EVAS_CFLAGS) \
-                               $(ECORE_CFLAGS) \
-                               $(ECORE_IPC_CFLAGS) \
-                               $(ELDBUS_CFLAGS) \
-                               -DUSE_EFL
-
-
-libdali_adaptor_uv_la_LIBADD += $(ELEMENTARY_LIBS) \
-                             $(ECORE_IPC_LIBS) \
-                             $(ELDBUS_LIBS)
-
-else
-
-libdali_adaptor_uv_la_CXXFLAGS += $(ECORE_WAYLAND_CFLAGS)
-libdali_adaptor_uv_la_LIBADD += $(ECORE_WAYLAND_LIBS)
-
-if IVI_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(ECORE_WAYLAND_CFLAGS)
-libdali_adaptor_uv_la_LIBADD += $(ECORE_WAYLAND_LIBS)
-endif
-
-endif
-
-if USE_APPFW
-
-libdali_adaptor_uv_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
-                               $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
-                               $(CAPI_SYSTEM_INFO_CFLAGS) \
-                               $(TTS_CFLAGS) \
-                               $(CAPI_SYSTEM_SENSOR_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
-                             $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
-                             $(CAPI_SYSTEM_INFO_LIBS) \
-                             $(TTS_LIBS) \
-                             $(CAPI_SYSTEM_SENSOR_LIBS)
-
-endif
-if WAYLAND
-# This is to avoid having to include wayland-egl.h everywhere
-libdali_adaptor_uv_la_CXXFLAGS += -DWL_EGL_PLATFORM
-libdali_adaptor_uv_la_CXXFLAGS += $(WAYLAND_CFLAGS)
-libdali_adaptor_uv_la_CXXFLAGS += $(WAYLAND_EXTENSION_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += $(WAYLAND_LIBS)
-libdali_adaptor_uv_la_LIBADD += $(WAYLAND_EXTENSION_LIBS)
-
-else
-libdali_adaptor_uv_la_CXXFLAGS += $(X11_CFLAGS)
-libdali_adaptor_uv_la_LIBADD += $(X11_LIBS)
-libdali_adaptor_uv_la_LIBADD += $(ECORE_X_LIBS)
-endif
-
-if COMMON_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(HAPTIC_CFLAGS)
-endif
-
-if MOBILE_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
-                      $(DEVICED_CFLAGS) \
-                      $(EFL_ASSIST_CFLAGS) \
-                      $(NATIVE_BUFFER_CFLAGS) \
-                      $(NATIVE_BUFFER_POOL_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += \
-                      $(EFL_ASSIST_LIBS) \
-                      $(NATIVE_BUFFER_LIBS) \
-                      $(NATIVE_BUFFER_POOL_LIBS)
-endif
-
-if WEARABLE_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
-                      $(HAPTIC_CFLAGS) \
-                      $(EFL_ASSIST_CFLAGS)
-endif
-
-if TV_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(HAPTIC_CFLAGS)
-libdali_adaptor_uv_la_LIBADD +=
-endif
-
-if IVI_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
-                      $(DEVICED_CFLAGS) \
-                      $(EFL_ASSIST_CFLAGS) \
-                      $(NATIVE_BUFFER_CFLAGS) \
-                      $(NATIVE_BUFFER_POOL_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += \
-                      $(EFL_ASSIST_LIBS) \
-                      $(NATIVE_BUFFER_LIBS) \
-                      $(NATIVE_BUFFER_POOL_LIBS)
-endif
-
-if UBUNTU_PROFILE
-libdali_adaptor_uv_la_LIBADD += -ljpeg
-CFLAGS += -fPIC
-endif
-
-tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
-tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
-
-tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
-
-tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
-
-if WAYLAND
-tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
-else
-tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
-endif
-
-tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
-tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
-
-tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
-tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
-
-tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
-tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
-
-if !UBUNTU_PROFILE
-
-if !WAYLAND
-tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files)
-endif # NOT WAYLAND
-
-endif # NOT UBUNTU_PROFILE
-
-tizenadaptordaliheaderdir = $(devincludepath)/dali
-tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
-
-install-data-local:
-       $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
-
-# Install resource log analyzer script
-bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
-
-# package doxygen file (contains doxygen grouping information)
-packagedoxydir = $(devincludepath)/dali/doc
-packagedoxy_HEADERS = $(package_doxy_files)
-
-# linking test
-
-# turn off the linker test if were building for libuv
-# We can't link to LibUV becase it is statically linked to Node.JS (by default)
-if !LIB_UV_EVENT_LOOP
-noinst_PROGRAMS = linker.test
-endif # NOT LIB_UV_EVENT_LOOP
-
-linker_test_SOURCES = linker-test.cpp
-
-linker_test_CXXFLAGS = \
-  -DDALI_ADAPTOR_COMPILATION \
-  -I../../../adaptors/common \
-  -I../../../adaptors/public-api \
-  -I../../../adaptors/integration-api \
-  -I../../../adaptors/base/interfaces \
-  -I../../../adaptors/public-api/adaptor-framework \
-  -I../../../adaptors/devel-api/adaptor-framework \
-  $(DALI_ADAPTOR_CFLAGS) \
-  $(DALICORE_CFLAGS) \
-  $(VCONF_CFLAGS) \
-  $(DALIX11_CFLAGS) \
-  -Werror -Wall
-
-if WAYLAND
-linker_test_CXXFLAGS += \
-  -I../../../adaptors/integration-api/wayland
-else
-
-linker_test_CXXFLAGS += \
-  -I../../../adaptors/integration-api/x11
-endif
-
-
-linker_test_DEPENDENCIES = libdali-adaptor-uv.la
-linker_test_LDADD = \
-  $(DALICORE_LIBS) \
-  $(VCONF_LIBS) \
-  libdali-adaptor-uv.la \
-  $(HARFBUZZ_LIBS) \
-  -L${prefix}/lib
diff --git a/build/tizen/adaptor-uv/configure.ac b/build/tizen/adaptor-uv/configure.ac
deleted file mode 100644 (file)
index e61fccf..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-#
-# Copyright (c) 2015 Samsung Electronics Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-m4_define([dali_version],[0.1.0])
-AC_INIT([dali], [dali_version])
-AM_INIT_AUTOMAKE([-Wall foreign])
-
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_PROG_MKDIR_P
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-LT_INIT
-
-DALI_ADAPTOR_VERSION=dali_version
-AC_SUBST(DALI_ADAPTOR_VERSION)
-
-FREETYPE_REQUIRED=9.16.3
-# 17.1.11 = Freetype version 2.5.2
-FREETYPE_BITMAP_SUPPORT_VERSION=17.1.11
-
-PKG_CHECK_MODULES(DALICORE, dali-core)
-PKG_CHECK_MODULES(EXIF, libexif)
-PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
-PKG_CHECK_MODULES(FREETYPE_BITMAP_SUPPORT, [freetype2 >= $FREETYPE_BITMAP_SUPPORT_VERSION], [ freetype_bitmap_support=yes  ], [ freetype_bitmap_support=no ] )
-PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
-PKG_CHECK_MODULES(PNG, libpng)
-PKG_CHECK_MODULES(LIBEXIF, libexif)
-PKG_CHECK_MODULES(LIBDRM, libdrm)
-PKG_CHECK_MODULES(LIBCURL, libcurl)
-PKG_CHECK_MODULES(HARFBUZZ, harfbuzz)
-PKG_CHECK_MODULES(FRIBIDI, fribidi)
-PKG_CHECK_MODULES(TTRACE,  ttrace, AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available]),
-                  [ AC_MSG_NOTICE([Tizen Trace not avaiable]) ]
-                  )
-
-
-# Currently, dali-adaptor-uv requires EFL on X11 (e.g. Ubuntu PC)
-# and does not require it on Wayland (e.g. Tizen 3.0 devices).
-# So we should be able to enable/disable this option for dali-adaptor-uv.
-AC_ARG_ENABLE([efl],
-              [AC_HELP_STRING([--enable-efl],
-                              [Builds with EFL libraries, On by default])],
-              [enable_efl=$enableval],
-              [enable_efl=yes])
-
-
-
-# Check if we need EFL Libraries ( on by default, disabled with --use-efl=no )
-# When running on Node.JS with Wayland no EFL libraries are required.
-if test "x$enable_efl" = "xyes"; then
-PKG_CHECK_MODULES(ECORE, ecore)
-PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
-PKG_CHECK_MODULES(ECORE_IMF, [ecore-imf >= 1.13], [ecore_imf_1_13=yes], [ecore_imf_1_13=no])
-PKG_CHECK_MODULES(ELEMENTARY, elementary)
-# Check for EldBus.h in ECore
-PKG_CHECK_MODULES(ELDBUS, eldbus, [ eldbus_available=yes ],  [ eldbus_available=no ] )
-fi
-
-
-DALI_ELDBUS_AVAILABLE=
-if test "x$eldbus_available" = "xyes"; then
-  DALI_ELDBUS_AVAILABLE=true
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_ELDBUS_AVAILABLE "
-fi
-AC_SUBST(DALI_ELDBUS_AVAILABLE)
-
-
-PKG_CHECK_MODULES(TPKP_CURL, tpkp-curl, [ tpkp_curl_available=yes ], [ tpkp_curl_available=no ] )
-
-if test "x$tpkp_curl_available" = "xyes"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DTPK_CURL_ENABLED "
-fi
-
-PKG_CHECK_MODULES(UTILX, utilX, [ utilx_available=yes ], [ utilx_available=no ] )
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DPLATFORM_TIZEN"
-
-AC_ARG_ENABLE(exportall,
-              [AC_HELP_STRING([--enable-exportall],
-                              [enables the exporting of all the symbols in the library])],
-              [enable_exportall=yes],
-              [enable_exportall=no])
-
-AC_ARG_ENABLE([debug],
-              [AC_HELP_STRING([--enable-debug],
-                              [Turns on debugging])],
-              [enable_debug=$enableval],
-              [enable_debug=no])
-
-AC_ARG_ENABLE(shaderbincache,
-              [AC_HELP_STRING([--enable-shaderbincache],
-                              [enables shader binary cache])],
-              [enable_shaderbincache=$enableval],
-              [enable_shaderbincache=DISABLE])
-
-AC_ARG_ENABLE(networklogging,
-              [AC_HELP_STRING([--enable-networklogging],
-                              [enables network for debug tool])],
-              [enable_networklogging=$enableval],
-              [enable_networklogging=no])
-
-
-if test "x$enable_debug" = "xyes"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
-fi
-
-if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
-fi
-
-if test "x$enable_shaderbincache" = "xENABLE"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
-fi
-
-if test "x$enable_networklogging" = "xyes"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNETWORK_LOGGING_ENABLED"
-fi
-
-# If Ecore IMF version is greater than 1.13, then some structures are different
-if test "x$ecore_imf_1_13" = "xyes"; then
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DECORE_IMF_1_13"
-fi
-
-AC_ARG_ENABLE([gles],
-              [AC_HELP_STRING([--enable-gles],
-                              [Specify the OpenGL ES version for backwards compatibility])],
-              [enable_gles=$enableval],
-              [enable_gles=20])
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
-
-# node.js by default statically links against libuv, so it doesn't need to install
-# a libuv headers/ shared library. So we can't use pkg-config to access any headers.
-# As a work around we pass the node deps path so we can access the libuv headers inside nodes
-# directory
-AC_ARG_WITH([libuv],
-              [AC_HELP_STRING([--with-libuv],
-                              [Path that contains libuv headers. Setting this configures DALi to work with LibUV mainloop used in Node.JS.
-                              For example /usr/tmp/downloads/node/deps/uv/include/ ])],
-              [with_libuv=$withval],
-              [with_libuv=no])
-
-# Node.JS already has a libuv main loop running,so we have to integrate with it
-AM_CONDITIONAL(LIB_UV_EVENT_LOOP, test x$with_libuv != xno)
-
-
-build_for_libuv=no
-if test "x$with_libuv" != "xno"; then
-  AC_MSG_NOTICE("build with libuv mainloop (Node.JS support) == yes");
-  [build_for_libuv=yes]
-  DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNODE_JS_SUPPORT  -I${with_libuv}"
-else
- #not using libuv build
-  AC_MSG_NOTICE("build with libuv mainloop == no (Node.JS not supported)");
-fi
-
-# Currently, dali-adaptor-uv requires appfw on Tizen
-# and does not require it on Ubuntu.
-# So we should be able to enable/disable this option for dali-adaptor-uv.
-AC_ARG_ENABLE([appfw],
-              [AC_HELP_STRING([--enable-appfw],
-                              [Builds with Tizen App framework libraries, off by default])],
-              [enable_appfw=$enableval],
-              [enable_appfw=no])
-
-# Option to allow building with Tizen SDK 2.2
-AC_ARG_WITH([tizen-2-2-compatibility],
-            [AC_HELP_STRING([--with-tizen-2-2-compatibility],
-                            [Use Tizen SDK 2.2 compatibility])],
-            [with_tizen_2_2_compatibility=$withval],
-            [with_tizen_2_2_compatibility=no])
-
-# Tizen Profile options
-AC_ARG_ENABLE([profile],
-              [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,IVI,UBUNTU],
-                            [Select the variant of tizen])],
-              [enable_profile=$enableval],
-              [enable_profile=UBUNTU])
-
-# Ensure valid profile selected
-if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xIVI" -a "x$enable_profile" != "xUBUNTU"; then
-  AC_MSG_ERROR([$enable_profile is an invalid profile])
-fi
-
-AC_ARG_ENABLE(wayland,
-              [  --enable-wayland       Build on Wayland],
-              enable_wayland=yes,
-              enable_wayland=no)
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
-DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
-AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
-AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
-AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
-AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
-AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
-AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
-AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
-AM_CONDITIONAL([USE_EFL], [test x$enable_efl = xyes])
-AM_CONDITIONAL([USE_APPFW], [test x$enable_appfw = xyes])
-
-AM_CONDITIONAL([ENABLE_NETWORK_LOGGING], [test x$enable_networklogging = xyes])
-
-# Platforms should either enable features or remove them, they
-# should not disable features. This allows the developer to override
-# features through the command line.
-
-if test "x$enable_profile" = "xCOMMON"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-fi
-
-if test "x$enable_profile" = "xMOBILE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-enable_assimp=no
-fi
-
-if test "x$enable_profile" = "xLITE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-fi
-
-if test "x$enable_profile" = "xWEARABLE"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xTV"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xIVI"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xUBUNTU"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-else
-
-
-
-PKG_CHECK_MODULES(DLOG, dlog)
-PKG_CHECK_MODULES(TTS, tts)
-PKG_CHECK_MODULES(VCONF, vconf)
-
-if test "x$enable_efl" = "xyes"; then
-if test "x$with_tizen_2_2_compatibility" = "xno"; then
-PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
-PKG_CHECK_MODULES(CAPI_SYSTEM_SENSOR, capi-system-sensor)
-fi
-fi
-
-fi # ubuntu profile test
-
-if test "x$enable_appfw" = "xyes"; then
-PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
-PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
-fi
-
-# Using EFL api's for  WAYLAND AND X11 to run on ecore mainloop
-if test "x$enable_efl" = "xyes"; then
-if test "x$enable_wayland" = "xyes"; then
-PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
-                  [DALI_USE_ECORE_WAYLAND=1],
-                  [DALI_USE_ECORE_WAYLAND=0])
-
-else
-PKG_CHECK_MODULES(ECORE_X, [ecore-x],
-                  [DALI_USE_ECORE_X11=1],
-                  [DALI_USE_ECORE_X11=0])
-PKG_CHECK_MODULES(X11, [x11],
-                  [DALI_USE_X11=1],
-                  [DALI_USE_X11=0])
-fi
-
-else
-
-# For adaptors/mobile/native-render-surface-factory.cpp
-PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
-
-if test "x$enable_profile" = "xIVI"; then
-PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
-fi
-
-fi
-# Using Wayland API directly  ( main loop agnostic, typically for running on libuv)
-#  wayland-extension-client include xdg-shell-client
-if test "x$enable_efl" = "xno"; then
-if test "x$enable_wayland" = "xyes"; then
-PKG_CHECK_MODULES(WAYLAND, [ egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
-                  [DALI_USE_WAYLAND=1],
-                  [DALI_USE_WAYLAND=0])
-fi
-fi
-
-# remove this when we update common repos
-# common profile currently does not have wayland extensions like xdg-shell
-if test "x$enable_wayland" = "xyes"; then
-if test "x$enable_profile" != "xCOMMON"; then
-PKG_CHECK_MODULES(WAYLAND_EXTENSION, xdg-shell-client text-client input-method-client)
-fi
-fi
-AM_CONDITIONAL([USE_ECORE_WAYLAND], [test "$DALI_USE_ECORE_WAYLAND" -eq 1])
-
-if test x$DALI_DATA_RW_DIR != x; then
-  dataReadWriteDir=$DALI_DATA_RW_DIR
-else
-  dataReadWriteDir=${prefix}/share/dali/
-fi
-
-if test x$DALI_DATA_RO_DIR != x; then
-  dataReadOnlyDir=$DALI_DATA_RO_DIR
-else
-  dataReadOnlyDir=${prefix}/share/dali/
-fi
-
-if test x$FONT_CONFIGURATION_FILE != x; then
-  fontConfigurationFile=$FONT_CONFIGURATION_FILE
-fi
-
-if test x$TIZEN_PLATFORM_CONFIG_SUPPORTED != x; then
-  tizenPlatformConfigSupported=$TIZEN_PLATFORM_CONFIG_SUPPORTED
-else
-  tizenPlatformConfigSupported=0
-fi
-
-AC_SUBST(dataReadWriteDir)
-AC_SUBST(dataReadOnlyDir)
-AC_SUBST(DALI_ADAPTOR_CFLAGS)
-AC_SUBST(DALI_PROFILE_CFLAGS)
-AC_SUBST(fontConfigurationFile)
-AC_SUBST(tizenPlatformConfigSupported)
-
-# Specify the include directory for development headers
-#devincludepath=${includedir}/dali/internal
-devincludepath=${includedir}
-AC_SUBST(devincludepath)
-
-AC_CONFIG_FILES([
- Makefile
- dali-adaptor-uv.pc
-])
-
-if test "x$freetype_bitmap_support" = "xyes"; then
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DFREETYPE_BITMAP_SUPPORT"
-fi
-
-AC_OUTPUT
-
-
-echo "
-Configuration
--------------
-  Prefix:                           $prefix
-  Debug Build:                      $enable_debug
-  Compile flags:                    $DALI_ADAPTOR_CFLAGS
-  Freetype bitmap support (Emoji):  $freetype_bitmap_support
-  Profile:                          $enable_profile
-  Data Dir (Read/Write):            $dataReadWriteDir
-  Data Dir (Read Only):             $dataReadOnlyDir
-  Tizen SDK 2.2 compatibility:      $with_tizen_2_2_compatibility
-  EldBus:                           $eldbus_available
-  Shader Binary Cache:              $enable_shaderbincache
-  Using LibUV mainloop (Node.JS)    $build_for_libuv
-  Ecore Version At Least 1.13.0     $ecore_imf_1_13
-  Network logging enabled:          $enable_networklogging
-  Font config file:                 $fontConfigurationFile
-  Building with EFL Libraries:      $enable_efl
-  Using Tizen APP FW libraries:     $enable_appfw
-  OpenGL ES version:                $enable_gles
-  Tizen Platform Config supported:  $tizenPlatformConfigSupported
-"
-# optional output of node.js source path if we're building with libuv
-if test "x$build_for_libuv" != "xno"; then
-echo "  LibUV header path                 $with_libuv"
-fi
-echo ""
index 45770f2..bf01089 100644 (file)
@@ -60,10 +60,15 @@ if UBUNTU_PROFILE
 adaptor_ubuntu_dir = ../../../adaptors/ubuntu
 include ../../../adaptors/ubuntu/file.list
 else
+
 # Tizen
 adaptor_tizen_dir = ../../../adaptors/tizen
+if USE_APPFW_EFL_BASE
+include ../../../adaptors/tizen/file-3.list
+else
 include ../../../adaptors/tizen/file.list
 endif
+endif
 
 # Mobile
 adaptor_mobile_dir = ../../../adaptors/mobile
@@ -426,8 +431,18 @@ libdali_adaptor_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
                              $(CAPI_SYSTEM_INFO_LIBS) \
                              $(TTS_LIBS) \
                              $(SENSOR_LIBS)
+if USE_APPFW_EFL_BASE
+else
+libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_COMMON_CFLAGS) \
+                               $(CAPI_APPFW_CONTROL_CFLAGS) \
+                               $(FRIBIDI_CFLAGS)
 
+libdali_adaptor_la_LIBADD += $(CAPI_APPFW_COMMON_LIBS) \
+                             $(CAPI_APPFW_CONTROL_LIBS) \
+                             $(FRIBIDI_LIBS)
+endif
 endif
+
 if WAYLAND
 # This is to avoid having to include wayland-egl.h everywhere
 libdali_adaptor_la_CXXFLAGS += -DWL_EGL_PLATFORM
index e82cc20..c0c71e9 100644 (file)
@@ -154,6 +154,13 @@ AC_ARG_ENABLE([profile],
               [enable_profile=$enableval],
               [enable_profile=UBUNTU])
 
+# Tizen Major version
+AC_ARG_ENABLE([tizen-major-version],
+              [AC_HELP_STRING([--enable-tizen-major-version],
+                              [Specify the Tizen Major version for backwards compatibility])],
+              [enable-tizen-major-version=$enableval],
+              [enable-tizen-major-version=0])
+
 # Ensure valid profile selected
 if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xIVI" -a "x$enable_profile" != "xUBUNTU"; then
   AC_MSG_ERROR([$enable_profile is an invalid profile])
@@ -174,6 +181,7 @@ AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 AM_CONDITIONAL([USE_APPFW], [test x$enable_appfw = xyes])
+AM_CONDITIONAL([USE_APPFW_EFL_BASE], [test x$enable_tizen_major_version = x3])
 
 # Platforms with highp shader support can use vector based text
 AM_CONDITIONAL([ENABLE_VECTOR_BASED_TEXT_RENDERING], [test x$enable_profile = xUBUNTU])
@@ -237,8 +245,14 @@ fi
 fi # ubuntu profile test
 
 if test "x$enable_appfw" = "xyes"; then
-PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
+if test "x$enable_tizen_major_version" = "x3"; then
+PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
+else
+PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, appcore-ui)
+PKG_CHECK_MODULES(CAPI_APPFW_COMMON, capi-appfw-app-common)
+PKG_CHECK_MODULES(CAPI_APPFW_CONTROL, capi-appfw-app-control)
+fi
 fi
 
 # Using EFL api's for  WAYLAND AND X11 to run on ecore mainloop
index 3d48b4b..27ce5ad 100644 (file)
@@ -37,7 +37,6 @@ Requires:       giflib
 BuildRequires:  pkgconfig(libtzplatform-config)
 %endif
 
-
 # Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
 
 %if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
@@ -106,7 +105,14 @@ BuildRequires:  pkgconfig(utilX)
 # for dali-adaptor
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(elementary)
+
+%if 0%{?tizen_version_major} == 3
 BuildRequires:  pkgconfig(capi-appfw-application)
+%else
+BuildRequires:  pkgconfig(appcore-ui)
+BuildRequires:  pkgconfig(capi-appfw-app-common)
+BuildRequires:  pkgconfig(capi-appfw-app-control)
+%endif
 BuildRequires:  pkgconfig(capi-system-system-settings)
 
 # for feedback plugin
@@ -329,6 +335,7 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
+           --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
@@ -369,6 +376,7 @@ make clean
 
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
            --enable-shaderbincache=DISABLE --enable-profile=TV \
+           --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
@@ -408,6 +416,7 @@ make clean
 
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
+           --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
@@ -447,6 +456,7 @@ make clean
 
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
            --enable-shaderbincache=DISABLE --enable-profile=IVI \
+           --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif
@@ -487,6 +497,7 @@ make clean
 
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
+           --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
            --enable-feedback \
 %endif