From: Adeel Kazmi Date: Wed, 13 Feb 2019 17:21:06 +0000 (+0000) Subject: Added generic folders for non-platform specific implementations X-Git-Tag: dali_1.4.8~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F199647%2F6;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Added generic folders for non-platform specific implementations This should make adding new adaptations easier as it wouldn't require copying these files. Change-Id: I88cc5fcd4ee738ed748f5668a4aa0353b8afb68b --- diff --git a/dali/internal/accessibility/file.list b/dali/internal/accessibility/file.list index 01fd0aa..c0674f6 100644 --- a/dali/internal/accessibility/file.list +++ b/dali/internal/accessibility/file.list @@ -34,6 +34,6 @@ adaptor_accessibility_tizen_wearable_src_files=\ # module: accessibility, backend: ubuntu adaptor_accessibility_ubuntu_src_files=\ - ${adaptor_accessibility_dir}/ubuntu/accessibility-adaptor-impl-ubuntu.cpp \ + ${adaptor_accessibility_dir}/generic/accessibility-adaptor-impl-generic.cpp \ ${adaptor_accessibility_dir}/ubuntu/tts-player-factory-ubuntu.cpp \ ${adaptor_accessibility_dir}/ubuntu/tts-player-impl-ubuntu.cpp diff --git a/dali/internal/accessibility/ubuntu/accessibility-adaptor-impl-ubuntu.cpp b/dali/internal/accessibility/generic/accessibility-adaptor-impl-generic.cpp similarity index 97% rename from dali/internal/accessibility/ubuntu/accessibility-adaptor-impl-ubuntu.cpp rename to dali/internal/accessibility/generic/accessibility-adaptor-impl-generic.cpp index 9742d7f..05dda37 100644 --- a/dali/internal/accessibility/ubuntu/accessibility-adaptor-impl-ubuntu.cpp +++ b/dali/internal/accessibility/generic/accessibility-adaptor-impl-generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * 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. diff --git a/dali/internal/adaptor/file.list b/dali/internal/adaptor/file.list index fa47a4b..803b95b 100644 --- a/dali/internal/adaptor/file.list +++ b/dali/internal/adaptor/file.list @@ -21,6 +21,6 @@ adaptor_adaptor_tizen_wearable_src_files=\ # module: adaptor, backend: ubuntu adaptor_adaptor_ubuntu_src_files=\ - ${adaptor_adaptor_dir}/ubuntu/adaptor-impl-ubuntu.cpp \ + ${adaptor_adaptor_dir}/generic/adaptor-impl-generic.cpp \ ${adaptor_adaptor_dir}/ubuntu/framework-ubuntu.cpp diff --git a/dali/internal/adaptor/ubuntu/adaptor-impl-ubuntu.cpp b/dali/internal/adaptor/generic/adaptor-impl-generic.cpp similarity index 92% rename from dali/internal/adaptor/ubuntu/adaptor-impl-ubuntu.cpp rename to dali/internal/adaptor/generic/adaptor-impl-generic.cpp index 68a7007..1b05919 100644 --- a/dali/internal/adaptor/ubuntu/adaptor-impl-ubuntu.cpp +++ b/dali/internal/adaptor/generic/adaptor-impl-generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * 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. @@ -29,7 +29,7 @@ namespace Adaptor void Adaptor::GetDataStoragePath( std::string& path) { - path = DALI_SHADERBIN_DIR; + path = ""; } void Adaptor::GetAppId( std::string& appId ) diff --git a/dali/internal/clipboard/generic/clipboard-impl-generic.cpp b/dali/internal/clipboard/generic/clipboard-impl-generic.cpp new file mode 100755 index 0000000..fe5ab5e --- /dev/null +++ b/dali/internal/clipboard/generic/clipboard-impl-generic.cpp @@ -0,0 +1,107 @@ +/* + * 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. + * + */ + +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ + +struct Clipboard::Impl +{ +}; + +Clipboard::Clipboard( Impl* impl ) +: mImpl( impl ) +{ +} + +Clipboard::~Clipboard() +{ +} + +Dali::Clipboard Clipboard::Get() +{ + Dali::Clipboard clipboard; + + Dali::SingletonService service( SingletonService::Get() ); + if ( service ) + { + // Check whether the singleton is already created + Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::Clipboard ) ); + if(handle) + { + // If so, downcast the handle + clipboard = Dali::Clipboard( dynamic_cast< Clipboard* >( handle.GetObjectPtr() ) ); + } + else + { + Clipboard::Impl* impl( new Clipboard::Impl() ); + clipboard = Dali::Clipboard( new Clipboard(impl) ); + service.Register( typeid(Dali::Clipboard), clipboard ); + } + } + + return clipboard; +} + +bool Clipboard::SetItem(const std::string &itemData ) +{ + return true; +} + +void Clipboard::RequestItem() +{ +} + +unsigned int Clipboard::NumberOfItems() +{ + return 0u; +} + +void Clipboard::ShowClipboard() +{ +} + +void Clipboard::HideClipboard(bool skipFirstHide) +{ +} + +bool Clipboard::IsVisible() const +{ + return false; +} + +char* Clipboard::ExcuteBuffered( bool type, void *event ) +{ + return NULL; +} + +} // namespace Adaptor + +} // namespace Internal + +} // namespace Dali