From c2396b46b8a4c64de2c678c5721561b7cce134fa Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Tue, 3 Dec 2019 17:03:53 +0900 Subject: [PATCH] Revert "[Tizen] Add Component Application Structure" This reverts commit 51ebde56b6579691eac98675eacb96c7aca3676a. Change-Id: I546ee8871db12936685059fa66a382e492ff3b76 --- build/tizen/deps-check.cmake | 3 - .../adaptor-framework/component-application.h | 93 ---------------------- dali/devel-api/file.list | 1 - dali/internal/adaptor/common/framework.h | 20 +---- dali/internal/adaptor/file.list | 2 - .../tizen-wayland/component-application-impl.cpp | 63 --------------- .../tizen-wayland/component-application-impl.h | 92 --------------------- .../tizen-wayland/component-application.cpp | 83 ------------------- .../adaptor/tizen-wayland/framework-tizen.cpp | 81 +------------------ packaging/dali-adaptor.spec | 10 +-- 10 files changed, 4 insertions(+), 444 deletions(-) delete mode 100644 dali/devel-api/adaptor-framework/component-application.h delete mode 100644 dali/internal/adaptor/tizen-wayland/component-application-impl.cpp delete mode 100644 dali/internal/adaptor/tizen-wayland/component-application-impl.h delete mode 100644 dali/internal/adaptor/tizen-wayland/component-application.cpp diff --git a/build/tizen/deps-check.cmake b/build/tizen/deps-check.cmake index 70db018..fbea7f1 100644 --- a/build/tizen/deps-check.cmake +++ b/build/tizen/deps-check.cmake @@ -93,7 +93,6 @@ CHECK_MODULE_AND_SET( CAPI_SYSTEM_INFO capi-system-info [] ) CHECK_MODULE_AND_SET( CAPI_SYSTEM_SENSOR capi-system-sensor capi_system_sensor_support ) CHECK_MODULE_AND_SET( CAPI_SYSTEM_SYSTEM_SETTINGS capi-system-system-settings [] ) CHECK_MODULE_AND_SET( CAPI_APPFW_APPLICATION capi-appfw-application [] ) -CHECK_MODULE_AND_SET( COMPONENT_BASED_APPLICATION component-based-application [] ) CHECK_MODULE_AND_SET( ELEMENTARY elementary [] ) CHECK_MODULE_AND_SET( BUNDLE bundle [] ) @@ -349,7 +348,6 @@ IF( enable_appfw ) ${CAPI_APPFW_WIDGET_BASE_CFLAGS} ${ECORE_IMF_CFLAGS} ${FRIBIDI_CFLAGS} - ${COMPONENT_BASED_APPLICATION_CFLAGS} ) SET( DALI_LDFLAGS ${DALI_LDFLAGS} @@ -364,7 +362,6 @@ IF( enable_appfw ) ${CAPI_APPFW_WIDGET_BASE_LDFLAGS} ${ECORE_IMF_LDFLAGS} ${FRIBIDI_LDFLAGS} - ${COMPONENT_BASED_APPLICATION_LDFLAGS} ) ELSE() SET( DALI_CFLAGS ${DALI_CFLAGS} diff --git a/dali/devel-api/adaptor-framework/component-application.h b/dali/devel-api/adaptor-framework/component-application.h deleted file mode 100644 index 1e72b02..0000000 --- a/dali/devel-api/adaptor-framework/component-application.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef DALI_COMPONENT_APPLICATION_H -#define DALI_COMPONENT_APPLICATION_H - -/* - * Copyright (c) 2019 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. - * - */ - -#ifdef COMPONENT_APPLICATION_SUPPORT - -// INTERNAL INCLUDES -#include -#include -namespace Dali -{ -namespace Internal DALI_INTERNAL -{ - -namespace Adaptor -{ -class ComponentApplication; -} - -} - -class DALI_ADAPTOR_API ComponentApplication : public Application -{ - -public: - static ComponentApplication New( ); - static ComponentApplication New( int* argc, char **argv[] ); - static ComponentApplication New( int* argc, char **argv[], const std::string& stylesheet ); - - /** - * @brief The default constructor. - */ - ComponentApplication(); - - /** - * @brief Copy Constructor. - * - * @param[in] componentApplication Handle to an object - */ - ComponentApplication( const ComponentApplication& componentApplication ); - - /** - * @brief Assignment operator. - * - * @param[in] componentApplication Handle to an object - * @return A reference to this - */ - ComponentApplication& operator=( const ComponentApplication& componentApplication ); - - /** - * @brief Destructor - */ - ~ComponentApplication(); - - public: - typedef Signal< component_class_h (void* user_data) > CreateSignalType; - - CreateSignalType& CreateSignal(); - -public: - /// @cond internal - /** - * @brief Internal constructor. - */ - explicit DALI_INTERNAL ComponentApplication(Internal::Adaptor::ComponentApplication* componentApplication); - /// @endcond -}; - -/** - * @} - */ -} // namespace Dali - -#endif - -#endif // DALI_COMPONENT_APPLICATION_H - diff --git a/dali/devel-api/file.list b/dali/devel-api/file.list index a59d2bd..062abc2 100644 --- a/dali/devel-api/file.list +++ b/dali/devel-api/file.list @@ -89,7 +89,6 @@ SET( devel_api_adaptor_framework_header_files ${adaptor_devel_api_dir}/adaptor-framework/key-devel.h ${adaptor_devel_api_dir}/adaptor-framework/thread-settings.h ${adaptor_devel_api_dir}/adaptor-framework/window-devel.h - ${adaptor_devel_api_dir}/adaptor-framework/component-application.h ) diff --git a/dali/internal/adaptor/common/framework.h b/dali/internal/adaptor/common/framework.h index 9a4f268..d95388c 100644 --- a/dali/internal/adaptor/common/framework.h +++ b/dali/internal/adaptor/common/framework.h @@ -24,9 +24,6 @@ #ifdef APPCORE_WATCH_AVAILABLE #include #endif -#ifdef COMPONENT_APPLICATION_SUPPORT -#include -#endif // INTERNAL INCLUDES #include @@ -57,8 +54,7 @@ public: { NORMAL, ///< normal appFramework WATCH, ///< watch appFramework - WIDGET, ///< widget appFramework - COMPONENT ///< component appFramework + WIDGET ///< widget appFramework }; /** @@ -145,13 +141,6 @@ public: * Invoked when the platform surface is destroyed. */ virtual void OnSurfaceDestroyed( Any newSurface ) {} - -#ifdef COMPONENT_APPLICATION_SUPPORT - /** - * Invoked when the component application is created. - */ - virtual void* OnCreate(void *) { return NULL; } -#endif }; public: @@ -304,13 +293,6 @@ private: */ void InitThreads(); -#ifdef COMPONENT_APPLICATION_SUPPORT - /** - * Called when the component application is created. - */ - component_class_h CreateComponent(void * data); -#endif - private: Observer& mObserver; bool mInitialised; diff --git a/dali/internal/adaptor/file.list b/dali/internal/adaptor/file.list index 5ca9af6..866f6d4 100644 --- a/dali/internal/adaptor/file.list +++ b/dali/internal/adaptor/file.list @@ -14,8 +14,6 @@ SET( adaptor_adaptor_common_src_files SET( adaptor_adaptor_tizen_wayland_src_files ${adaptor_adaptor_dir}/tizen-wayland/adaptor-impl-tizen.cpp ${adaptor_adaptor_dir}/tizen-wayland/framework-tizen.cpp - ${adaptor_adaptor_dir}/tizen-wayland/component-application.cpp - ${adaptor_adaptor_dir}/tizen-wayland/component-application-impl.cpp ) # module: adaptor, backend: tizen-wearable diff --git a/dali/internal/adaptor/tizen-wayland/component-application-impl.cpp b/dali/internal/adaptor/tizen-wayland/component-application-impl.cpp deleted file mode 100644 index 786a350..0000000 --- a/dali/internal/adaptor/tizen-wayland/component-application-impl.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2019 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. - * - */ -#ifdef COMPONENT_APPLICATION_SUPPORT - -// CLASS HEADER -#include - -// INTERNAL INCLUDES -#include -#include - -namespace Dali -{ - -namespace Internal -{ - -namespace Adaptor -{ -ComponentApplicationPtr ComponentApplication::New( - int* argc, - char **argv[], - const std::string& stylesheet, - Dali::Application::WINDOW_MODE windowMode) -{ - ComponentApplicationPtr application ( new ComponentApplication (argc, argv, stylesheet, windowMode ) ); - return application; -} - -ComponentApplication::ComponentApplication( int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode ) -: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::COMPONENT) -{ -} - -ComponentApplication::~ComponentApplication() -{ -} - -component_class_h ComponentApplication::OnCreate(void* user_data) -{ - return mCreateSignal.Emit( user_data ); -} - -} // namespace Adaptor - -} // namespace Internal - -} // namespace Dali -#endif diff --git a/dali/internal/adaptor/tizen-wayland/component-application-impl.h b/dali/internal/adaptor/tizen-wayland/component-application-impl.h deleted file mode 100644 index 6ede5a7..0000000 --- a/dali/internal/adaptor/tizen-wayland/component-application-impl.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef DALI_INTERNAL_COMPONENT_APPLICATION_H -#define DALI_INTERNAL_COMPONENT_APPLICATION_H - -/* - * Copyright (c) 2019 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. - * - */ -#ifdef COMPONENT_APPLICATION_SUPPORT - -// INTERNAL INCLUDES -#include -#include -#include - -namespace Dali -{ -class Adaptor; - -namespace Internal -{ - -namespace Adaptor -{ - -class ComponentApplication; -typedef IntrusivePtr ComponentApplicationPtr; - -class ComponentApplication : public Application -{ -public: - typedef Dali::ComponentApplication::CreateSignalType CreateSignal; - - static ComponentApplicationPtr New( int* argc, char **argv[], const std::string& stylesheet, WINDOW_MODE windowMode ); - - ComponentApplication( int* argc, char **argv[], const std::string& stylesheet, WINDOW_MODE windowMode ); - - /** - * Destructor - */ - virtual ~ComponentApplication(); - virtual component_class_h OnCreate(void*user_data); - -private: - - // @brief Undefined copy constructor. - ComponentApplication( const ComponentApplication& ); - - // @brief Undefined assignment operator. - ComponentApplication& operator=( const ComponentApplication& ); - -public: - CreateSignal mCreateSignal; -}; - -inline ComponentApplication& GetImplementation(Dali::ComponentApplication& application) -{ - DALI_ASSERT_ALWAYS(application && "application handle is empty"); - - BaseObject& handle = application.GetBaseObject(); - - return static_cast(handle); -} - -inline const ComponentApplication& GetImplementation(const Dali::ComponentApplication& application) -{ - DALI_ASSERT_ALWAYS(application && "Time handle is empty"); - - const BaseObject& handle = application.GetBaseObject(); - - return static_cast(handle); -} - - -} // namespace Adaptor - -} // namespace Internal - -} // namespace Dali -#endif -#endif // DALI_INTERNAL_COMPONENT_APPLICATION_H diff --git a/dali/internal/adaptor/tizen-wayland/component-application.cpp b/dali/internal/adaptor/tizen-wayland/component-application.cpp deleted file mode 100644 index e9669b9..0000000 --- a/dali/internal/adaptor/tizen-wayland/component-application.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2019 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. - * - */ - -#ifdef COMPONENT_APPLICATION_SUPPORT - -// CLASS HEADER -#include - -// EXTERNAL INCLUDES -#include - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -ComponentApplication ComponentApplication::New() -{ - return New( NULL, NULL ); -} - -ComponentApplication ComponentApplication::New( int* argc, char **argv[] ) -{ - Internal::Adaptor::ComponentApplicationPtr internal = Internal::Adaptor::ComponentApplication::New( argc, argv, "", OPAQUE ); - return ComponentApplication(internal.Get()); -} - -ComponentApplication ComponentApplication::New( int* argc, char **argv[], const std::string& stylesheet ) -{ - Internal::Adaptor::ComponentApplicationPtr internal = Internal::Adaptor::ComponentApplication::New( argc, argv, stylesheet, OPAQUE ); - return ComponentApplication(internal.Get()); -} - -ComponentApplication::~ComponentApplication() -{ -} - -ComponentApplication::ComponentApplication() -{ -} - -ComponentApplication::ComponentApplication(const ComponentApplication& implementation) -: Application(implementation) -{ -} - -ComponentApplication& ComponentApplication::operator=(const ComponentApplication& application) -{ - if( *this != application ) - { - BaseHandle::operator=( application ); - } - return *this; -} - -ComponentApplication::CreateSignalType& ComponentApplication::CreateSignal() -{ - return Internal::Adaptor::GetImplementation(*this).mCreateSignal; -} - -ComponentApplication::ComponentApplication(Internal::Adaptor::ComponentApplication* implementation) -: Application(implementation) -{ -} - -} // namespace Dali - -#endif diff --git a/dali/internal/adaptor/tizen-wayland/framework-tizen.cpp b/dali/internal/adaptor/tizen-wayland/framework-tizen.cpp index 1b4213f..086332f 100644 --- a/dali/internal/adaptor/tizen-wayland/framework-tizen.cpp +++ b/dali/internal/adaptor/tizen-wayland/framework-tizen.cpp @@ -41,11 +41,6 @@ #include #endif // TIZEN_PLATFORM_CONFIG_SUPPORTED -#ifdef COMPONENT_APPLICATION_SUPPORT -#include -#include -#endif - #include // INTERNAL INCLUDES @@ -236,16 +231,10 @@ struct Framework::Impl { ret = AppWidgetMain(); } - else if(mApplicationType == WATCH) - { - ret = AppWatchMain(); - } -#ifdef COMPONENT_APPLICATION_SUPPORT else { - ret = AppComponentMain(); + ret = AppWatchMain(); } -#endif return ret; } @@ -259,16 +248,10 @@ struct Framework::Impl { AppWidgetExit(); } - else if(mApplicationType == WATCH) - { - AppWatchExit(); - } -#ifdef COMPONENT_APPLICATION_SUPPORT else { - AppComponentExit(); + AppWatchExit(); } -#endif } void SetLanguage( const std::string& language ) @@ -714,57 +697,6 @@ struct Framework::Impl #endif } -#ifdef COMPONENT_APPLICATION_SUPPORT - int AppComponentMain() - { - int ret; - - /*Crate component_based_app_base_lifecycle_callback*/ - component_based_app_base_lifecycle_callback_s callback; - callback.init = AppInit; - callback.run = AppRun; - callback.exit = AppExit; - callback.create = AppComponentCreate; - callback.terminate = AppComponentTerminate; - callback.fini = AppComponentFinish; - - ret = component_based_app_base_main(*mFramework->mArgc, *mFramework->mArgv, &callback, mFramework); - - if (ret != TIZEN_ERROR_NONE) - return ret; - - return TIZEN_ERROR_NONE; - } - - static void* AppComponentCreate( void *data ) - { - return static_cast( static_cast(data)->CreateComponent(data) ); - } - - static void AppComponentTerminate( void *data ) - { - Observer *observer = &static_cast(data)->mObserver; - observer->OnTerminate(); - } - - static void AppComponentFinish( void *data ) - { - ecore_shutdown(); - - if(getenv("AUL_LOADER_INIT")) - { - unsetenv("AUL_LOADER_INIT"); - ecore_shutdown(); - } - } - - void AppComponentExit() - { - component_based_app_base_exit(); - } - -#endif - private: // Undefined Impl( const Impl& impl ); @@ -951,15 +883,6 @@ std::string Framework::GetRegion() const return mImpl->GetRegion(); } -#ifdef COMPONENT_APPLICATION_SUPPORT -component_class_h Framework::CreateComponent( void * data ) -{ - mInitialised = true; - mObserver.OnInit(); - return mObserver.OnCreate(data); -} -#endif - } // namespace Adaptor } // namespace Internal diff --git a/packaging/dali-adaptor.spec b/packaging/dali-adaptor.spec index 8412170..a51b501 100644 --- a/packaging/dali-adaptor.spec +++ b/packaging/dali-adaptor.spec @@ -83,6 +83,7 @@ BuildRequires: pkgconfig(wayland-egl-tizen) %else BuildRequires: pkgconfig(ecore-wayland) %endif + # dali-adaptor needs tbm_surface in tizen 3.0 wayland BuildRequires: pkgconfig(libtbm) @@ -107,10 +108,6 @@ BuildRequires: pkgconfig(capi-ui-autofill) BuildRequires: pkgconfig(mm-sound) BuildRequires: pkgconfig(feedback) -%if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5 || 0%{?tizen_version_major} >= 6 -BuildRequires: pkgconfig(component-based-application) -%endif - # for multiprofile Requires: %{name}-compat = %{version}-%{release} Recommends: %{name}-profile_common = %{version}-%{release} @@ -279,11 +276,6 @@ cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug" cmake_flags+=" -DENABLE_TRACE=ON" %endif -%if 0%{?tizen_version_major} >= 5 && 0%{?tizen_version_minor} >= 5 || 0%{?tizen_version_major} >= 6 -CFLAGS+=" -DCOMPONENT_APPLICATION_SUPPORT" -CXXFLAGS+=" -DCOMPONENT_APPLICATION_SUPPORT" -%endif - libtoolize --force cd %{_builddir}/%{name}-%{version}/build/tizen -- 2.7.4