/*
- * Copyright (c) 2017 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.
{
functorCalled = false;
- receivedKeyEvent.keyModifier = 0;
- receivedKeyEvent.keyPressedName.clear();
- receivedKeyEvent.keyPressed.clear();
+ receivedKeyEvent.Reset();
}
int UtcDaliKeyInputFocusManagerSetFocus01(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Check that there is no focused control. Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal");
int UtcDaliKeyInputFocusManagerSetFocus02(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Set focus to control. Check it is now the focused actor and receives KeyInputFocusGained signal. Set focuse to another control - check that the first control receives KeyInputFocusLost");
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered to KeyboardFocusManager via Stage's KeyEventSignal");
manager.SetFocus( dummy3 );
DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
- Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
+ Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
application.ProcessEvent(event);
DALI_TEST_CHECK( callback1.mIsCalled );
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline("Test KeyEvent propagation. If focused control doesn't consume KeyEvent, KeyEvent will be recursively delivered to the control and its parents, until the event is consumed or the stage is reached. In this case, KeyEvent is delivered from dummy3 to dummy2");
manager.SetFocus( dummy3 );
DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
- Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
+ Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "", "", Device::Class::TOUCH, Device::Subclass::NONE );
application.ProcessEvent(event);
DALI_TEST_CHECK( !callback1.mIsCalled );
int UtcDaliKeyInputFocusManagerGetCurrentFocusControl(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Add 2 controls, check they each get focused. Re-focus the first control - ensure it's now got focus (check signals)");
int UtcDaliKeyInputFocusManagerRemoveFocus(void)
{
ToolkitTestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" Add focus controls. Test that removing focus from control which has focus. ");
{
ToolkitTestApplication application;
KeyInputFocusManager manager = KeyInputFocusManager::Get();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
tet_infoline(" UtcDaliKeyInputFocusManagerSignalKeyInputFocusChanged");