Window& windowImpl = Dali::GetImplementation(window);
Dali::Adaptor* adaptor = New( winId, windowImpl.GetSurface(), configuration, environmentOptions );
-
- Internal::Adaptor::Adaptor::GetImplementation( *adaptor ).SetWindow( window );
windowImpl.SetAdaptor(*adaptor);
return adaptor;
}
mTriggerEventFactory(),
mObjectProfiler( NULL ),
mSocketFactory(),
- mWindow(),
mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
mUseRemoteSurface( false )
{
static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
}
-void Adaptor::SetWindow( Dali::Window window )
-{
- mWindow = window;
-}
-
-Dali::Window Adaptor::GetWindow()
-{
- return mWindow;
-}
-
} // namespace Adaptor
} // namespace Internal
#include <dali/integration-api/render-controller.h>
// INTERNAL INCLUDES
-#include <window.h>
#include <adaptor.h>
#include <render-surface.h>
#include <tts-player.h>
*/
float GetStereoBase() const;
- /**
- * Set Window handle.
- */
- void SetWindow( Dali::Window window );
-
- /**
- * Return Window handle.
- */
- Dali::Window GetWindow();
-
public: // Signals
/**
TriggerEventFactory mTriggerEventFactory; ///< Trigger event factory
ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling
SocketFactory mSocketFactory; ///< Socket factory
- Dali::Window mWindow; ///< Window handle
const bool mEnvironmentOptionsOwned:1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it)
bool mUseRemoteSurface; ///< whether the remoteSurface is used or not
public:
return mImpl->GetNativeWindowHandle();
}
-Window Adaptor::GetWindow()
-{
- return mImpl->GetWindow();
-}
-
void Adaptor::ReleaseSurfaceLock()
{
mImpl->ReleaseSurfaceLock();
adaptor_common_internal_egl_extension_src_files = \
$(adaptor_common_dir)/gl/egl-image-extensions.cpp
-
-adaptor_internal_widget_src_files = \
- $(adaptor_common_dir)/widget-impl.cpp \
- $(adaptor_common_dir)/widget-application-impl.cpp
enum Type
{
- NORMAL, ///< normal appFramework
- WATCH, ///< watch appFramework
- WIDGET, ///< widget appFramework
+ NORMAL, ///< normal appFramework
+ WATCH ///< watch appFramework
};
/**
+++ /dev/null
-/*
- * 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 "widget-application-impl.h"
-
-// EXTERNAL INCLUDES
-#include <widget_base.h>
-
-// INTERNAL INCLUDES
-#include <style-monitor.h>
-#include <command-line-options.h>
-#include <common/adaptor-impl.h>
-#include <common/framework.h>
-#include <singleton-service-impl.h>
-#include <window-impl.h>
-
-namespace Dali
-{
-
-namespace TizenPlatform
-{
-class TizenPlatformAbstraction;
-}
-
-namespace Integration
-{
-class Core;
-}
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-WidgetApplicationPtr WidgetApplication::New(
- int* argc,
- char **argv[],
- const std::string& stylesheet)
-{
- WidgetApplicationPtr widgetApplication( new WidgetApplication (argc, argv, stylesheet ) );
- return widgetApplication;
-}
-
-WidgetApplication::WidgetApplication( int* argc, char** argv[], const std::string& stylesheet )
-: mInitSignal(),
- mTerminateSignal(),
- mLanguageChangedSignal(),
- mRegionChangedSignal(),
- mLowBatterySignal(),
- mLowMemorySignal(),
- mFramework( NULL ),
- mContextLossConfiguration( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ),
- mCommandLineOptions( NULL ),
- mSingletonService( SingletonService::New() ),
- mAdaptor( NULL ),
- mName(),
- mStylesheet( stylesheet ),
- mEnvironmentOptions(),
- mSlotDelegate( this )
-{
- // Get mName from environment options
- mName = mEnvironmentOptions.GetWindowName();
- if( mName.empty() && argc && ( *argc > 0 ) )
- {
- // Set mName from command-line args if environment option not set
- mName = (*argv)[0];
- }
-
- mCommandLineOptions = new CommandLineOptions(argc, argv);
- mFramework = new Framework( *this, argc, argv, Framework::WIDGET );
-}
-
-WidgetApplication::~WidgetApplication()
-{
- mSingletonService.UnregisterAll();
-
- delete mAdaptor;
- delete mCommandLineOptions;
- delete mFramework;
-}
-
-void WidgetApplication::CreateAdaptor()
-{
- mAdaptor = Dali::Internal::Adaptor::Adaptor::New( mWindow, mContextLossConfiguration, &mEnvironmentOptions );
-
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetUseRemoteSurface( true );
-}
-
-void WidgetApplication::MainLoop()
-{
- // Run the application
- mFramework->Run();
-}
-
-void WidgetApplication::Quit()
-{
- // Actually quit the application.
- AddIdle( MakeCallback( this, &WidgetApplication::QuitFromMainLoop ) );
-}
-
-void WidgetApplication::QuitFromMainLoop()
-{
- mAdaptor->Stop();
-
- mFramework->Quit();
- // This will trigger OnTerminate(), below, after the main loop has completed.
-}
-
-void WidgetApplication::DoInit()
-{
- mWindow = Dali::Window::New( PositionSize(), "", mEnvironmentOptions.GetWindowClassName(), 1 );
- // Quit the application when the window is closed
- mWindow.ShowIndicator(Dali::Window::IndicatorVisibleMode::INVISIBLE);
- GetImplementation( mWindow ).DeleteRequestSignal().Connect( mSlotDelegate, &WidgetApplication::Quit );
-
- CreateAdaptor();
- // Run the adaptor
- mAdaptor->Start();
-
- // Check if user requires no vsyncing and set Adaptor
- if (mCommandLineOptions->noVSyncOnRender)
- {
- mAdaptor->SetUseHardwareVSync(false);
- }
-
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetStereoBase( mCommandLineOptions->stereoBase );
-
- if( ! mStylesheet.empty() )
- {
- Dali::StyleMonitor::Get().SetTheme( mStylesheet );
- }
-}
-
-void WidgetApplication::DoStart()
-{
- mAdaptor->NotifySceneCreated();
-}
-
-void WidgetApplication::DoTerminate()
-{
- if( mAdaptor )
- {
- // Ensure that the render-thread is not using the surface(window) after we delete it
- mAdaptor->Stop();
- }
-
- mWindow.Reset();
-}
-
-void WidgetApplication::DoLanguageChange()
-{
- mAdaptor->NotifyLanguageChanged();
-}
-
-void WidgetApplication::OnInit()
-{
- mFramework->AddAbortCallback( MakeCallback( this, &WidgetApplication::QuitFromMainLoop ) );
- DoInit();
-
- Dali::WidgetApplication widgetApplication(this);
- mInitSignal.Emit( widgetApplication );
-
- DoStart();
-}
-
-void WidgetApplication::OnTerminate()
-{
- Dali::WidgetApplication widgetApplication(this);
- mTerminateSignal.Emit( widgetApplication );
-
- DoTerminate();
-}
-
-void WidgetApplication::OnLanguageChanged()
-{
- DoLanguageChange();
- Dali::WidgetApplication widgetApplication(this);
- mLanguageChangedSignal.Emit( widgetApplication );
-}
-
-void WidgetApplication::OnRegionChanged()
-{
- Dali::WidgetApplication widgetApplication(this);
- mRegionChangedSignal.Emit( widgetApplication );
-}
-
-void WidgetApplication::OnBatteryLow( Dali::DeviceStatus::Battery::Status status )
-{
- Dali::WidgetApplication widgetApplication(this);
- mLowBatterySignal.Emit( status );
-}
-
-void WidgetApplication::OnMemoryLow( Dali::DeviceStatus::Memory::Status status )
-{
- Dali::WidgetApplication widgetApplication(this);
- mLowMemorySignal.Emit( status );
-}
-
-bool WidgetApplication::AddIdle( CallbackBase* callback )
-{
- return mAdaptor->AddIdle( callback );
-}
-
-Dali::Adaptor& WidgetApplication::GetAdaptor()
-{
- return *mAdaptor;
-}
-
-std::string WidgetApplication::GetResourcePath()
-{
- return Internal::Adaptor::Framework::GetResourcePath();
-}
-
-std::string WidgetApplication::GetRegion()
-{
- return mFramework->GetRegion();
-}
-
-std::string WidgetApplication::GetLanguage()
-{
- return mFramework->GetLanguage();
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_WIDGET_APPLICATION_H__
-#define __DALI_INTERNAL_WIDGET_APPLICATION_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
-#include <widget_base.h>
-#include <bundle.h>
-
-// INTERNAL INCLUDES
-#include <widget-application.h>
-#include <singleton-service.h>
-
-#include <framework.h>
-#include <window.h>
-#include <base/environment-options.h>
-
-namespace Dali
-{
-class Adaptor;
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-class CommandLineOptions;
-class EventLoop;
-
-class WidgetApplication;
-typedef IntrusivePtr<WidgetApplication> WidgetApplicationPtr;
-
-/**
- * Implementation of the WidgetApplication class.
- */
-class WidgetApplication : public BaseObject, public Framework::Observer
-{
-public:
- typedef Dali::WidgetApplication::AppSignalType AppSignalType;
- typedef Dali::WidgetApplication::LowBatterySignalType LowBatterySignalType;
- typedef Dali::WidgetApplication::LowMemorySignalType LowMemorySignalType;
-
- /**
- * Create a new widget application
- * @param[in] argc A pointer to the number of arguments
- * @param[in] argv A pointer to the argument list
- * @param[in] stylesheet The path to user defined theme file
- */
- static WidgetApplicationPtr New( int* argc, char **argv[], const std::string& stylesheet );
-
-public:
-
- /**
- * @copydoc Dali::WidgetApplication::MainLoop()
- */
- void MainLoop();
-
- /**
- * @copydoc Dali::WidgetApplication::Quit()
- */
- void Quit();
-
- /**
- * @copydoc Dali::WidgetApplication::GetAdaptor();
- */
- Dali::Adaptor& GetAdaptor();
-
- /**
- * @copydoc Dali::WidgetApplication::GetResourcePath();
- */
- static std::string GetResourcePath();
-
- /**
- * @copydoc Dali::WidgetApplication::GetRegion();
- */
- std::string GetRegion();
-
- /**
- * @copydoc Dali::WidgetApplication::GetLanguage();
- */
- std::string GetLanguage();
-
-public: // Lifecycle functionality
-
- /**
- * Called when OnInit is called or the framework is initialised.
- */
- void DoInit();
-
- /**
- * Called after OnInit is called or the framework is started.
- */
- void DoStart();
-
- /**
- * Called when OnTerminate is called or the framework is terminated.
- */
- void DoTerminate();
-
- /**
- * Called when OnLanguageChanged is called or the framework informs the application that the language of the device has changed.
- */
- void DoLanguageChange();
-
-public: // From Framework::Observer
-
- /**
- * Called when the framework is initialised.
- */
- virtual void OnInit();
-
- /**
- * Called when the framework is terminated.
- */
- virtual void OnTerminate();
-
- /**
- * Called when the framework informs the application that the language of the device has changed.
- */
- virtual void OnLanguageChanged();
-
- /**
- * Called when the framework informs the application that the region of the device has changed.
- */
- virtual void OnRegionChanged();
-
- /**
- * Called when the framework informs the application that the battery level of the device is low.
- */
- virtual void OnBatteryLow( Dali::DeviceStatus::Battery::Status status );
-
- /**
- * Called when the framework informs the application that the memory level of the device is low.
- */
- virtual void OnMemoryLow( Dali::DeviceStatus::Memory::Status status );
-
-public: // Signals
-
- /**
- * @copydoc Dali::WidgetApplication::InitSignal()
- */
- Dali::WidgetApplication::AppSignalType& InitSignal() { return mInitSignal; }
-
- /**
- * @copydoc Dali::WidgetApplication::TerminateSignal()
- */
- Dali::WidgetApplication::AppSignalType& TerminateSignal() { return mTerminateSignal; }
-
- /**
- * @copydoc Dali::WidgetApplication::LanguageChangedSignal()
- */
- Dali::WidgetApplication::AppSignalType& LanguageChangedSignal() { return mLanguageChangedSignal; }
-
- /**
- * @copydoc Dali::WidgetApplication::RegionChangedSignal()
- */
- Dali::WidgetApplication::AppSignalType& RegionChangedSignal() { return mRegionChangedSignal; }
-
- /**
- * @copydoc Dali::WidgetApplication::LowBatterySignal()
- */
- Dali::WidgetApplication::LowBatterySignalType& LowBatterySignal() { return mLowBatterySignal; }
-
- /**
- * @copydoc Dali::WidgetApplication::LowMemorySignal()
- */
- Dali::WidgetApplication::LowMemorySignalType& LowMemorySignal() { return mLowMemorySignal; }
-
-protected:
-
- /**
- * Private Constructor
- * @param[in] argc A pointer to the number of arguments
- * @param[in] argv A pointer to the argument list
- * @param[in] stylesheet The path to user defined theme file
- */
- WidgetApplication( int* argc, char **argv[], const std::string& stylesheet );
-
- /**
- * Destructor
- */
- virtual ~WidgetApplication();
-
- // Undefined
- WidgetApplication(const Application&);
- WidgetApplication& operator=(Application&);
-
- /**
- * Creates the adaptor
- */
- void CreateAdaptor();
-
- /**
- * Quits from the main loop
- */
- void QuitFromMainLoop();
-
- /**
- * Add idle
- */
- bool AddIdle( CallbackBase* callback );
-
-private:
-
- AppSignalType mInitSignal;
- AppSignalType mTerminateSignal;
- AppSignalType mLanguageChangedSignal;
- AppSignalType mRegionChangedSignal;
- LowBatterySignalType mLowBatterySignal;
- LowMemorySignalType mLowMemorySignal;
-
- Framework* mFramework;
-
- Dali::Configuration::ContextLoss mContextLossConfiguration;
- CommandLineOptions* mCommandLineOptions;
-
- Dali::SingletonService mSingletonService;
- Dali::Adaptor* mAdaptor;
- Dali::Window mWindow;
- std::string mName;
- std::string mStylesheet;
- EnvironmentOptions mEnvironmentOptions;
-
- SlotDelegate< WidgetApplication > mSlotDelegate;
-};
-
-inline WidgetApplication& GetImplementation(Dali::WidgetApplication& widgetApplication)
-{
- DALI_ASSERT_ALWAYS(widgetApplication && "widget application handle is empty");
-
- BaseObject& handle = widgetApplication.GetBaseObject();
-
- return static_cast<Internal::Adaptor::WidgetApplication&>(handle);
-}
-
-inline const WidgetApplication& GetImplementation(const Dali::WidgetApplication& widgetApplication)
-{
- DALI_ASSERT_ALWAYS(widgetApplication && "widget application handle is empty");
-
- const BaseObject& handle = widgetApplication.GetBaseObject();
-
- return static_cast<const Internal::Adaptor::WidgetApplication&>(handle);
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_WIDGET_APPLICATION_H__
+++ /dev/null
-/*
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "widget-impl.h"
-
-// EXTERNAL INCLUDES
-#include <system_info.h>
-#include <string.h>
-
-#include <dali/integration-api/debug.h>
-#include <dali/public-api/math/vector2.h>
-
-// INTERNAL INCLUDES
-#include <adaptor.h>
-
-namespace Dali
-{
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-
-static bool IsWidgetFeatureEnabled()
-{
- static bool feature = false;
- static bool retrieved = false;
- int ret;
-
- if(retrieved == true)
- return feature;
-
- ret = system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &feature);
- if(ret != SYSTEM_INFO_ERROR_NONE)
- {
- DALI_LOG_ERROR("failed to get system info\n"); /* LCOV_EXCL_LINE */
- return false; /* LCOV_EXCL_LINE */
- }
-
- retrieved = true;
-
- return feature;
-}
-
-} // anonymous namespace
-
-Dali::Widget Widget::New( const std::string& id )
-{
- if(!IsWidgetFeatureEnabled())
- {
- DALI_LOG_ERROR("not supported");
- Dali::Widget handle(NULL);
- return handle;
- }
-
- if( id.size() < 1 )
- {
- DALI_LOG_ERROR("class id is NULL");
- Dali::Widget handle(NULL);
- return handle;
- }
-
- WidgetPtr widget ( new Widget( id ) );
- Dali::Widget handle( widget.Get() );
- return handle;
-}
-
-static int OnInit(widget_base_instance_h instance_h, bundle *content, int w, int h, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
- widget_base_class_on_create(instance_h, content, w, h);
-
- Dali::Window window = Dali::Adaptor::Get().GetWindow();
- Any nativeHandle = window.GetNativeHandle();
- Ecore_Wl_Window * wlWindow = AnyCast<Ecore_Wl_Window*>( nativeHandle );
- widget_base_context_window_bind( instance_h, id, wlWindow);
- window.SetSize( Dali::Window::WindowSize( w, h ) );
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- widget->mCreateSignal.Emit( std::string(id), content, window );
-
- return 0;
-}
-
-static int OnDestroy(widget_base_instance_h instance_h, widget_base_destroy_type_e reason, bundle *content, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
-
- Dali::Widget::WidgetTerminateType destroyReason = Dali::Widget::WidgetTerminateType::TEMPORARY;
-
- if(reason == WIDGET_BASE_DESTROY_TYPE_PERMANENT)
- {
- destroyReason = Dali::Widget::WidgetTerminateType::PERMANENT;
- }
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- widget->mTerminateSignal.Emit(std::string(id), content, destroyReason );
-
- widget_base_class_on_destroy(instance_h, reason, content);
-
- return 0;
-}
-
-static int OnPause(widget_base_instance_h instance_h, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
-
- widget_base_class_on_pause(instance_h);
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- widget->mPauseSignal.Emit(id);
-
- return 0;
-}
-
-static int OnResume(widget_base_instance_h instance_h, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
-
- widget_base_class_on_resume(instance_h);
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- widget->mResumeSignal.Emit(id);
-
- return 0;
-}
-
-static int OnResize(widget_base_instance_h instance_h, int w, int h, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
-
- widget_base_class_on_resize(instance_h, w, h);
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- Dali::Window window = Dali::Adaptor::Get().GetWindow();
- window.SetSize( Dali::Window::WindowSize(w, h) );
- widget->mResizeSignal.Emit(id, window);
-
- return 0;
-}
-
-static int OnUpdate(widget_base_instance_h instance_h, bundle *content, int force, void *classData)
-{
- char *id;
- widget_base_context_get_id(instance_h, &id);
-
- widget_base_class_on_update(instance_h, content, force);
-
- Internal::Adaptor::Widget* widget = static_cast< Internal::Adaptor::Widget* >( classData );
- widget->mUpdateSignal.Emit(id, content, force);
-
- return 0;
-}
-
-Widget::Widget( const std::string& id )
-: mCreateSignal(),
- mTerminateSignal(),
- mPauseSignal(),
- mResumeSignal(),
- mResizeSignal(),
- mUpdateSignal(),
- mClassId(id),
- mSlotDelegate(this)
-{
- widget_base_class cls = widget_base_class_get_default();
- cls.ops.create = OnInit;
- cls.ops.destroy = OnDestroy;
- cls.ops.pause = OnPause;
- cls.ops.resume = OnResume;
- cls.ops.resize = OnResize;
- cls.ops.update = OnUpdate;
-
- widget_base_class_add(cls, mClassId.c_str(), this);
-}
-
-Widget::~Widget()
-{
-}
-
-} // Adaptor
-
-} // Internal
-
-} // Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_WIDGET_H__
-#define __DALI_INTERNAL_WIDGET_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
-#include <utility>
-#include <dali/public-api/common/vector-wrapper.h>
-#include <widget_base.h>
-
-// INTERNAL INCLUDES
-#include <widget.h>
-#include <widget-application.h>
-#include <widget-application-impl.h>
-#include <window.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-class Widget;
-typedef IntrusivePtr<Widget> WidgetPtr;
-
-/**
- * Implementation of the Application class.
- */
-class Widget : public BaseObject
-{
-public:
- typedef Dali::Widget::WidgetCreateSignalType WidgetCreateSignalType;
- typedef Dali::Widget::WidgetTerminateSignalType WidgetTerminateSignalType;
- typedef Dali::Widget::WidgetPauseSignalType WidgetPauseSignalType;
- typedef Dali::Widget::WidgetResumeSignalType WidgetResumeSignalType;
- typedef Dali::Widget::WidgetResizeSignalType WidgetResizeSignalType;
- typedef Dali::Widget::WidgetUpdateSignalType WidgetUpdateSignalType;
-
- /**
- * Create a new Widget
- * @param[in] application WidgetApplication for managing widget instance
- * @param[in] id Id for widget class
- */
- static Dali::Widget New( const std::string& id );
-
-public: // Signals
-
- /**
- * @copydoc Dali::Widget::InitSignal()
- */
- WidgetCreateSignalType& CreateSignal(){ return mCreateSignal; }
-
- /**
- * @copydoc Dali::Widget::TerminateSignal()
- */
- WidgetTerminateSignalType& TerminateSignal(){ return mTerminateSignal; }
-
- /**
- * @copydoc Dali::Widget::PauseSignal()
- */
- WidgetPauseSignalType& PauseSignal(){ return mPauseSignal; }
-
- /**
- * @copydoc Dali::Widget::ResumeSignal()
- */
- WidgetResumeSignalType& ResumeSignal(){ return mResumeSignal; }
-
- /**
- * @copydoc Dali::Widget::ResizeSignal()
- */
- WidgetResizeSignalType& ResizeSignal(){ return mResizeSignal; }
-
- /**
- * @copydoc Dali::Widget::UpdateSignal()
- */
- WidgetUpdateSignalType& UpdateSignal(){ return mUpdateSignal; }
-
-protected:
-
- /**
- * Private Constructor
- * @param[in] id Id for widget class
- */
- Widget( const std::string& id );
-
- /**
- * Destructor
- */
- virtual ~Widget();
-
- // Undefined
- Widget(const Widget&);
- Widget& operator=(Widget&);
-
-public:
-
- WidgetCreateSignalType mCreateSignal;
- WidgetTerminateSignalType mTerminateSignal;
- WidgetPauseSignalType mPauseSignal;
- WidgetResumeSignalType mResumeSignal;
- WidgetResizeSignalType mResizeSignal;
- WidgetUpdateSignalType mUpdateSignal;
- const std::string mClassId;
-
-private:
- SlotDelegate< Widget > mSlotDelegate;
-};
-
-inline Widget& GetImplementation(Dali::Widget& widget)
-{
- DALI_ASSERT_ALWAYS(widget && "widget handle is empty");
-
- BaseObject& handle = widget.GetBaseObject();
-
- return static_cast<Internal::Adaptor::Widget&>(handle);
-}
-
-inline const Widget& GetImplementation(const Dali::Widget& widget)
-{
- DALI_ASSERT_ALWAYS(widget && "widget handle is empty");
-
- const BaseObject& handle = widget.GetBaseObject();
-
- return static_cast<const Internal::Adaptor::Widget&>(handle);
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-#endif // __DALI_INTERNAL_WIDGET_H__
+++ /dev/null
-/*
- * 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 "widget-application.h"
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <widget-application-impl.h>
-
-namespace Dali
-{
-
-WidgetApplication WidgetApplication::New( int* argc, char **argv[], const std::string& stylesheet )
-{
- Internal::Adaptor::WidgetApplicationPtr internal = Internal::Adaptor::WidgetApplication::New( argc, argv, stylesheet);
- return WidgetApplication(internal.Get());
-}
-
-WidgetApplication::~WidgetApplication()
-{
-}
-
-WidgetApplication::WidgetApplication()
-{
-}
-
-WidgetApplication::WidgetApplication(const WidgetApplication& widgetApplication)
-: BaseHandle(widgetApplication)
-{
-}
-
-WidgetApplication& WidgetApplication::operator=(const WidgetApplication& widgetApplication)
-{
- if( *this != widgetApplication )
- {
- BaseHandle::operator=( widgetApplication );
- }
- return *this;
-}
-
-void WidgetApplication::MainLoop()
-{
- Internal::Adaptor::GetImplementation(*this).MainLoop();
-}
-
-void WidgetApplication::Quit()
-{
- Internal::Adaptor::GetImplementation(*this).Quit();
-}
-
-std::string WidgetApplication::GetResourcePath()
-{
- return Internal::Adaptor::WidgetApplication::GetResourcePath();
-}
-
-std::string WidgetApplication::GetRegion()
-{
- return Internal::Adaptor::GetImplementation(*this).GetRegion();
-}
-
-std::string WidgetApplication::GetLanguage()
-{
- return Internal::Adaptor::GetImplementation(*this).GetLanguage();
-}
-
-WidgetApplication::AppSignalType& WidgetApplication::InitSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).InitSignal();
-}
-
-WidgetApplication::AppSignalType& WidgetApplication::TerminateSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).TerminateSignal();
-}
-
-WidgetApplication::AppSignalType& WidgetApplication::LanguageChangedSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).LanguageChangedSignal();
-}
-
-WidgetApplication::AppSignalType& WidgetApplication::RegionChangedSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).RegionChangedSignal();
-}
-
-WidgetApplication::LowBatterySignalType& WidgetApplication::LowBatterySignal()
-{
- return Internal::Adaptor::GetImplementation(*this).LowBatterySignal();
-}
-
-WidgetApplication::LowMemorySignalType& WidgetApplication::LowMemorySignal()
-{
- return Internal::Adaptor::GetImplementation(*this).LowMemorySignal();
-}
-
-WidgetApplication::WidgetApplication(Internal::Adaptor::WidgetApplication* widgetApplication)
-: BaseHandle(widgetApplication)
-{
-}
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_WIDGET_APPLICATION_H__
-#define __DALI_WIDGET_APPLICATION_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
-#include <dali/public-api/signals/callback.h>
-#include <bundle.h>
-
-// INTERNAL INCLUDES
-#ifdef DALI_ADAPTOR_COMPILATION // full path doesn't exist until adaptor is installed so we have to use relative
-#include <device-status.h>
-#else
-#include <dali/public-api/adaptor-framework/device-status.h>
-#endif
-
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-
-namespace Internal DALI_INTERNAL
-{
-namespace Adaptor
-{
-class WidgetApplication;
-}
-}
-
-class Window;
-
-/**
- * @brief An WidgetApplication class object should be created by every widget application
- * that wishes to use Dali.
- *
- * It provides a means for initializing the
- * resources required by the Dali::Core.
- *
- * The WidgetApplication class emits several signals which the user can
- * connect to. The user should not create any Dali objects in the main
- * function and instead should connect to the Init signal of the
- * WidgetApplication and create the Dali Widget object in the connected callback.
- *
- * WidgetApplications should follow the example below:
- *
- * @code
- * class ExampleController: public ConnectionTracker
- * {
- * public:
- * ExampleController( WidgetApplication& widgetApplication )
- * : mWidgetApplication( widgetApplication )
- * {
- * mWidgetApplication.InitSignal().Connect( this, &ExampleController::Create );
- * }
- *
- * void Create( WidgetApplication& widgetApplication )
- * {
- * Widget widget = Widget::New( WIDGET_ID );
- * widget.CreateSignal( this, &ExampleController::WidgetCreate );
- * }
- *
- * void WidgetCreate( const std::string& id, bundle* content, Window window )
- * {
- * // Do Dali components...
- * }
- * ...
- * private:
- * WidgetApplication& mWidgetApplication;
- * };
- *
- * int main (int argc, char **argv)
- * {
- * WidgetApplication app = WidgetApplication::New(&argc, &argv);
- * ExampleController example( app );
- * app.MainLoop();
- * }
- * @endcode
- *
- * If required, you can also connect class member functions to a signal:
- *
- * @code
- * MyWidgetApplication app;
- * app.ResumeSignal().Connect(&app, &MyWidgetApplication::Resume);
- * @endcode
- *
- * @SINCE_1_2.62
- */
-class DALI_IMPORT_API WidgetApplication : public BaseHandle
-{
-public:
-
- typedef Signal< void (WidgetApplication&) > AppSignalType; ///< Widget application lifecycle signal and system signal callback type
- typedef Signal< void (DeviceStatus::Battery::Status) > LowBatterySignalType; ///< Widget application device signal type
- typedef Signal< void (DeviceStatus::Memory::Status) > LowMemorySignalType; ///< Widget application device signal type
-
-public:
-
- /**
- * @brief This is the constructor for WidgetApplications with a name.
- *
- * @param[in,out] argc A pointer to the number of arguments
- * @param[in,out] argv A pointer to the argument list
- * @param[in] stylesheet The path to user defined theme file
- * @return A handle to the WidgetApplication
- * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
- */
- static WidgetApplication New( int* argc, char **argv[], const std::string& stylesheet );
-
- /**
- * @brief The default constructor.
- *
- */
- WidgetApplication();
-
- /**
- * @brief Copy Constructor.
- * @param[in] WidgetApplication Handle to an object
- */
- WidgetApplication( const WidgetApplication& widgetApplication );
-
- /**
- * @brief Assignment operator.
- * @param[in] WidgetApplication Handle to an object
- * @return A reference to this
- */
- WidgetApplication& operator=( const WidgetApplication& widgetApplication );
-
- /**
- * @brief Destructor
- *
- */
- ~WidgetApplication();
-
- /**
- * @brief This starts the application.
- */
- void MainLoop();
-
- /**
- * @brief This quits the application. Tizen applications should use Lower to improve re-start performance unless they need to Quit completely.
- */
- void Quit();
-
- /**
- * @brief Get path application resources are stored at
- * @return the full path of the resources
- */
- static std::string GetResourcePath();
-
- /**
- * @brief this is used to get region information from device.
- *
- * @return region information
- */
- std::string GetRegion();
-
- /**
- * @brief this is used to get language information from device.
- *
- * @return language information
- */
- std::string GetLanguage();
-
-public: // Signals
-
- /**
- * @brief The user should connect to this signal to determine when they should initialize
- * their application.
- * @return The signal to connect to
- */
- AppSignalType& InitSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they should terminate
- * their application.
- * @return The signal to connect to
- */
- AppSignalType& TerminateSignal();
-
- /**
- * @brief This signal is emitted when the language is changed on the device.
- * @return The signal to connect to
- */
- AppSignalType& LanguageChangedSignal();
-
- /**
- * @brief This signal is emitted when the region of the device is changed.
- * @return The signal to connect to
- */
- AppSignalType& RegionChangedSignal();
-
- /**
- * @brief This signal is emitted when the battery level of the device is low.
- * @return The signal to connect to
- */
- LowBatterySignalType& LowBatterySignal();
-
- /**
- * @brief This signal is emitted when the memory level of the device is low.
- * @return The signal to connect to
- */
- LowMemorySignalType& LowMemorySignal();
-
-public: // Not intended for application developers
- /// @cond internal
- /**
- * @brief Internal constructor.
- */
- explicit DALI_INTERNAL WidgetApplication(Internal::Adaptor::WidgetApplication* widgetApplication);
- /// @endcond
-};
-
-} // namespace Dali
-
-#endif // ___DALI_WIDGET_APPLICATION_H__
+++ /dev/null
-/*
- * 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 "widget.h"
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <widget-impl.h>
-
-namespace Dali
-{
-
-Widget Widget::New( const std::string& id)
-{
- return Internal::Adaptor::Widget::New( id );
-}
-
-Widget::~Widget()
-{
-}
-
-Widget::Widget()
-{
-}
-
-Widget::Widget(const Widget& widget)
-: BaseHandle(widget)
-{
-}
-
-Widget& Widget::operator=(const Widget& widget)
-{
- if( *this != widget )
- {
- BaseHandle::operator=( widget );
- }
- return *this;
-}
-
-Widget::WidgetCreateSignalType& Widget::CreateSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).CreateSignal();
-}
-
-Widget::WidgetTerminateSignalType& Widget::TerminateSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).TerminateSignal();
-}
-
-Widget::WidgetPauseSignalType& Widget::PauseSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).PauseSignal();
-}
-
-Widget::WidgetResumeSignalType& Widget::ResumeSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).ResumeSignal();
-}
-
-Widget::WidgetResizeSignalType& Widget::ResizeSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).ResizeSignal();
-}
-
-Widget::WidgetUpdateSignalType& Widget::UpdateSignal()
-{
- return Internal::Adaptor::GetImplementation(*this).UpdateSignal();
-}
-
-Widget::Widget(Internal::Adaptor::Widget* widget)
-: BaseHandle(widget)
-{
-}
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_WIDGET_H__
-#define __DALI_WIDGET_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
-#include <bundle.h>
-
-namespace Dali
-{
-/**
- * @addtogroup dali_adaptor_framework
- * @{
- */
-
-namespace Internal DALI_INTERNAL
-{
-
-namespace Adaptor
-{
-class Widget;
-}
-
-}
-
-class Window;
-
-/**
- * @brief Widget object should be created by WidgetApplication.
- *
- * The WidgetApplication class emits several widget instance lifecycle signals
- * which the user can connect to.
- * The user should connect to the CreateSignal of the Widget and
- * create the Dali Widget object in the connected callback.
- *
- * Widget should follow the example below:
- *
- * @code
- * class ExampleController: public ConnectionTracker
- * {
- * public:
- * ExampleController( WidgetApplication& widgetApplication )
- * : mWidgetApplication( widgetApplication )
- * {
- * mWidgetApplication.InitSignal().Connect( this, &ExampleController::Create );
- * }
- *
- * void Create( WidgetApplication& widgetApplication )
- * {
- * Widget widget = Widget::New( WIDGET_ID );
- * widget.CreateSignal( this, &ExampleController::WidgetCreate );
- * }
- *
- * void WidgetCreate( const std::string& id, bundle* content, Window window )
- * {
- * // Do Dali components...
- * }
- * ...
- * private:
- * WidgetApplication& mWidgetApplication;
- * };
- *
- * int main (int argc, char **argv)
- * {
- * WidgetApplication app = WidgetApplication::New(&argc, &argv);
- * ExampleController example( app );
- * app.MainLoop();
- * }
- *
- * @SINCE_1_2.62
- */
-class DALI_IMPORT_API Widget : public BaseHandle
-{
-public:
-
- /**
- * @brief Enumeration for terminate type of widget instance.
- * @SINCE_1_2.62
- */
- typedef enum
- {
- PERMANENT, //< User deleted this widget from the viewer @SINCE_1_2.62
- TEMPORARY, //< Widget is deleted because of other reasons (e.g. widget process is terminated temporarily by the system) @SINCE_1_2.62
- } WidgetTerminateType;
-
- typedef Signal< void (const std::string&, bundle*, Window) > WidgetCreateSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
- typedef Signal< void (const std::string&, bundle*, WidgetTerminateType) > WidgetTerminateSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
- typedef Signal< void (const std::string&) > WidgetPauseSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
- typedef Signal< void (const std::string&) > WidgetResumeSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
- typedef Signal< void (const std::string&, Window) > WidgetResizeSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
- typedef Signal< void (const std::string&, bundle*, int) > WidgetUpdateSignalType; ///< Widget lifecycle signal type @SINCE_1_2.62
-
-public:
-
- /**
- * @brief This is the constructor for Widget.
- * @SINCE_1_2.62
- * @param[in] id Id for widget class
- * @return A handle to the Widget
- */
- static Widget New( const std::string& id );
-
- /**
- * @brief The default constructor.
- *
- */
- Widget();
-
- /**
- * @brief Copy Constructor.
- * @SINCE_1_2.62
- * @param[in] Widget Handle to an object
- */
- Widget( const Widget& widget );
-
- /**
- * @brief Assignment operator.
- * @SINCE_1_2.62
- * @param[in] Widget Handle to an object
- * @return A reference to this
- */
- Widget& operator=( const Widget& widget );
-
- /**
- * @brief Destructor
- * @SINCE_1_2.62
- */
- ~Widget();
-
-public: // Signals
-
- /**
- * @brief The user should connect to this signal to determine when they create widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetCreateSignalType& CreateSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they terminate widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetTerminateSignalType& TerminateSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they pause widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetPauseSignalType& PauseSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they resume widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetResumeSignalType& ResumeSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they resize widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetResizeSignalType& ResizeSignal();
-
- /**
- * @brief The user should connect to this signal to determine when they update widget.
- * @SINCE_1_2.62
- * @return The signal to connect to
- */
- WidgetUpdateSignalType& UpdateSignal();
-
-public: // Not intended for application developers
- /// @cond internal
- /**
- * @brief Internal constructor.
- */
- explicit DALI_INTERNAL Widget(Internal::Adaptor::Widget* widget);
- /// @endcond
-};
-
-/**
- * @}
- */
-} // namespace Dali
-
-#endif // ___DALI_WIDGET_H__
$(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
$(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h
-adaptor_widget_src_files = \
- $(adaptor_devel_api_dir)/adaptor-framework/widget.cpp \
- $(adaptor_devel_api_dir)/adaptor-framework/widget-application.cpp
-
-adaptor_widget_header_files = \
- $(adaptor_devel_api_dir)/adaptor-framework/widget.h \
- $(adaptor_devel_api_dir)/adaptor-framework/widget-application.h
Any GetNativeWindowHandle();
/**
- * @brief Gets Window handle
- *
- * @return Window handle
- */
- Window GetWindow();
-
- /**
* @brief Release any locks the surface may hold.
*
* For example, after compositing an offscreen surface, use this method to allow
#include <system_info.h>
#include <system_settings.h>
#include <bundle_internal.h>
-#include <widget_base.h>
+
// CONDITIONAL INCLUDES
#ifdef APPCORE_WATCH_AVAILABLE
#include <appcore-watch/watch_app.h>
// INTERNAL INCLUDES
#include <callback-manager.h>
-#include <dlog.h>
namespace Dali
{
namespace Adaptor
{
+#if defined(DEBUG_ENABLED)
namespace
{
-#if defined(DEBUG_ENABLED)
Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New( Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DBUS" );
-#endif
-
-bool IsWidgetFeatureEnabled()
-{
- static bool feature = false;
- static bool retrieved = false;
- int ret;
-
- if(retrieved == true)
- return feature;
-
- ret = system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &feature);
- if(ret != SYSTEM_INFO_ERROR_NONE)
- {
- DALI_LOG_ERROR("failed to get system info"); /* LCOV_EXCL_LINE */
- return false; /* LCOV_EXCL_LINE */
- }
-
- retrieved = true;
- return feature;
-}
-
} // anonymous namespace
+#endif
namespace AppCore
{
{
ret = AppNormalMain();
}
- else if(mApplicationType == WIDGET)
- {
- ret = AppWidgetMain();
- }
else
{
ret = AppWatchMain();
{
AppNormalExit();
}
- else if(mApplicationType == WIDGET)
- {
- AppWidgetExit();
- }
else
{
AppWatchExit();
appcore_ui_base_exit();
}
- void AppWidgetExit()
- {
- widget_base_exit();
- }
-
- static int WidgetAppCreate( void *data )
- {
- dlog_print(DLOG_ERROR,"DALI","WidgetAppCreate!\n");
- widget_base_on_create();
- return static_cast<int>( static_cast<Framework*>(data)->Create() );
- }
-
- static int WidgetAppTerminate( void *data )
- {
- Observer *observer = &static_cast<Framework*>(data)->mObserver;
- observer->OnTerminate();
-
- widget_base_on_terminate();
- return 0;
- }
-
- int AppWidgetMain()
- {
- if( !IsWidgetFeatureEnabled() )
- {
- DALI_LOG_ERROR("widget feature is not supported");
- return 0;
- }
-
- 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);
-
- widget_base_ops ops = widget_base_get_default_ops();
-
- /* override methods */
- ops.create = WidgetAppCreate;
- ops.terminate = WidgetAppTerminate;
- ops.init = AppInit;
- ops.finish = AppFinish;
- ops.run = AppRun;
- ops.exit = AppExit;
-
- int result = widget_base_init(ops, *mFramework->mArgc, *mFramework->mArgv, mFramework);
-
- widget_base_fini();
-
- return result;
- }
-
#ifdef APPCORE_WATCH_AVAILABLE
static bool WatchAppCreate(int width, int height, void *data)
{
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
endif # IVI_PROFILE
-if USE_APPFW
-if USE_APPFW_EFL_BASE
-else
-adaptor_internal_src_files += $(adaptor_internal_widget_src_files)
-endif
-endif
-
main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
$(base_adaptor_networking_src_files)
endif
-if USE_APPFW
-if USE_APPFW_EFL_BASE
-else # over Tizen 3.0
-LIBDALI_ADAPTOR_LA_SOURCES += \
- $(adaptor_widget_src_files)
-endif
-endif
-
libdali_adaptor_la_DEPENDENCIES =
# List include directories with more platform-specific (tizen) before portable root:
LIBDALI_ADAPTOR_LA_LIBADD += $(ELEMENTARY_LIBS)
else
-LIBDALI_ADAPTOR_LA_CXXFLAGS += $(BUNDLE_CFLAGS) \
- $(CAPI_APPFW_COMMON_CFLAGS) \
+LIBDALI_ADAPTOR_LA_CXXFLAGS += $(CAPI_APPFW_COMMON_CFLAGS) \
$(CAPI_APPFW_CONTROL_CFLAGS) \
- $(CAPI_APPFW_WIDGET_BASE_CFLAGS) \
$(ECORE_IMF_CFLAGS) \
$(FRIBIDI_CFLAGS)
-LIBDALI_ADAPTOR_LA_LIBADD += $(BUNDLE_LIBS) \
- $(CAPI_APPFW_COMMON_LIBS) \
+LIBDALI_ADAPTOR_LA_LIBADD += $(CAPI_APPFW_COMMON_LIBS) \
$(CAPI_APPFW_CONTROL_LIBS) \
- $(CAPI_APPFW_WIDGET_BASE_LIBS) \
$(ECORE_IMF_LIBS) \
$(FRIBIDI_LIBS)
endif
tizenwatchpublicapidir = $(tizenadaptorpublicapidir)/watch
tizenwatchpublicapi_HEADERS = $(public_dali_watch_header_files)
-if USE_APPFW
-if USE_APPFW_EFL_BASE
-else
-tizenadaptorframeworkdevelapi_HEADERS += $(adaptor_widget_header_files)
-endif
-endif
-
install-data-local:
$(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
PKG_CHECK_MODULES(ELEMENTARY, elementary)
else
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DWIDGET_AVAILABLE"
-PKG_CHECK_MODULES(BUNDLE, bundle)
PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, appcore-ui)
-PKG_CHECK_MODULES(CAPI_APPFW_WIDGET_BASE, appcore-widget-base)
PKG_CHECK_MODULES(CAPI_APPFW_COMMON, capi-appfw-app-common)
PKG_CHECK_MODULES(CAPI_APPFW_CONTROL, capi-appfw-app-control)
fi
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(elementary)
%else
-BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(appcore-ui)
-BuildRequires: pkgconfig(appcore-widget-base)
BuildRequires: pkgconfig(capi-appfw-app-common)
BuildRequires: pkgconfig(capi-appfw-app-control)
BuildRequires: pkgconfig(ecore-imf)