/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
bool g_OnPauseCalled = false;
bool g_OnResumeCalled = false;
bool g_OnResetCalled = false;
-bool g_OnResizeCalled = false;
bool g_OnLanguageChangedCalled = false;
void OnInit()
g_OnResetCalled = true;
}
-void OnResize()
-{
- g_OnResizeCalled = true;
-}
-
void OnLanguageChanged()
{
g_OnLanguageChangedCalled = true;
END_TEST;
}
-int UtcDaliLifecycleControllerSignalResize(void)
-{
- TestApplication app;
- Application application = Application::New();
-
- DALI_TEST_CHECK( !g_OnResizeCalled );
-
- LifecycleController lifecycleController = LifecycleController::Get();
-
- lifecycleController.ResizeSignal().Connect( &OnResize );
-
- GetImplementation( lifecycleController ).OnResize( application );
-
- DALI_TEST_CHECK( g_OnResizeCalled );
-
- END_TEST;
-}
-
int UtcDaliLifecycleControllerSignalLanguageChanged(void)
{
TestApplication app;
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
END_TEST;
}
-int UtcDaliApplicationReplaceWindowN(void)
-{
- Application application;
-
- try
- {
- application.ReplaceWindow( PositionSize(), "window" );
- DALI_TEST_CHECK( false ); // Should not get here
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
int UtcDaliApplicationInitSignalP(void)
{
Application application = Application::New();
END_TEST;
}
-int UtcDaliApplicationResizeSignalP(void)
-{
- Application application = Application::New();
- application.ResizeSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( application );
-
- END_TEST;
-}
-
-int UtcDaliApplicationResizeSignalN(void)
-{
- Application application;
-
- try
- {
- application.ResizeSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( false ); // Should not get here
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
int UtcDaliApplicationlControlSignalP(void)
{
Application application = Application::New();
END_TEST;
}
-int UtcDaliApplicationBatteryLowSignalP(void)
-{
- Application application = Application::New();
- application.BatteryLowSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( application );
-
- END_TEST;
-}
-
-int UtcDaliApplicationBatteryLowSignalN(void)
-{
- Application application;
-
- try
- {
- application.BatteryLowSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( false ); // Should not get here
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliApplicationMemoryLowSignalP(void)
-{
- Application application = Application::New();
- application.MemoryLowSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( application );
-
- END_TEST;
-}
-
-int UtcDaliApplicationMemoryLowSignalN(void)
-{
- Application application;
-
- try
- {
- application.MemoryLowSignal().Connect( &ApplicationSignalCallback );
- DALI_TEST_CHECK( false ); // Should not get here
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
int UtcDaliApplicationLowBatterySignalP(void)
{
Application application = Application::New();
#include <dali/internal/system/linux/dali-ecore-x.h>
#include <dali-test-suite-utils.h>
-namespace Dali
-{
-class DragAndDropDetector : public BaseHandle {}; // For UtcDaliWindowGetDragAndDropDetectorN
-}
using namespace Dali;
END_TEST;
}
-int UtcDaliWindowShowIndicatorN(void)
-{
- Dali::Window window;
- try
- {
- window.ShowIndicator(Dali::Window::VISIBLE);
- DALI_TEST_CHECK( false ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliWindowSetIndicatorBgOpacityN(void)
-{
- Dali::Window window;
- try
- {
- window.SetIndicatorBgOpacity(Dali::Window::OPAQUE);
- DALI_TEST_CHECK( false ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliWindowRotateIndicatorN(void)
-{
- Dali::Window window;
- try
- {
- window.RotateIndicator(Dali::Window::PORTRAIT);
- DALI_TEST_CHECK( false ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
int UtcDaliWindowSetClassN(void)
{
Dali::Window window;
END_TEST;
}
-int UtcDaliWindowGetDragAndDropDetectorN(void)
-{
- Dali::Window window;
- try
- {
- DragAndDropDetector detector = window.GetDragAndDropDetector();
- DALI_TEST_CHECK( !detector ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
int UtcDaliWindowGetNativeHandleN(void)
{
Dali::Window window;
END_TEST;
}
-int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
-{
- Dali::Window window;
- try
- {
- window.IndicatorVisibilityChangedSignal();
- DALI_TEST_CHECK( false ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliWindowFocusChangedSignalN(void)
+int UtcDaliWindowFocusChangeSignalN(void)
{
Dali::Window window;
try
{
- window.FocusChangedSignal();
+ window.FocusChangeSignal();
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
SET( DALI_PROFILE_CFLAGS -DDALI_PROFILE_${enable_profile} )
# Platforms with highp shader support can use vector based text
-CONDITIONAL( ENABLE_VECTOR_BASED_TEXT_RENDERING UBUNTU_PROFILE )
+ADD_DEFINITIONS( "-DENABLE_VECTOR_BASED_TEXT_RENDERING" )
+
CONDITIONAL( WAYLAND enable_wayland )
# set lowercase profile name
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
return GetImplementation(*this).ResetSignal();
}
-LifecycleController::LifecycleSignalType& LifecycleController::ResizeSignal()
-{
- return GetImplementation(*this).ResizeSignal();
-}
-
LifecycleController::LifecycleSignalType& LifecycleController::LanguageChangedSignal()
{
return GetImplementation(*this).LanguageChangedSignal();
#define DALI_LIFECYCLE_CONTROLLER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
LifecycleSignalType& ResetSignal();
/**
- * This signal is emitted when the window the application is rendering on is resized.
- */
- LifecycleSignalType& ResizeSignal();
-
- /**
* This signal is emitted when the language is changed on the device.
*/
LifecycleSignalType& LanguageChangedSignal();
#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/events/touch-event.h>
-#include <dali/public-api/common/view-mode.h>
#include <dali/public-api/object/any.h>
#include <dali/integration-api/processor-interface.h>
// EXTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/common/view-mode.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/signals/callback.h>
#include <dali/public-api/math/uint-16-pair.h>
namespace Adaptor
{
-namespace
-{
-
-const float DEFAULT_STEREO_BASE( 65.0f );
-
-} // unnamed namespace
-
ApplicationPtr Application::gPreInitializedApplication( NULL );
ApplicationPtr Application::New(
mPauseSignal(),
mResumeSignal(),
mResetSignal(),
- mResizeSignal(),
mAppControlSignal(),
mLanguageChangedSignal(),
mRegionChangedSignal(),
- mBatteryLowSignal(),
- mMemoryLowSignal(),
mEventLoop( nullptr ),
mFramework( nullptr ),
mContextLossConfiguration( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ),
mMainWindow(),
mMainWindowMode( windowMode ),
mMainWindowName(),
- mMainWindowReplaced( false ),
mStylesheet( stylesheet ),
mEnvironmentOptions(),
mWindowPositionSize( positionSize ),
mLaunchpadState( Launchpad::NONE ),
- mSlotDelegate( this ),
- mViewMode( MONO ),
- mStereoBase( DEFAULT_STEREO_BASE )
+ mSlotDelegate( this )
{
// Get mName from environment options
mMainWindowName = mEnvironmentOptions.GetWindowName();
mAdaptor = Adaptor::New( graphicsFactory, sceneHolder, mContextLossConfiguration, &mEnvironmentOptions );
- mAdaptor->ResizedSignal().Connect( mSlotDelegate, &Application::OnResize );
-
Adaptor::GetImplementation( *mAdaptor ).SetUseRemoteSurface( mUseRemoteSurface );
}
PauseSignal().Connect( &GetImplementation( lifecycleController ), &LifecycleController::OnPause );
ResumeSignal().Connect( &GetImplementation( lifecycleController ), &LifecycleController::OnResume );
ResetSignal().Connect( &GetImplementation( lifecycleController ), &LifecycleController::OnReset );
- ResizeSignal().Connect( &GetImplementation( lifecycleController ), &LifecycleController::OnResize );
LanguageChangedSignal().Connect( &GetImplementation( lifecycleController ), &LifecycleController::OnLanguageChanged );
Dali::Application application(this);
void Application::OnBatteryLow( Dali::DeviceStatus::Battery::Status status )
{
Dali::Application application(this);
- mBatteryLowSignal.Emit( application );
-
mLowBatterySignal.Emit( status );
}
void Application::OnMemoryLow( Dali::DeviceStatus::Memory::Status status )
{
Dali::Application application(this);
- mMemoryLowSignal.Emit( application );
-
mLowMemorySignal.Emit( status );
}
{
}
-void Application::OnResize(Dali::Adaptor& adaptor)
-{
- Dali::Application application(this);
- mResizeSignal.Emit( application );
-}
-
bool Application::AddIdle( CallbackBase* callback, bool hasReturnValue )
{
return mAdaptor->AddIdle( callback, hasReturnValue );
Dali::Window Application::GetWindow()
{
- // Changed to return a different window handle after ReplaceWindow is called
- // just for backward compatibility to make the test case pass
- if ( mMainWindowReplaced )
- {
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(PositionSize(), "ReplacedWindow", "", false);
- return Dali::Window( window );
- }
- else
- {
- return mMainWindow;
- }
-}
-
-// Stereoscopy
-
-void Application::SetViewMode( ViewMode viewMode )
-{
- mViewMode = viewMode;
-}
-
-ViewMode Application::GetViewMode() const
-{
- return mViewMode;
-}
-
-void Application::SetStereoBase( float stereoBase )
-{
- mStereoBase = stereoBase;
-}
-
-float Application::GetStereoBase() const
-{
- return mStereoBase;
-}
-
-void Application::ReplaceWindow( const PositionSize& positionSize, const std::string& name )
-{
- // This API is kept just for backward compatibility to make the test case pass.
-
- mMainWindowReplaced = true;
- OnResize( *mAdaptor );
+ return mMainWindow;
}
std::string Application::GetResourcePath()
#define DALI_INTERNAL_APPLICATION_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
std::string GetLanguage() const;
/**
- * @copydoc Dali::Application::ReplaceWindow();
- */
- void ReplaceWindow( const PositionSize& positionSize, const std::string& name);
-
- /**
* @copydoc Dali::Application::GetResourcePath();
*/
static std::string GetResourcePath();
*/
static ApplicationPtr GetPreInitializedApplication();
-public: // Stereoscopy
-
- /**
- * @copydoc Dali::Application::SetViewMode()
- */
- void SetViewMode( ViewMode viewMode );
-
- /**
- * @copydoc Dali::Application::GetViewMode()
- */
- ViewMode GetViewMode() const;
-
- /**
- * @copydoc Dali::Application::SetStereoBase()
- */
- void SetStereoBase( float stereoBase );
-
- /**
- * @copydoc Dali::Application::GetStereoBase()
- */
- float GetStereoBase() const;
-
public: // From Framework::Observer
/**
public:
/**
- * Signal handler when the adaptor's window resizes itself.
- * @param[in] adaptor The adaptor
- */
- void OnResize(Dali::Adaptor& adaptor);
-
- /**
* Sets a user defined theme file.
* This should be called before initialization.
* @param[in] stylesheet The path to user defined theme file
Dali::Application::AppControlSignalType& AppControlSignal() { return mAppControlSignal; }
/**
- * @copydoc Dali::Application::ResizeSignal()
- */
- Dali::Application::AppSignalType& ResizeSignal() { return mResizeSignal; }
-
- /**
* @copydoc Dali::Application::LanguageChangedSignal()
*/
Dali::Application::AppSignalType& LanguageChangedSignal() { return mLanguageChangedSignal; }
Dali::Application::AppSignalType& RegionChangedSignal() { return mRegionChangedSignal; }
/**
- * @copydoc Dali::Application::BatteryLowSignal()
- */
- Dali::Application::AppSignalType& BatteryLowSignal() { return mBatteryLowSignal; }
-
- /**
- * @copydoc Dali::Application::MemoryLowSignal()
- */
- Dali::Application::AppSignalType& MemoryLowSignal() { return mMemoryLowSignal; }
-
- /**
* @copydoc Dali::Application::LowBatterySignal()
*/
Dali::Application::LowBatterySignalType& LowBatterySignal() { return mLowBatterySignal; }
AppSignalType mPauseSignal;
AppSignalType mResumeSignal;
AppSignalType mResetSignal;
- AppSignalType mResizeSignal;
AppControlSignalType mAppControlSignal;
AppSignalType mLanguageChangedSignal;
AppSignalType mRegionChangedSignal;
- AppSignalType mBatteryLowSignal;
- AppSignalType mMemoryLowSignal;
LowBatterySignalType mLowBatterySignal;
LowMemorySignalType mLowMemorySignal;
Dali::Application::WINDOW_MODE mMainWindowMode; ///< Window mode of the main window
std::string mMainWindowName; ///< Name of the main window as obtained from environment options
- bool mMainWindowReplaced; ///< Whether the main window has been replaced
-
std::string mStylesheet;
EnvironmentOptions mEnvironmentOptions;
PositionSize mWindowPositionSize;
SlotDelegate< Application > mSlotDelegate;
- ViewMode mViewMode;
- float mStereoBase;
-
static ApplicationPtr gPreInitializedApplication;
};
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
}
}
-Dali::LifecycleController::LifecycleSignalType& LifecycleController::ResizeSignal()
-{
- return mResizeSignal;
-}
-
-void LifecycleController::EmitResizeSignal()
-{
- if( !mResizeSignal.Empty() )
- {
- mResizeSignal.Emit();
- }
-}
-
Dali::LifecycleController::LifecycleSignalType& LifecycleController::LanguageChangedSignal()
{
return mLanguageChangedSignal;
EmitLanguageChangedSignal();
}
-void LifecycleController::OnResize( Dali::Application& app )
-{
- EmitResizeSignal();
-}
-
} // namespace Adaptor
} // namespace Internal
#define DALI_INTERNAL_LIFECYCLE_CONTROLLER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
Dali::LifecycleController::LifecycleSignalType& ResetSignal();
/**
- * @copydoc Dali::StyleMonitor::ResizeSignal()
- */
- Dali::LifecycleController::LifecycleSignalType& ResizeSignal();
-
- /**
* @copydoc Dali::StyleMonitor::LanguageChangedSignal()
*/
Dali::LifecycleController::LifecycleSignalType& LanguageChangedSignal();
*/
void OnLanguageChanged( Dali::Application& app );
- /**
- * Signal handler when the adaptor's window resizes itself.
- *
- * @param[in] app The application instance
- */
- void OnResize( Dali::Application& app );
-
protected:
/**
/**
* Emit the init signal.
*/
- void EmitResizeSignal();
-
- /**
- * Emit the init signal.
- */
void EmitLanguageChangedSignal();
private:
Dali::LifecycleController::LifecycleSignalType mPauseSignal;
Dali::LifecycleController::LifecycleSignalType mResumeSignal;
Dali::LifecycleController::LifecycleSignalType mResetSignal;
- Dali::LifecycleController::LifecycleSignalType mResizeSignal;
Dali::LifecycleController::LifecycleSignalType mLanguageChangedSignal;
};
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#ifdef ENABLE_VECTOR_BASED_TEXT_RENDERING
-#include <dali/internal/text/glyphy/vector-font-cache.h>
+#include <third-party/glyphy/vector-font-cache.h>
#else
class VectorFontCache;
#endif
*/
// CLASS HEADER
-#include <dali/internal/text/glyphy/vector-font-cache.h>
+#include <third-party/glyphy/vector-font-cache.h>
// EXTERNAL INCLUDES
#include <vector>
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
mWindowHeight( 0 ),
mOrientationMode( Internal::Adaptor::Window::OrientationMode::PORTRAIT ),
mNativeWindowId( -1 ),
- mFocusChangedSignal(),
mResizedSignal(),
mDeleteRequestSignal(),
mFocusChangeSignal(),
mWindowSurface = static_cast<WindowRenderSurface*>( surface );
}
-void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
-{
-}
-
-void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode )
-{
-}
-
-void Window::RotateIndicator( Dali::Window::WindowOrientation orientation )
-{
-}
-
void Window::SetClass( std::string name, std::string className )
{
mName = name;
void Window::OnFocusChanged( bool focusIn )
{
Dali::Window handle( this );
- mFocusChangedSignal.Emit( focusIn );
mFocusChangeSignal.Emit( handle, focusIn );
GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
#define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
class Window : public Dali::Internal::Adaptor::SceneHolder, public EventHandler::Observer, public ConnectionTracker
{
public:
- typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
- typedef Dali::Window::FocusSignalType FocusSignalType;
typedef Dali::Window::ResizedSignalType ResizedSignalType;
typedef Dali::Window::FocusChangeSignalType FocusChangeSignalType;
typedef Dali::Window::ResizeSignalType ResizeSignalType;
static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false);
/**
- * @copydoc Dali::Window::ShowIndicator()
- */
- void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode );
-
- /**
- * @copydoc Dali::Window::SetIndicatorBgOpacity()
- */
- void SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacity );
-
- /**
- * @copydoc Dali::Window::RotateIndicator()
- */
- void RotateIndicator( Dali::Window::WindowOrientation orientation );
-
- /**
* @copydoc Dali::Window::SetClass()
*/
void SetClass( std::string name, std::string className );
public: // Signals
/**
- * The user should connect to this signal to get a timing when indicator was shown / hidden.
- */
- IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
-
- /**
- * @copydoc Dali::Window::FocusChangedSignal()
- */
- FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
-
- /**
- * @copydoc Dali::Window::WindowFocusChangedSignal()
+ * @copydoc Dali::Window::FocusChangeSignal()
*/
FocusChangeSignalType& FocusChangeSignal() { return mFocusChangeSignal; }
/**
int mNativeWindowId; ///< The Native Window Id
// Signals
- IndicatorSignalType mIndicatorVisibilityChangedSignal;
- FocusSignalType mFocusChangedSignal;
ResizedSignalType mResizedSignal;
SignalType mDeleteRequestSignal;
FocusChangeSignalType mFocusChangeSignal;
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
return Internal::Adaptor::GetImplementation(*this).GetWindow();
}
-void Application::ReplaceWindow(PositionSize windowPosition, const std::string& name)
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ReplaceWindow is deprecated and will be removed from next release.\n" );
-
- Internal::Adaptor::GetImplementation(*this).ReplaceWindow(windowPosition, name);
-}
-
std::string Application::GetResourcePath()
{
return Internal::Adaptor::Application::GetResourcePath();
return Internal::Adaptor::GetImplementation(*this).GetLanguage();
}
-void Application::SetViewMode( ViewMode viewMode )
-{
- Internal::Adaptor::GetImplementation(*this).SetViewMode( viewMode );
-}
-
-ViewMode Application::GetViewMode() const
-{
- return Internal::Adaptor::GetImplementation(*this).GetViewMode();
-}
-
-void Application::SetStereoBase( float stereoBase )
-{
- Internal::Adaptor::GetImplementation(*this).SetStereoBase( stereoBase );
-}
-
-float Application::GetStereoBase() const
-{
- return Internal::Adaptor::GetImplementation(*this).GetStereoBase();
-}
-
Application::AppSignalType& Application::InitSignal()
{
return Internal::Adaptor::GetImplementation(*this).InitSignal();
return Internal::Adaptor::GetImplementation(*this).ResetSignal();
}
-Application::AppSignalType& Application::ResizeSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: ResizeSignal() is deprecated and will be removed from next release. Use Window::ResizedSignal() instead.\n" );
-
- return Internal::Adaptor::GetImplementation(*this).ResizeSignal();
-}
-
Application::AppControlSignalType & Application::AppControlSignal()
{
return Internal::Adaptor::GetImplementation(*this).AppControlSignal();
return Internal::Adaptor::GetImplementation(*this).RegionChangedSignal();
}
-Application::AppSignalType& Application::BatteryLowSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: BatteryLowSignal() is deprecated and will be removed from next release. Use Application::LowBatterySignal() instead.\n" );
- return Internal::Adaptor::GetImplementation(*this).BatteryLowSignal();
-}
-
-Application::AppSignalType& Application::MemoryLowSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: MemoryLowSignal() is deprecated and will be removed from next release. Use Application::LowMemorySignal() instead.\n" );
- return Internal::Adaptor::GetImplementation(*this).MemoryLowSignal();
-}
-
Application::LowBatterySignalType& Application::LowBatterySignal()
{
return Internal::Adaptor::GetImplementation(*this).LowBatterySignal();
#define DALI_APPLICATION_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/common/view-mode.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/signals/callback.h>
/**
* @brief This starts the application, and allows the app to choose a different configuration.
*
- * If the application plans on using the ReplaceSurface or ReplaceWindow API, then this will
- * trigger context loss & regain.
* The application should listen to Stage::ContextLostSignal and Stage::ContextRegainedSignal.
* @SINCE_1_0.0
* @param[in] configuration The context loss configuration
Window GetWindow();
/**
- * @DEPRECATED_1_4.12
- * @brief Replaces the current window.
- *
- * This will force context loss.
- * If you plan on using this API in your application, then you should configure
- * it to prevent discard behavior when handling the Init signal.
- * @SINCE_1_0.0
- * @param[in] windowPosition The position and size parameters of the new window
- * @param[in] name The name of the new window
- */
- void ReplaceWindow(PositionSize windowPosition, const std::string& name) DALI_DEPRECATED_API;
-
- /**
* @brief Get path application resources are stored at
*
* @SINCE_1_2.2
*/
std::string GetLanguage() const;
-public: // Stereoscopy
-
- /**
- * @DEPRECATED_1_3_51
- * @brief Sets the viewing mode for the application.
- * @SINCE_1_0.0
- * @param[in] viewMode The new viewing mode
- */
- void SetViewMode( ViewMode viewMode );
-
- /**
- * @DEPRECATED_1_3_51
- * @brief Gets the current viewing mode.
- * @SINCE_1_0.0
- * @return The current viewing mode
- */
- ViewMode GetViewMode() const;
-
- /**
- * @DEPRECATED_1_3_51
- * @brief Sets the stereo base (eye separation) for Stereoscopic 3D.
- *
- * The stereo base is the distance in millimetres between the eyes. Typical values are
- * between 50mm and 70mm. The default value is 65mm.
- * @SINCE_1_0.0
- * @param[in] stereoBase The stereo base (eye separation) for Stereoscopic 3D
- */
- void SetStereoBase( float stereoBase );
-
- /**
- * @DEPRECATED_1_3_51
- * @brief Gets the stereo base (eye separation) for Stereoscopic 3D.
- *
- * @SINCE_1_0.0
- * @return The stereo base (eye separation) for Stereoscopic 3D
- */
- float GetStereoBase() const;
-
public: // Signals
/**
AppSignalType& ResetSignal();
/**
- * @DEPRECATED_1_2.62 Use Window::ResizedSignal() instead.
- * @brief This signal is emitted when the window application rendering on is resized.
- * @SINCE_1_0.0
- * @return The signal to connect to
- */
- AppSignalType& ResizeSignal() DALI_DEPRECATED_API;
-
- /**
* @brief This signal is emitted when another application sends a launch request to the application.
*
* When the application is launched, this signal is emitted after the main loop of the application starts up.
AppSignalType& RegionChangedSignal();
/**
- * @DEPRECATED_1_2.62 Use LowBatterySignal() instead.
- * @brief This signal is emitted when the battery level of the device is low.
- * @SINCE_1_0.0
- * @return The signal to connect to
- */
- AppSignalType& BatteryLowSignal() DALI_DEPRECATED_API;
-
- /**
- * @DEPRECATED_1_2.62 Use LowMemorySignal() instead.
- * @brief This signal is emitted when the memory level of the device is low.
- * @SINCE_1_0.0
- * @return The signal to connect to
- */
- AppSignalType& MemoryLowSignal() DALI_DEPRECATED_API;
-
- /**
* @brief This signal is emitted when the battery level of the device is low.
* @SINCE_1_2.62
* @return The signal to connect to
#define DALI_INPUT_MEHTOD_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
ACTION_NONE ///< Nothing to do @SINCE_1_0.0
};
-/**
- * @DEPRECATED_1_3.20 Use Category instead.
- * @brief Enumeration for settings that can be changed in the system Input Method.
- *
- * Not all these settings are supported by all systems.
- * @SINCE_1_0.0
- */
-enum Settings
-{
- ACTION_BUTTON, ///< ActionButton. Apply the one of the ActionButton functions to the action button (return button). @SINCE_1_0.0
- AUTO_CAPITALISE, ///< boolean. Capitalize the first letter of each sentence automatically. @SINCE_1_0.0
- AUTO_COMPLETE, ///< boolean. Suggest words based on the current input. @SINCE_1_0.0
- AUTO_CORRECT ///< boolean. Automatically correct commonly misspelt words. @SINCE_1_0.0
-};
-
} // namespace InputMethod
/**
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
namespace Dali
{
-class DALI_INTERNAL DragAndDropDetector : public BaseHandle {}; // Empty class only required to compile Deprecated API GetDragAndDropDetector
-
Window Window::New(PositionSize posSize, const std::string& name, bool isTransparent)
{
return Dali::Window::New(posSize, name, "", isTransparent);
return GetImplementation( *this ).GetLayer( depth );
}
-void Window::ShowIndicator( IndicatorVisibleMode visibleMode )
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ShowIndicator is deprecated and will be removed from next release.\n" );
-
- GetImplementation(*this).ShowIndicator( visibleMode );
-}
-
-Window::IndicatorSignalType& Window::IndicatorVisibilityChangedSignal()
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: IndicatorVisibilityChangedSignal is deprecated and will be removed from next release.\n" );
-
- return GetImplementation(*this).IndicatorVisibilityChangedSignal();
-}
-
-void Window::SetIndicatorBgOpacity( IndicatorBgOpacity opacity )
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetIndicatorBgOpacity is deprecated and will be removed from next release.\n" );
-
- GetImplementation(*this).SetIndicatorBgOpacity( opacity );
-}
-
-void Window::RotateIndicator( WindowOrientation orientation )
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: RotateIndicator is deprecated and will be removed from next release.\n" );
-
- GetImplementation(*this).RotateIndicator( orientation );
-}
-
void Window::SetClass( std::string name, std::string klass )
{
GetImplementation(*this).SetClass( name, klass );
return GetImplementation(*this).GetPreferredOrientation();
}
-DragAndDropDetector Window::GetDragAndDropDetector() const
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetDragAndDropDetector is deprecated and will be removed from the next release.\n" );
- DALI_ASSERT_ALWAYS( &GetImplementation( *this ) == GetObjectPtr() && "Empty Handle" );
- return Dali::DragAndDropDetector();
-}
-
Any Window::GetNativeHandle() const
{
return GetImplementation(*this).GetNativeHandle();
}
-Window::FocusSignalType& Window::FocusChangedSignal()
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: FocusChangedSignal is deprecated and will be removed from next release.\n" );
- return GetImplementation(*this).FocusChangedSignal();
-}
-
Window::FocusChangeSignalType& Window::FocusChangeSignal()
{
return GetImplementation(*this).FocusChangeSignal();
#define DALI_WINDOW_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
typedef Uint16Pair WindowSize; ///< Window size type @SINCE_1_2.60
typedef Uint16Pair WindowPosition; ///< Window position type @SINCE_1_2.60
- typedef Signal< void (bool) > IndicatorSignalType; ///< @DEPRECATED_1_4.9 @brief Indicator state signal type @SINCE_1_0.0
- typedef Signal< void (bool) > FocusSignalType; ///< @DEPRECATED_1_4.35 @brief Window focus signal type @SINCE_1_2.60
typedef Signal< void (WindowSize) > ResizedSignalType; ///< @DEPRECATED_1_4.35 @brief Window resized signal type @SINCE_1_2.60
typedef Signal< void (Window,bool) > FocusChangeSignalType; ///< Window focus signal type @SINCE_1_4.35
typedef Signal< void (Window,WindowSize) > ResizeSignalType; ///< Window resized signal type @SINCE_1_4.35
};
/**
- * @DEPRECATED_1_4.9
- * @brief Enumeration for opacity of the indicator.
- * @SINCE_1_0.0
- */
- enum IndicatorBgOpacity
- {
- OPAQUE = 100, ///< @DEPRECATED_1_4.9 @brief Fully opaque indicator Bg @SINCE_1_0.0
- TRANSLUCENT = 50, ///< @DEPRECATED_1_4.9 @brief Semi translucent indicator Bg @SINCE_1_0.0
- TRANSPARENT = 0 ///< @DEPRECATED_1_4.9 @brief Fully transparent indicator Bg @SINCE_1_0.0
- };
-
- /**
- * @DEPRECATED_1_4.9
- * @brief Enumeration for visible mode of the indicator.
- * @SINCE_1_0.0
- */
- enum IndicatorVisibleMode
- {
- INVISIBLE = 0, ///< @DEPRECATED_1_4.9 @brief Hide indicator @SINCE_1_0.0
- VISIBLE = 1, ///< @DEPRECATED_1_4.9 @brief Show indicator @SINCE_1_0.0
- AUTO = 2 ///< @DEPRECATED_1_4.9 @brief Hide in default, will show when necessary @SINCE_1_0.0
- };
-
- /**
* @brief An enum of Window types.
* @SINCE_1_2.60
*/
Layer GetLayer( uint32_t depth ) const;
/**
- * @DEPRECATED_1_4.9
- * @brief This sets whether the indicator bar should be shown or not.
- * @SINCE_1_0.0
- * @param[in] visibleMode Visible mode for indicator bar, VISIBLE in default
- */
- void ShowIndicator( IndicatorVisibleMode visibleMode ) DALI_DEPRECATED_API;
-
- /**
- * @DEPRECATED_1_4.9
- * @brief This sets the opacity mode of indicator bar.
- * @SINCE_1_0.0
- * @param[in] opacity The opacity mode
- */
- void SetIndicatorBgOpacity( IndicatorBgOpacity opacity ) DALI_DEPRECATED_API;
-
- /**
- * @DEPRECATED_1_4.9
- * @brief This sets the orientation of indicator bar.
- *
- * It does not implicitly show the indicator if it is currently hidden.
- * @SINCE_1_0.0
- * @param[in] orientation The orientation
- */
- void RotateIndicator(WindowOrientation orientation) DALI_DEPRECATED_API;
-
- /**
* @brief Sets the window name and class string.
* @SINCE_1_0.0
* @param[in] name The name of the window
WindowOrientation GetPreferredOrientation();
/**
- * @DEPRECATED_1_4.19 Was not intended for Application developers
- * @brief Returns an empty handle.
- * @note Not intended for application developers.
- * @SINCE_1_0.0
- * @return An empty handle
- */
- DragAndDropDetector GetDragAndDropDetector() const DALI_DEPRECATED_API;
-
- /**
* @brief Gets the native handle of the window.
*
* When users call this function, it wraps the actual type used by the underlying window system.
void SetTransparency( bool transparent );
public: // Signals
- /**
- * @DEPRECATED_1_4.9
- * @brief The user should connect to this signal to get a timing when indicator was shown / hidden.
- * @SINCE_1_0.0
- * @return The signal to connect to
- */
- IndicatorSignalType& IndicatorVisibilityChangedSignal() DALI_DEPRECATED_API;
-
- /**
- * @DEPRECATED_1_4.35
- * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
- *
- * A callback of the following type may be connected:
- * @code
- * void YourCallbackName( bool focusIn );
- * @endcode
- * The parameter is true if window gains focus, otherwise false.
- *
- * @SINCE_1_2.60
- * @return The signal to connect to
- */
- FocusSignalType& FocusChangedSignal() DALI_DEPRECATED_API;
/**
* @brief This signal is emitted when the window is resized.