END_TEST;
}
-int UtcDaliApplicationMainLoop02N(void)
-{
- Application application;
-
- try
- {
- application.MainLoop( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
- DALI_TEST_CHECK( false ); // Should not get here
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
int UtcDaliApplicationLowerN(void)
{
enum State
{
- Clear, ///< There is no state associated with this gesture. @SINCE_1_0.0
- Started, ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_0.0
- Continuing, ///< The gesture is continuing. @SINCE_1_0.0
- Finished, ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_0.0
- Cancelled, ///< The gesture has been cancelled. @SINCE_1_0.0
- Possible ///< A gesture is possible. @SINCE_1_0.0
+ CLEAR, ///< There is no state associated with this gesture. @SINCE_1_9.28
+ STARTED, ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_9.28
+ CONTINUING, ///< The gesture is continuing. @SINCE_1_9.28
+ FINISHED, ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_9.28
+ CANCELLED, ///< The gesture has been cancelled. @SINCE_1_9.28
+ POSSIBLE ///< A gesture is possible. @SINCE_1_9.28
};
State state;
*/
enum TextDirection
{
- LeftToRight,
- RightToLeft,
+ LEFT_TO_RIGHT,
+ RIGHT_TO_LEFT,
};
/**
*/
enum TextDirection
{
- LeftToRight,
- RightToLeft,
+ LEFT_TO_RIGHT,
+ RIGHT_TO_LEFT,
};
/**
typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type
-typedef Signal< void (const TouchEvent&) > TouchSignalType; ///< Touch signal type
+typedef Signal< void (const TouchEvent&) > TouchEventSignalType; ///< Touch signal type
typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Touched signal type
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/window.h>
-#include <dali/public-api/adaptor-framework/application-configuration.h>
#include <dali/public-api/dali-adaptor-common.h>
#include <dali/integration-api/adaptor-framework/log-factory-interface.h>
static Adaptor& New( Window window );
/**
- * @brief Create a new adaptor using the window.
- *
- * @param[in] window The window to draw onto
- * @param[in] configuration The context loss configuration.
- * @return a reference to the adaptor handle
- */
- static Adaptor& New( Window window, Configuration::ContextLoss configuration );
-
- /**
* @brief Create a new adaptor using render surface.
*
* @param[in] window The window to draw onto
static Adaptor& New( Window window, const Dali::RenderSurfaceInterface& surface );
/**
- * @brief Create a new adaptor using render surface.
- *
- * @param[in] window The window to draw onto
- * @param[in] surface The surface to draw onto
- * @param[in] configuration The context loss configuration.
- * @return a reference to the adaptor handle
- */
- static Adaptor& New( Window window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
-
- /**
* @brief Create a new adaptor using the SceneHolder.
*
* @param[in] sceneHolder The SceneHolder to draw onto
static Adaptor& New( Dali::Integration::SceneHolder sceneHolder );
/**
- * @brief Create a new adaptor using the SceneHolder.
- *
- * @param[in] sceneHolder The SceneHolder to draw onto
- * @param[in] configuration The context loss configuration.
- * @return a reference to the adaptor handle
- */
- static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, Configuration::ContextLoss configuration );
-
- /**
* @brief Create a new adaptor using render surface.
*
* @param[in] sceneHolder The SceneHolder to draw onto
static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, const Dali::RenderSurfaceInterface& surface );
/**
- * @brief Create a new adaptor using render surface.
- *
- * @param[in] sceneHolder The SceneHolder to draw onto
- * @param[in] surface The surface to draw onto
- * @param[in] configuration The context loss configuration.
- * @return a reference to the adaptor handle
- */
- static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
-
- /**
* @brief Virtual Destructor.
*/
virtual ~Adaptor();
Integration::TouchEvent touchEvent;
Integration::HoverEvent hoverEvent;
Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
- if( type != Integration::TouchEventCombiner::DispatchNone )
+ if( type != Integration::TouchEventCombiner::DISPATCH_NONE )
{
DALI_LOG_INFO( gSceneHolderLogFilter, Debug::Verbose, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetScreenPosition().x, point.GetScreenPosition().y );
Dali::BaseHandle sceneHolder( this );
// First the touch and/or hover event & related gesture events are queued
- if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth )
+ if( type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH )
{
mScene.QueueEvent( touchEvent );
}
- if( type == Integration::TouchEventCombiner::DispatchHover || type == Integration::TouchEventCombiner::DispatchBoth )
+ if( type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH )
{
mScene.QueueEvent( hoverEvent );
}
Dali::Integration::SceneHolder::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); }
/**
- * @copydoc Dali::Integration::SceneHolder::TouchSignal()
+ * @copydoc Dali::Integration::SceneHolder::TouchedSignal()
*/
- Dali::Integration::SceneHolder::TouchSignalType& TouchSignal() { return mScene.TouchSignal(); }
+ Dali::Integration::SceneHolder::TouchEventSignalType& TouchedSignal() { return mScene.TouchedSignal(); }
/**
* @copydoc Dali::Integration::SceneHolder::WheelEventSignal()
return GetImplementation(*this).KeyEventGeneratedSignal();
}
-SceneHolder::TouchSignalType& SceneHolder::TouchSignal()
+SceneHolder::TouchEventSignalType& SceneHolder::TouchedSignal()
{
- return GetImplementation(*this).TouchSignal();
+ return GetImplementation(*this).TouchedSignal();
}
SceneHolder::WheelEventSignalType& SceneHolder::WheelEventSignal()
typedef Signal< bool (const Dali::KeyEvent&) > KeyEventGeneratedSignalType; ///< Key event generated signal type
- typedef Signal< void (const Dali::TouchEvent&) > TouchSignalType; ///< Touch signal type
+ typedef Signal< void (const Dali::TouchEvent&) > TouchEventSignalType; ///< Touch signal type
typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType; ///< Touched signal type
* @return The touch signal to connect to
* @note Motion events are not emitted.
*/
- TouchSignalType& TouchSignal();
+ TouchEventSignalType& TouchedSignal();
/**
* @brief This signal is emitted when wheel event is received.
Integration::TouchEvent touchEvent;
Integration::HoverEvent hoverEvent;
Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent( Integration::Point( point ), timeStamp, touchEvent, hoverEvent );
- if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth ) // hover event is ignored
+ if( type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH ) // hover event is ignored
{
// Process the touch event in accessibility gesture detector
if( mAccessibilityGestureDetector )
AccessibilityGestureDetector::AccessibilityGestureDetector()
-: mState( Clear ),
+: mState( CLEAR ),
mScene(nullptr),
mGestureHandler(nullptr),
mPanning(false),
{
if( mGestureHandler )
{
- if(gesture.state == AccessibilityGestureEvent::Started)
+ if(gesture.state == AccessibilityGestureEvent::STARTED)
{
mPanning = true;
}
{
mGestureHandler->HandlePanGesture(gesture);
- if( (gesture.state == AccessibilityGestureEvent::Finished) ||
- (gesture.state == AccessibilityGestureEvent::Cancelled) )
+ if( (gesture.state == AccessibilityGestureEvent::FINISHED) ||
+ (gesture.state == AccessibilityGestureEvent::CANCELLED) )
{
mPanning = false;
}
if (primaryPointState == PointState::INTERRUPTED)
{
- if ( ( mState == Started ) || ( mState == Possible ) )
+ if ( ( mState == STARTED ) || ( mState == POSSIBLE ) )
{
// If our pan had started and we are interrupted, then tell Core that pan is cancelled.
mTouchEvents.push_back(event);
- SendPan(AccessibilityGestureEvent::Cancelled, event);
+ SendPan(AccessibilityGestureEvent::CANCELLED, event);
}
- mState = Clear; // We should change our state to Clear.
+ mState = CLEAR; // We should change our state to CLEAR.
mTouchEvents.clear();
}
else
{
switch (mState)
{
- case Clear:
+ case CLEAR:
{
if ( ( primaryPointState == PointState::DOWN ) || ( primaryPointState == PointState::STATIONARY ) )
{
if (event.GetPointCount() == mMinimumTouchesRequired)
{
// We have satisfied the minimum touches required for a pan, tell core that a gesture may be possible and change our state accordingly.
- mState = Possible;
- SendPan(AccessibilityGestureEvent::Possible, event);
+ mState = POSSIBLE;
+ SendPan(AccessibilityGestureEvent::POSSIBLE, event);
}
mTouchEvents.push_back(event);
break;
}
- case Possible:
+ case POSSIBLE:
{
unsigned int pointCount(event.GetPointCount());
if ( (pointCount >= mMinimumTouchesRequired)&&(pointCount <= mMaximumTouchesRequired) )
( delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) ) )
{
// If the touch point(s) have moved enough distance to be considered a pan, then tell Core that the pan gesture has started and change our state accordingly.
- mState = Started;
- SendPan(AccessibilityGestureEvent::Started, event);
+ mState = STARTED;
+ SendPan(AccessibilityGestureEvent::STARTED, event);
}
}
else if (primaryPointState == PointState::UP)
Vector2 delta(event.points[0].GetScreenPosition() - mPrimaryTouchDownLocation);
if (delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) )
{
- SendPan(AccessibilityGestureEvent::Started, event);
+ SendPan(AccessibilityGestureEvent::STARTED, event);
mTouchEvents.push_back(event);
- SendPan(AccessibilityGestureEvent::Finished, event);
+ SendPan(AccessibilityGestureEvent::FINISHED, event);
}
else
{
- // If we have lifted the primary touch point then tell core the pan is cancelled and change our state to Clear.
- SendPan(AccessibilityGestureEvent::Cancelled, event);
+ // If we have lifted the primary touch point then tell core the pan is cancelled and change our state to CLEAR.
+ SendPan(AccessibilityGestureEvent::CANCELLED, event);
}
- mState = Clear;
+ mState = CLEAR;
mTouchEvents.clear();
}
}
else
{
// We do not satisfy pan conditions, tell Core our Gesture has been cancelled.
- SendPan(AccessibilityGestureEvent::Cancelled, event);
+ SendPan(AccessibilityGestureEvent::CANCELLED, event);
if (pointCount == 1 && primaryPointState == PointState::UP)
{
- // If we have lifted the primary touch point, then change our state to Clear...
- mState = Clear;
+ // If we have lifted the primary touch point, then change our state to CLEAR...
+ mState = CLEAR;
mTouchEvents.clear();
}
else
{
- // ...otherwise change it to Failed.
- mState = Failed;
+ // ...otherwise change it to FAILED.
+ mState = FAILED;
}
}
break;
}
- case Started:
+ case STARTED:
{
mTouchEvents.push_back(event);
{
case PointState::MOTION:
// Pan is continuing, tell Core.
- SendPan(AccessibilityGestureEvent::Continuing, event);
+ SendPan(AccessibilityGestureEvent::CONTINUING, event);
break;
case PointState::UP:
- // Pan is finally finished when our primary point is lifted, tell Core and change our state to Clear.
- SendPan(AccessibilityGestureEvent::Finished, event);
- mState = Clear;
+ // Pan is finally finished when our primary point is lifted, tell Core and change our state to CLEAR.
+ SendPan(AccessibilityGestureEvent::FINISHED, event);
+ mState = CLEAR;
mTouchEvents.clear();
break;
{
if(iter->GetState() == PointState::UP)
{
- // The number of touch points will be less than the minimum required. Inform core and change our state to Finished.
- SendPan(AccessibilityGestureEvent::Finished, event);
- mState = Finished;
+ // The number of touch points will be less than the minimum required. Inform core and change our state to FINISHED.
+ SendPan(AccessibilityGestureEvent::FINISHED, event);
+ mState = FINISHED;
break;
}
}
else
{
// We have gone outside of the pan requirements, inform Core that the gesture is finished.
- SendPan(AccessibilityGestureEvent::Finished, event);
+ SendPan(AccessibilityGestureEvent::FINISHED, event);
if (pointCount == 1 && primaryPointState == PointState::UP)
{
- // If this was the primary point being released, then we change our state back to Clear...
- mState = Clear;
+ // If this was the primary point being released, then we change our state back to CLEAR...
+ mState = CLEAR;
mTouchEvents.clear();
}
else
{
- // ...otherwise we change it to Finished.
- mState = Finished;
+ // ...otherwise we change it to FINISHED.
+ mState = FINISHED;
}
}
break;
}
- case Finished:
- case Failed:
+ case FINISHED:
+ case FAILED:
{
if (primaryPointState == PointState::UP)
{
// Change our state back to clear when the primary touch point is released.
- mState = Clear;
+ mState = CLEAR;
mTouchEvents.clear();
}
break;
uint32_t previousTime( previousEvent.time );
// If we've just started then we want to remove the threshold from Core calculations.
- if ( state == AccessibilityGestureEvent::Started )
+ if ( state == AccessibilityGestureEvent::STARTED )
{
previousPosition = mPrimaryTouchDownLocation;
previousTime = mPrimaryTouchDownTime;
*/
enum State
{
- Clear, ///< No gesture detected.
- Possible, ///< The current touch event data suggests that a gesture is possible.
- Started, ///< A gesture has been detected.
- Finished, ///< A previously started pan gesture has finished.
- Failed, ///< Current touch event data suggests a pan gesture is not possible.
+ CLEAR, ///< No gesture detected.
+ POSSIBLE, ///< The current touch event data suggests that a gesture is possible.
+ STARTED, ///< A gesture has been detected.
+ FINISHED, ///< A previously started pan gesture has finished.
+ FAILED, ///< Current touch event data suggests a pan gesture is not possible.
};
State mState; ///< The current state of the detector.
} // unnamed namespace
-Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions )
{
Dali::Adaptor* adaptor = new Dali::Adaptor;
Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions );
Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder = new AdaptorBuilder();
auto graphicsFactory = mAdaptorBuilder->GetGraphicsFactory();
- impl->Initialize( graphicsFactory, configuration );
+ impl->Initialize( graphicsFactory );
delete mAdaptorBuilder; // Not needed anymore as the graphics interface has now been created
return adaptor;
}
-Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, EnvironmentOptions* environmentOptions )
{
Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( window );
- Dali::Adaptor* adaptor = New( window, windowImpl.GetSurface(), configuration, environmentOptions );
+ Dali::Adaptor* adaptor = New( window, windowImpl.GetSurface(), environmentOptions );
windowImpl.SetAdaptor( *adaptor );
return adaptor;
}
-Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions )
{
Dali::Adaptor* adaptor = new Dali::Adaptor; // Public adaptor
Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions ); // Impl adaptor
adaptor->mImpl = impl;
- impl->Initialize( graphicsFactory, configuration );
+ impl->Initialize( graphicsFactory );
return adaptor;
} // Called second
-Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, EnvironmentOptions* environmentOptions )
{
Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( window );
- Dali::Adaptor* adaptor = New( graphicsFactory, window, windowImpl.GetSurface(), configuration, environmentOptions );
+ Dali::Adaptor* adaptor = New( graphicsFactory, window, windowImpl.GetSurface(), environmentOptions );
windowImpl.SetAdaptor( *adaptor );
return adaptor;
} // Called first
-void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration::ContextLoss configuration )
+void Adaptor::Initialize( GraphicsFactory& graphicsFactory )
{
// all threads here (event, update, and render) will send their logs to TIZEN Platform's LogMessage handler.
Dali::Integration::Log::LogFunction logFunction( Dali::TizenPlatform::LogMessage );
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
Dali::RenderSurfaceInterface* surface,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
* @param[in] window The window handle
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
Dali::Integration::SceneHolder window,
Dali::RenderSurfaceInterface* surface,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
* @param[in] graphicsFactory A factory that creates the graphics interface
* @param[in] window The window handle
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
Dali::Integration::SceneHolder window,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* 2-step initialisation, this should be called after creating an adaptor instance.
* @param[in] graphicsFactory A factory that creates the graphics interface
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
*/
- void Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration::ContextLoss configuration );
+ void Initialize( GraphicsFactory& graphicsFactory );
/**
* Virtual destructor.
Adaptor& Adaptor::New( Window window )
{
- return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
-}
-
-Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
-{
Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window );
- Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), configuration, NULL );
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), NULL );
return *adaptor;
}
Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface )
{
- return New( window, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
-}
-
-Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration )
-{
Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window );
Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
- Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, configuration, NULL );
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, NULL );
return *adaptor;
}
Adaptor& Adaptor::New( Dali::Integration::SceneHolder window )
{
- return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
-}
-
-Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, Configuration::ContextLoss configuration )
-{
- Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL );
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, NULL );
return *adaptor;
}
Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface )
{
- return New( window, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
-}
-
-Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration )
-{
Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
- Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, configuration, NULL );
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, NULL );
return *adaptor;
}
mRegionChangedSignal(),
mEventLoop( nullptr ),
mFramework( nullptr ),
- mContextLossConfiguration( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ),
mCommandLineOptions( nullptr ),
mAdaptorBuilder( nullptr ),
mAdaptor( nullptr ),
Integration::SceneHolder sceneHolder = Integration::SceneHolder( &Dali::GetImplementation( mMainWindow ) );
- mAdaptor = Adaptor::New( graphicsFactory, sceneHolder, mContextLossConfiguration, &mEnvironmentOptions );
+ mAdaptor = Adaptor::New( graphicsFactory, sceneHolder, &mEnvironmentOptions );
Adaptor::GetImplementation( *mAdaptor ).SetUseRemoteSurface( mUseRemoteSurface );
}
mAdaptorBuilder = new AdaptorBuilder();
}
-void Application::MainLoop(Dali::Configuration::ContextLoss configuration)
+void Application::MainLoop()
{
- mContextLossConfiguration = configuration;
-
// Run the application
mFramework->Run();
}
/**
* @copydoc Dali::Application::MainLoop()
*/
- void MainLoop(Dali::Configuration::ContextLoss configuration);
+ void MainLoop();
/**
* @copydoc Dali::Application::Lower()
EventLoop* mEventLoop;
Framework* mFramework;
- Dali::Configuration::ContextLoss mContextLossConfiguration;
CommandLineOptions* mCommandLineOptions;
Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder; ///< The adaptor builder
Dali::InputMethodContext::TextDirection InputMethodContextGeneric::GetTextDirection()
{
- Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+ Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
return direction;
}
{
DALI_LOG_INFO( gLogFilter, Debug::General, "VirtualKeyboard::GetTextDirection\n" );
- return Dali::VirtualKeyboard::LeftToRight;
+ return Dali::VirtualKeyboard::LEFT_TO_RIGHT;
}
} // namespace VirtualKeyboard
Dali::VirtualKeyboard::TextDirection GetTextDirection()
{
- Dali::VirtualKeyboard::TextDirection direction ( Dali::VirtualKeyboard::LeftToRight );
+ Dali::VirtualKeyboard::TextDirection direction ( Dali::VirtualKeyboard::LEFT_TO_RIGHT );
return direction;
}
Dali::InputMethodContext::TextDirection InputMethodContextEcoreWl::GetTextDirection()
{
- Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+ Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
if ( mIMFContext )
{
Dali::InputMethodContext::TextDirection InputMethodContextX::GetTextDirection()
{
- Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+ Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
if ( mIMFContext )
{
\r
Dali::InputMethodContext::TextDirection InputMethodContextWin::GetTextDirection()\r
{\r
- Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );\r
+ Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );\r
\r
return direction;\r
}\r
Dali::VirtualKeyboard::TextDirection GetTextDirection()
{
- return Dali::VirtualKeyboard::LeftToRight;
+ return Dali::VirtualKeyboard::LEFT_TO_RIGHT;
}
void RotateTo(int angle)
const LocaleDirectionInfo LOCALE_DIRECTION_LOOKUP_TABLE[] =
{
- { "af", "Afrikaans", Locale::LeftToRight },
- { "am", "Amharic", Locale::LeftToRight },
- { "ar", "Arabic", Locale::RightToLeft },
- { "as", "Assamese", Locale::LeftToRight },
- { "az", "Azerbaijani", Locale::LeftToRight },
- { "be", "Belarusian", Locale::LeftToRight },
- { "bg", "Bulgarian", Locale::LeftToRight },
- { "bn", "Bengali", Locale::LeftToRight },
- { "bo", "Tibetan", Locale::LeftToRight },
- { "bs", "Bosnian", Locale::LeftToRight },
- { "ca", "Catalan", Locale::LeftToRight },
- { "ck", "Iraq", Locale::RightToLeft },
- { "cs", "Czech", Locale::LeftToRight },
- { "cy", "Welsh", Locale::LeftToRight },
- { "da", "Danish", Locale::LeftToRight },
- { "de", "German", Locale::LeftToRight },
- { "dv", "Divehi", Locale::RightToLeft },
- { "el", "Greek", Locale::LeftToRight },
- { "en", "English", Locale::LeftToRight },
- { "es", "Spanish", Locale::LeftToRight },
- { "et", "Estonian", Locale::LeftToRight },
- { "eu", "Basque", Locale::LeftToRight },
- { "fa", "Farsi", Locale::RightToLeft },
- { "fi", "Finnish", Locale::LeftToRight },
- { "fo", "Faroese", Locale::LeftToRight },
- { "fr", "French", Locale::LeftToRight },
- { "gd", "Gaelic", Locale::LeftToRight },
- { "gl", "Galician", Locale::LeftToRight },
- { "gn", "Guarani", Locale::LeftToRight },
- { "gu", "Gujarati", Locale::LeftToRight },
- { "ha", "Hausa", Locale::LeftToRight },
- { "he", "Hebrew", Locale::RightToLeft },
- { "hi", "Hindi", Locale::LeftToRight },
- { "hr", "Croatian", Locale::LeftToRight },
- { "hu", "Hungarian", Locale::LeftToRight },
- { "hy", "Armenian", Locale::LeftToRight },
- { "id", "Indonesian", Locale::LeftToRight },
- { "is", "Icelandic", Locale::LeftToRight },
- { "it", "Italian", Locale::LeftToRight },
- { "ja", "Japanese", Locale::LeftToRight },
- { "ka", "Georgian", Locale::LeftToRight },
- { "kk", "Kazakh", Locale::LeftToRight },
- { "km", "Khmer", Locale::LeftToRight },
- { "kn", "Kannada", Locale::LeftToRight },
- { "ko", "Korean", Locale::LeftToRight },
- { "ks", "Kashmiri", Locale::LeftToRight },
- { "la", "Latin", Locale::LeftToRight },
- { "lo", "Lao", Locale::LeftToRight },
- { "lt", "Lithuanian", Locale::LeftToRight },
- { "lv", "Latvian", Locale::LeftToRight },
- { "mi", "Maori", Locale::LeftToRight },
- { "mk", "FYRO Macedonia", Locale::LeftToRight },
- { "ml", "Malayalam", Locale::LeftToRight },
- { "mn", "Mongolian", Locale::LeftToRight },
- { "mr", "Marathi", Locale::LeftToRight },
- { "ms", "Malay", Locale::LeftToRight },
- { "mt", "Maltese", Locale::LeftToRight },
- { "my", "Burmese", Locale::LeftToRight },
- { "nb", "Norwegian: Bokml", Locale::LeftToRight },
- { "ne", "Nepali", Locale::LeftToRight },
- { "nl", "Dutch", Locale::LeftToRight },
- { "nn", "Norwegian: Nynorsk", Locale::LeftToRight },
- { "or", "Oriya", Locale::LeftToRight },
- { "pa", "Punjabi", Locale::LeftToRight },
- { "pl", "Polish", Locale::LeftToRight },
- { "pt", "Portuguese", Locale::LeftToRight },
- { "rm", "Raeto-Romance", Locale::LeftToRight },
- { "ro", "Romanian", Locale::LeftToRight },
- { "ru", "Russian", Locale::LeftToRight },
- { "sa", "Sanskrit", Locale::LeftToRight },
- { "sb", "Sorbian", Locale::LeftToRight },
- { "sd", "Sindhi", Locale::LeftToRight },
- { "si", "Sinhala", Locale::LeftToRight },
- { "sk", "Slovak", Locale::LeftToRight },
- { "sl", "Slovenian", Locale::LeftToRight },
- { "so", "Somali", Locale::LeftToRight },
- { "sq", "Albanian", Locale::LeftToRight },
- { "sr", "Serbian", Locale::LeftToRight },
- { "sv", "Swedish", Locale::LeftToRight },
- { "sw", "Swahili", Locale::LeftToRight },
- { "ta", "Tamil", Locale::LeftToRight },
- { "te", "Telugu", Locale::LeftToRight },
- { "tg", "Tajik", Locale::LeftToRight },
- { "th", "Thai", Locale::LeftToRight },
- { "tk", "Turkmen", Locale::LeftToRight },
- { "tn", "Setsuana", Locale::LeftToRight },
- { "tr", "Turkish", Locale::LeftToRight },
- { "ts", "Tsonga", Locale::LeftToRight },
- { "tt", "Tatar", Locale::LeftToRight },
- { "uk", "Ukrainian", Locale::LeftToRight },
- { "ur", "Urdu", Locale::RightToLeft },
- { "uz", "Uzbek", Locale::LeftToRight },
- { "vi", "Vietnamese", Locale::LeftToRight },
- { "xh", "Xhosa", Locale::LeftToRight },
- { "yi", "Yiddish", Locale::RightToLeft },
- { "zh", "Chinese", Locale::LeftToRight },
- { "zu", "Zulu", Locale::LeftToRight },
-
- { NULL, NULL, Locale::LeftToRight }
+ { "af", "Afrikaans", Locale::LEFT_TO_RIGHT },
+ { "am", "Amharic", Locale::LEFT_TO_RIGHT },
+ { "ar", "Arabic", Locale::RIGHT_TO_LEFT },
+ { "as", "Assamese", Locale::LEFT_TO_RIGHT },
+ { "az", "Azerbaijani", Locale::LEFT_TO_RIGHT },
+ { "be", "Belarusian", Locale::LEFT_TO_RIGHT },
+ { "bg", "Bulgarian", Locale::LEFT_TO_RIGHT },
+ { "bn", "Bengali", Locale::LEFT_TO_RIGHT },
+ { "bo", "Tibetan", Locale::LEFT_TO_RIGHT },
+ { "bs", "Bosnian", Locale::LEFT_TO_RIGHT },
+ { "ca", "Catalan", Locale::LEFT_TO_RIGHT },
+ { "ck", "Iraq", Locale::RIGHT_TO_LEFT },
+ { "cs", "Czech", Locale::LEFT_TO_RIGHT },
+ { "cy", "Welsh", Locale::LEFT_TO_RIGHT },
+ { "da", "Danish", Locale::LEFT_TO_RIGHT },
+ { "de", "German", Locale::LEFT_TO_RIGHT },
+ { "dv", "Divehi", Locale::RIGHT_TO_LEFT },
+ { "el", "Greek", Locale::LEFT_TO_RIGHT },
+ { "en", "English", Locale::LEFT_TO_RIGHT },
+ { "es", "Spanish", Locale::LEFT_TO_RIGHT },
+ { "et", "Estonian", Locale::LEFT_TO_RIGHT },
+ { "eu", "Basque", Locale::LEFT_TO_RIGHT },
+ { "fa", "Farsi", Locale::RIGHT_TO_LEFT },
+ { "fi", "Finnish", Locale::LEFT_TO_RIGHT },
+ { "fo", "Faroese", Locale::LEFT_TO_RIGHT },
+ { "fr", "French", Locale::LEFT_TO_RIGHT },
+ { "gd", "Gaelic", Locale::LEFT_TO_RIGHT },
+ { "gl", "Galician", Locale::LEFT_TO_RIGHT },
+ { "gn", "Guarani", Locale::LEFT_TO_RIGHT },
+ { "gu", "Gujarati", Locale::LEFT_TO_RIGHT },
+ { "ha", "Hausa", Locale::LEFT_TO_RIGHT },
+ { "he", "Hebrew", Locale::RIGHT_TO_LEFT },
+ { "hi", "Hindi", Locale::LEFT_TO_RIGHT },
+ { "hr", "Croatian", Locale::LEFT_TO_RIGHT },
+ { "hu", "Hungarian", Locale::LEFT_TO_RIGHT },
+ { "hy", "Armenian", Locale::LEFT_TO_RIGHT },
+ { "id", "Indonesian", Locale::LEFT_TO_RIGHT },
+ { "is", "Icelandic", Locale::LEFT_TO_RIGHT },
+ { "it", "Italian", Locale::LEFT_TO_RIGHT },
+ { "ja", "Japanese", Locale::LEFT_TO_RIGHT },
+ { "ka", "Georgian", Locale::LEFT_TO_RIGHT },
+ { "kk", "Kazakh", Locale::LEFT_TO_RIGHT },
+ { "km", "Khmer", Locale::LEFT_TO_RIGHT },
+ { "kn", "Kannada", Locale::LEFT_TO_RIGHT },
+ { "ko", "Korean", Locale::LEFT_TO_RIGHT },
+ { "ks", "Kashmiri", Locale::LEFT_TO_RIGHT },
+ { "la", "Latin", Locale::LEFT_TO_RIGHT },
+ { "lo", "Lao", Locale::LEFT_TO_RIGHT },
+ { "lt", "Lithuanian", Locale::LEFT_TO_RIGHT },
+ { "lv", "Latvian", Locale::LEFT_TO_RIGHT },
+ { "mi", "Maori", Locale::LEFT_TO_RIGHT },
+ { "mk", "FYRO Macedonia", Locale::LEFT_TO_RIGHT },
+ { "ml", "Malayalam", Locale::LEFT_TO_RIGHT },
+ { "mn", "Mongolian", Locale::LEFT_TO_RIGHT },
+ { "mr", "Marathi", Locale::LEFT_TO_RIGHT },
+ { "ms", "Malay", Locale::LEFT_TO_RIGHT },
+ { "mt", "Maltese", Locale::LEFT_TO_RIGHT },
+ { "my", "Burmese", Locale::LEFT_TO_RIGHT },
+ { "nb", "Norwegian: Bokml", Locale::LEFT_TO_RIGHT },
+ { "ne", "Nepali", Locale::LEFT_TO_RIGHT },
+ { "nl", "Dutch", Locale::LEFT_TO_RIGHT },
+ { "nn", "Norwegian: Nynorsk", Locale::LEFT_TO_RIGHT },
+ { "or", "Oriya", Locale::LEFT_TO_RIGHT },
+ { "pa", "Punjabi", Locale::LEFT_TO_RIGHT },
+ { "pl", "Polish", Locale::LEFT_TO_RIGHT },
+ { "pt", "Portuguese", Locale::LEFT_TO_RIGHT },
+ { "rm", "Raeto-Romance", Locale::LEFT_TO_RIGHT },
+ { "ro", "Romanian", Locale::LEFT_TO_RIGHT },
+ { "ru", "Russian", Locale::LEFT_TO_RIGHT },
+ { "sa", "Sanskrit", Locale::LEFT_TO_RIGHT },
+ { "sb", "Sorbian", Locale::LEFT_TO_RIGHT },
+ { "sd", "Sindhi", Locale::LEFT_TO_RIGHT },
+ { "si", "Sinhala", Locale::LEFT_TO_RIGHT },
+ { "sk", "Slovak", Locale::LEFT_TO_RIGHT },
+ { "sl", "Slovenian", Locale::LEFT_TO_RIGHT },
+ { "so", "Somali", Locale::LEFT_TO_RIGHT },
+ { "sq", "Albanian", Locale::LEFT_TO_RIGHT },
+ { "sr", "Serbian", Locale::LEFT_TO_RIGHT },
+ { "sv", "Swedish", Locale::LEFT_TO_RIGHT },
+ { "sw", "Swahili", Locale::LEFT_TO_RIGHT },
+ { "ta", "Tamil", Locale::LEFT_TO_RIGHT },
+ { "te", "Telugu", Locale::LEFT_TO_RIGHT },
+ { "tg", "Tajik", Locale::LEFT_TO_RIGHT },
+ { "th", "Thai", Locale::LEFT_TO_RIGHT },
+ { "tk", "Turkmen", Locale::LEFT_TO_RIGHT },
+ { "tn", "Setsuana", Locale::LEFT_TO_RIGHT },
+ { "tr", "Turkish", Locale::LEFT_TO_RIGHT },
+ { "ts", "Tsonga", Locale::LEFT_TO_RIGHT },
+ { "tt", "Tatar", Locale::LEFT_TO_RIGHT },
+ { "uk", "Ukrainian", Locale::LEFT_TO_RIGHT },
+ { "ur", "Urdu", Locale::RIGHT_TO_LEFT },
+ { "uz", "Uzbek", Locale::LEFT_TO_RIGHT },
+ { "vi", "Vietnamese", Locale::LEFT_TO_RIGHT },
+ { "xh", "Xhosa", Locale::LEFT_TO_RIGHT },
+ { "yi", "Yiddish", Locale::RIGHT_TO_LEFT },
+ { "zh", "Chinese", Locale::LEFT_TO_RIGHT },
+ { "zu", "Zulu", Locale::LEFT_TO_RIGHT },
+
+ { NULL, NULL, Locale::LEFT_TO_RIGHT }
};
} // unnamed namespace
Locale::Direction GetDirection( const std::string& locale )
{
- Locale::Direction direction( Locale::LeftToRight );
+ Locale::Direction direction( Locale::LEFT_TO_RIGHT );
if ( !locale.empty() && locale.size() > 2 )
{
enum Direction
{
- LeftToRight,
- RightToLeft,
+ LEFT_TO_RIGHT,
+ RIGHT_TO_LEFT,
};
Locale::Direction GetDirection( const std::string& locale );
+++ /dev/null
-#ifndef DALI_APPLICATION_CONFIGURATION_H
-#define DALI_APPLICATION_CONFIGURATION_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.
- */
-
-namespace Dali
-{
-/**
- * @addtogroup dali_adaptor_framework
- * @{
- */
-
-/**
- * @brief Enumeration for Application configuration.
- * @SINCE_1_0.0
- */
-namespace Configuration
-{
-
-/**
- * @brief Enumeration for application context loss policy.
- * @SINCE_1_0.0
- */
-enum ContextLoss
-{
- APPLICATION_HANDLES_CONTEXT_LOSS, ///< Application will tear down and recreate UI on context loss and context regained signals. Dali doesn't need to retain data. @SINCE_1_0.0
- APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS, ///< Application expects Dali to retain data ( increased memory footprint ) @SINCE_1_0.0
-};
-
-} // Configuration
-
-/**
- * @}
- */
-
-} // namespace Dali
-
-#endif // DALI_APPLICATION_CONFIGURATION_H
void Application::MainLoop()
{
- Internal::Adaptor::GetImplementation(*this).MainLoop(Configuration::APPLICATION_HANDLES_CONTEXT_LOSS);
-}
-
-void Application::MainLoop(Configuration::ContextLoss configuration)
-{
- Internal::Adaptor::GetImplementation(*this).MainLoop(configuration);
+ Internal::Adaptor::GetImplementation(*this).MainLoop();
}
void Application::Lower()
#include <dali/public-api/signals/callback.h>
// INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/application-configuration.h>
#include <dali/public-api/adaptor-framework/device-status.h>
#include <dali/public-api/adaptor-framework/window.h>
/**
* @brief This starts the application.
*
- * Choosing this form of main loop indicates that the default
- * application configuration of APPLICATION_HANDLES_CONTEXT_LOSS is used. On platforms where
- * context loss can occur, the application is responsible for tearing down and re-loading UI.
- * The application should listen to Stage::ContextLostSignal and Stage::ContextRegainedSignal.
- * @SINCE_1_0.0
- */
- void MainLoop();
-
- /**
- * @brief This starts the application, and allows the app to choose a different configuration.
+ * On platforms where context loss can occur, the application is responsible for tearing down and
+ * re-loading UI. The application should listen to Stage::ContextLostSignal and
+ * Stage::ContextRegainedSignal.
*
- * The application should listen to Stage::ContextLostSignal and Stage::ContextRegainedSignal.
* @SINCE_1_0.0
- * @param[in] configuration The context loss configuration
*/
- void MainLoop(Configuration::ContextLoss configuration);
+ void MainLoop();
/**
* @brief This lowers the application to bottom without actually quitting it.
return GetImplementation(*this).KeyEventSignal();
}
-Window::TouchSignalType& Window::TouchSignal()
+Window::TouchEventSignalType& Window::TouchedSignal()
{
- return GetImplementation(*this).TouchSignal();
+ return GetImplementation(*this).TouchedSignal();
}
Window::Window( Internal::Adaptor::Window* window )
using WindowSize = Uint16Pair ; ///< Window size type @SINCE_1_2.60
using WindowPosition = Uint16Pair; ///< Window position type @SINCE_1_2.60
- using FocusChangeSignalType = Signal< void (Window,bool) >; ///< Window focus signal type @SINCE_1_4.35
- using ResizeSignalType = Signal< void (Window,WindowSize) >; ///< Window resized signal type @SINCE_1_4.35
- using KeyEventSignalType = Signal< void (const KeyEvent&) >; ///< Key event signal type
- using TouchSignalType = Signal< void (const TouchEvent&) >; ///< Touch signal type
+ using FocusChangeSignalType = Signal< void (Window,bool) >; ///< Window focus signal type @SINCE_1_4.35
+ using ResizeSignalType = Signal< void (Window,WindowSize) >; ///< Window resized signal type @SINCE_1_4.35
+ using KeyEventSignalType = Signal< void (const KeyEvent&) >; ///< Key event signal type @SINCE_1_9.21
+ using TouchEventSignalType = Signal< void (const TouchEvent&) >; ///< Touch signal type @SINCE_1_9.28
public:
* void YourCallbackName(const TouchEvent& event);
* @endcode
*
- * @SINCE_1_9.21
+ * @SINCE_1_9.28
* @return The touch signal to connect to
*
* @note Motion events are not emitted.
*/
- TouchSignalType& TouchSignal();
+ TouchEventSignalType& TouchedSignal();
public: // Not intended for application developers
/// @cond internal
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 9;
-const unsigned int ADAPTOR_MICRO_VERSION = 27;
+const unsigned int ADAPTOR_MICRO_VERSION = 28;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
SET( public_api_adaptor_framework_header_files
${adaptor_public_api_dir}/adaptor-framework/application.h
- ${adaptor_public_api_dir}/adaptor-framework/application-configuration.h
${adaptor_public_api_dir}/adaptor-framework/device-status.h
${adaptor_public_api_dir}/adaptor-framework/input-method.h
${adaptor_public_api_dir}/adaptor-framework/key.h
Name: dali2-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.9.27
+Version: 1.9.28
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT