From b3d90507ee795f72510693a54121b3a54b1c046c Mon Sep 17 00:00:00 2001
From: Paul Wisbey
Date: Tue, 4 Mar 2014 16:09:04 +0000
Subject: [PATCH] Remove redundant Core::SendEvent() & NotificationEvent
[Issue#] N/A
[Problem] Notification event is redundant
[Cause] Previously there was no way of telling Core to process events,
except by sending an event.
[Solution] Use the ProcessEvents() method, which was separated from Core::SendEvent()
Change-Id: I240cb24834192d1c5bc797e7c9952c1666b3f3d5
Signed-off-by: Paul Wisbey
---
.../text-input/utc-Dali-TextInput.cpp | 4 +-
.../alignment/utc-Dali-Alignment.cpp | 4 +-
.../dali-test-suite/buttons/utc-Dali-Button.cpp | 26 ++++----
.../buttons/utc-Dali-PushButton.cpp | 74 +++++++++++-----------
.../control/utc-Dali-ControlImpl.cpp | 44 ++++++-------
.../utc-Dali-KeyInputFocusManager.cpp | 5 +-
.../utc-Dali-KeyboardFocusManager.cpp | 10 ++-
.../page-turn-view/utc-Dali-PageTurnView.cpp | 2 +-
.../dali-test-suite/popup/utc-Dali-Popup.cpp | 4 +-
.../scroll-view/utc-Dali-ScrollView.cpp | 3 +-
.../selectors/utc-Dali-RotatingSelector.cpp | 4 +-
.../dali-test-suite/slider/utc-Dali-Slider.cpp | 2 +-
.../text-input/utc-Dali-TextInput.cpp | 40 +++++-------
13 files changed, 104 insertions(+), 118 deletions(-)
diff --git a/automated-tests/dali-internal-test-suite/text-input/utc-Dali-TextInput.cpp b/automated-tests/dali-internal-test-suite/text-input/utc-Dali-TextInput.cpp
index 6315dde..eccafcf 100644
--- a/automated-tests/dali-internal-test-suite/text-input/utc-Dali-TextInput.cpp
+++ b/automated-tests/dali-internal-test-suite/text-input/utc-Dali-TextInput.cpp
@@ -75,8 +75,6 @@ static void UtcDaliInternalTextInputTextSelection()
ToolkitTestApplication application;
- Dali::Integration::Core& core ( application.GetCore() );
-
tet_infoline("Testing Text Selection with replace.");
Toolkit::TextInput textInput = Toolkit::TextInput::New();
@@ -99,7 +97,7 @@ static void UtcDaliInternalTextInputTextSelection()
Integration::KeyEvent event(testChar, testChar, 0, 0, 0, Integration::KeyEvent::Down );
- core.SendEvent( event );
+ application.ProcessEvent( event );
tet_printf("Simulate pressing of a key: %s\n", testChar );
diff --git a/automated-tests/dali-test-suite/alignment/utc-Dali-Alignment.cpp b/automated-tests/dali-test-suite/alignment/utc-Dali-Alignment.cpp
index 2dd1e85..faeba71 100644
--- a/automated-tests/dali-test-suite/alignment/utc-Dali-Alignment.cpp
+++ b/automated-tests/dali-test-suite/alignment/utc-Dali-Alignment.cpp
@@ -1047,7 +1047,7 @@ static void UtcDaliAlignmentOnTouchEvent()
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
- application.GetCore().SendEvent(touchEvent);
+ application.ProcessEvent(touchEvent);
tet_result(TET_PASS); // For line coverage, as long as there are no exceptions, we assume passed.
}
@@ -1067,7 +1067,7 @@ static void UtcDaliAlignmentOnKeyEvent()
application.SendNotification();
Integration::KeyEvent keyEvent;
- application.GetCore().SendEvent(keyEvent);
+ application.ProcessEvent(keyEvent);
tet_result(TET_PASS); // For line coverage, as long as there are no exceptions, we assume passed.
}
diff --git a/automated-tests/dali-test-suite/buttons/utc-Dali-Button.cpp b/automated-tests/dali-test-suite/buttons/utc-Dali-Button.cpp
index 8073a41..af8804b 100644
--- a/automated-tests/dali-test-suite/buttons/utc-Dali-Button.cpp
+++ b/automated-tests/dali-test-suite/buttons/utc-Dali-Button.cpp
@@ -268,11 +268,11 @@ static void UtcDaliButtonClicked()
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gButtonClicked );
@@ -281,11 +281,11 @@ static void UtcDaliButtonClicked()
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
@@ -294,15 +294,15 @@ static void UtcDaliButtonClicked()
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
@@ -311,15 +311,15 @@ static void UtcDaliButtonClicked()
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
}
@@ -359,11 +359,11 @@ static void UtcDaliButtonConnectSignal()
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gClickedCallBackCalled == true );
@@ -371,7 +371,7 @@ static void UtcDaliButtonConnectSignal()
pushButton.ClickedSignal().Disconnect(TestClickedCallback);
// simulate another touch event
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gClickedCallBackCalled == false );
}
diff --git a/automated-tests/dali-test-suite/buttons/utc-Dali-PushButton.cpp b/automated-tests/dali-test-suite/buttons/utc-Dali-PushButton.cpp
index a065945..a60a379 100644
--- a/automated-tests/dali-test-suite/buttons/utc-Dali-PushButton.cpp
+++ b/automated-tests/dali-test-suite/buttons/utc-Dali-PushButton.cpp
@@ -754,7 +754,7 @@ static void UtcDaliPushButtonPressed()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( eventDown );
+ application.ProcessEvent( eventDown );
DALI_TEST_CHECK( gPushButtonPressed );
}
@@ -785,11 +785,11 @@ static void UtcDaliPushButtonReleased()
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gPushButtonReleased );
@@ -798,11 +798,11 @@ static void UtcDaliPushButtonReleased()
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonReleased );
@@ -811,15 +811,15 @@ static void UtcDaliPushButtonReleased()
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gPushButtonReleased );
@@ -828,15 +828,15 @@ static void UtcDaliPushButtonReleased()
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonReleased );
}
@@ -867,11 +867,11 @@ static void UtcDaliPushButtonToggled()
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
@@ -882,21 +882,21 @@ static void UtcDaliPushButtonToggled()
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gPushButtonToggleState );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
@@ -905,11 +905,11 @@ static void UtcDaliPushButtonToggled()
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
@@ -918,15 +918,15 @@ static void UtcDaliPushButtonToggled()
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
@@ -935,15 +935,15 @@ static void UtcDaliPushButtonToggled()
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
}
@@ -1008,7 +1008,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
// An up event is sent outside the button's boundary but inside the actor's one.
@@ -1018,7 +1018,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
@@ -1042,7 +1042,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
// A motion event is sent outside the button's boundary but inside the actor's one.
@@ -1052,7 +1052,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
@@ -1072,7 +1072,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
actor.SetSensitive( true );
// An up event is sent inside the button's boundary.
@@ -1083,7 +1083,7 @@ static void UtcDaliPushButtonInterruptEventWhenInsensitive()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
@@ -1150,7 +1150,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
// More renders are needed in order to allow the node of the actor to become invisible.
application.SendNotification();
@@ -1168,7 +1168,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
@@ -1195,7 +1195,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
// More renders are needed in order to allow the node of the actor to become invisible.
application.SendNotification();
@@ -1213,7 +1213,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
@@ -1239,7 +1239,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
tetButton.SetVisible( true );
@@ -1258,7 +1258,7 @@ static void UtcDaliPushButtonInterruptEventWhenNonVisible()
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
diff --git a/automated-tests/dali-test-suite/control/utc-Dali-ControlImpl.cpp b/automated-tests/dali-test-suite/control/utc-Dali-ControlImpl.cpp
index 1264f60..7f4dc56 100644
--- a/automated-tests/dali-test-suite/control/utc-Dali-ControlImpl.cpp
+++ b/automated-tests/dali-test-suite/control/utc-Dali-ControlImpl.cpp
@@ -282,7 +282,7 @@ static void UtcDaliControlImplOnGestureMethods()
pinch.scale = 10.0f;
pinch.speed = 50.0f;
pinch.centerPoint = Vector2(20.0f, 20.0f);
- application.GetCore().SendEvent(pinch);
+ application.ProcessEvent(pinch);
DALI_TEST_CHECK( dummyImpl.pinchCalled == true );
DALI_TEST_CHECK( dummyImpl.panCalled == false );
@@ -291,9 +291,9 @@ static void UtcDaliControlImplOnGestureMethods()
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
pan.state = Gesture::Started;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
DALI_TEST_CHECK( dummyImpl.panCalled == true );
DALI_TEST_CHECK( dummyImpl.tapCalled == false );
@@ -301,21 +301,21 @@ static void UtcDaliControlImplOnGestureMethods()
tap.numberOfTaps = 1u;
tap.numberOfTouches = 1u;
tap.point = Vector2(50.0f, 50.0f);
- application.GetCore().SendEvent(tap);
+ application.ProcessEvent(tap);
tap.state = Gesture::Started;
- application.GetCore().SendEvent(tap);
+ application.ProcessEvent(tap);
DALI_TEST_CHECK( dummyImpl.tapCalled == true );
DALI_TEST_CHECK( dummyImpl.longPressCalled == false );
Integration::LongPressGestureEvent longPress(Gesture::Possible);
longPress.numberOfTouches = 1u;
longPress.point = Vector2(50.0f, 50.0f);
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
longPress.state = Gesture::Started;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
longPress.state = Gesture::Finished;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
Stage::GetCurrent().Remove(dummy);
}
@@ -342,7 +342,7 @@ static void UtcDaliControlImplOnGestureMethods()
pinch.scale = 10.0f;
pinch.speed = 50.0f;
pinch.centerPoint = Vector2(20.0f, 20.0f);
- application.GetCore().SendEvent(pinch);
+ application.ProcessEvent(pinch);
// Render and notify a couple of times
application.SendNotification();
@@ -356,26 +356,26 @@ static void UtcDaliControlImplOnGestureMethods()
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
pan.state = Gesture::Started;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
Integration::TapGestureEvent tap(Gesture::Possible);
tap.numberOfTaps = 1u;
tap.numberOfTouches = 1u;
tap.point = Vector2(50.0f, 50.0f);
- application.GetCore().SendEvent(tap);
+ application.ProcessEvent(tap);
tap.state = Gesture::Started;
- application.GetCore().SendEvent(tap);
+ application.ProcessEvent(tap);
Integration::LongPressGestureEvent longPress(Gesture::Possible);
longPress.numberOfTouches = 1u;
longPress.point = Vector2(50.0f, 50.0f);
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
longPress.state = Gesture::Started;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
longPress.state = Gesture::Finished;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
Stage::GetCurrent().Remove(dummy);
}
@@ -597,7 +597,7 @@ static void UtcDaliControlImplTouchEvent()
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
- application.GetCore().SendEvent(touchEvent);
+ application.ProcessEvent(touchEvent);
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
@@ -619,7 +619,7 @@ static void UtcDaliControlImplTouchEvent()
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
- application.GetCore().SendEvent(touchEvent);
+ application.ProcessEvent(touchEvent);
Stage::GetCurrent().Remove(dummy);
}
@@ -656,7 +656,7 @@ static void UtcDaliControlImplMouseWheelEvent()
// simulate a mouse wheel event
Vector2 screenCoordinates( 10.0f, 10.0f );
Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
- application.GetCore().SendEvent(event);
+ application.ProcessEvent(event);
DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
@@ -680,7 +680,7 @@ static void UtcDaliControlImplMouseWheelEvent()
// simulate a mouse wheel event
Vector2 screenCoordinates( 20.0f, 20.0f );
Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
- application.GetCore().SendEvent(event);
+ application.ProcessEvent(event);
Stage::GetCurrent().Remove(dummy);
}
@@ -706,7 +706,7 @@ static void UtcDaliControlImplKeyEvent()
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, false, TEST_LOCATION );
Integration::KeyEvent keyEvent;
- application.GetCore().SendEvent(keyEvent);
+ application.ProcessEvent(keyEvent);
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
@@ -725,7 +725,7 @@ static void UtcDaliControlImplKeyEvent()
application.SendNotification();
Integration::KeyEvent keyEvent;
- application.GetCore().SendEvent(keyEvent);
+ application.ProcessEvent(keyEvent);
Stage::GetCurrent().Remove(dummy);
}
diff --git a/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyInputFocusManager.cpp b/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyInputFocusManager.cpp
index 68dd8b3..bb50efc 100644
--- a/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyInputFocusManager.cpp
+++ b/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyInputFocusManager.cpp
@@ -313,10 +313,9 @@ static void UtcDaliKeyInputFocusManagerSignalUnhandledKeyEvent()
KeyInputFocusManager manager = KeyInputFocusManager::Get();
manager.UnhandledKeyEventSignal().Connect( &callback, &SignalUnhandledKeyEventCallback::Callback );
- Dali::Integration::Core& core = application.GetCore();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Up);
- core.SendEvent(event);
+ application.ProcessEvent(event);
DALI_TEST_CHECK(data.functorCalled);
DALI_TEST_CHECK(event.keyName == data.receivedKeyEvent.keyPressedName );
@@ -327,7 +326,7 @@ static void UtcDaliKeyInputFocusManagerSignalUnhandledKeyEvent()
data.Reset();
Integration::KeyEvent event2("v", "v", 0, 0, 0, Integration::KeyEvent::Up);
- core.SendEvent(event2);
+ application.ProcessEvent(event2);
DALI_TEST_CHECK(data.functorCalled);
DALI_TEST_CHECK(event2.keyName == data.receivedKeyEvent.keyPressedName );
diff --git a/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyboardFocusManager.cpp b/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyboardFocusManager.cpp
index 6f4d447..9f85920 100644
--- a/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyboardFocusManager.cpp
+++ b/automated-tests/dali-test-suite/focus-manager/utc-Dali-KeyboardFocusManager.cpp
@@ -664,19 +664,18 @@ static void UtcDaliKeyboardFocusManagerSignalFocusGroupChanged()
FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
- Dali::Integration::Core& core = application.GetCore();
Integration::KeyEvent tabEvent("Tab", "", 0, 0, 0, Integration::KeyEvent::Down);
Integration::KeyEvent shiftTabEvent("Tab", "", 1, 0, 0, Integration::KeyEvent::Down);
// Send the tab event to change focus group in the forward direction
- core.SendEvent(tabEvent);
+ application.ProcessEvent(tabEvent);
DALI_TEST_CHECK(focusGroupChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusGroupChangedCallback.mCurrentFocusedActor == Actor());
DALI_TEST_CHECK(focusGroupChangedCallback.mForward == true);
focusGroupChangedCallback.Reset();
// Send the shift tab event to change focus group in the backward direction
- core.SendEvent(shiftTabEvent);
+ application.ProcessEvent(shiftTabEvent);
DALI_TEST_CHECK(focusGroupChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusGroupChangedCallback.mCurrentFocusedActor == Actor());
DALI_TEST_CHECK(focusGroupChangedCallback.mForward == false);
@@ -703,7 +702,6 @@ static void UtcDaliKeyboardFocusManagerSignalFocusedActorActivated()
FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
manager.FocusedActorActivatedSignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
- Dali::Integration::Core& core = application.GetCore();
Integration::KeyEvent returnEvent("Return", "", 0, 0, 0, Integration::KeyEvent::Up);
// Create the first button and add it to the stage
@@ -721,7 +719,7 @@ static void UtcDaliKeyboardFocusManagerSignalFocusedActorActivated()
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstPushButton);
// Send the return event to activate the first button
- core.SendEvent(returnEvent);
+ application.ProcessEvent(returnEvent);
DALI_TEST_CHECK(focusedActorActivatedCallback.mSignalVerified);
DALI_TEST_CHECK(focusedActorActivatedCallback.mActivatedActor == firstPushButton);
focusedActorActivatedCallback.Reset();
@@ -731,7 +729,7 @@ static void UtcDaliKeyboardFocusManagerSignalFocusedActorActivated()
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondPushButton);
// Send the return event again to activate the second button
- core.SendEvent(returnEvent);
+ application.ProcessEvent(returnEvent);
DALI_TEST_CHECK(focusedActorActivatedCallback.mSignalVerified);
DALI_TEST_CHECK(focusedActorActivatedCallback.mActivatedActor == secondPushButton);
focusedActorActivatedCallback.Reset();
diff --git a/automated-tests/dali-test-suite/page-turn-view/utc-Dali-PageTurnView.cpp b/automated-tests/dali-test-suite/page-turn-view/utc-Dali-PageTurnView.cpp
index 5e59616..ba60f10 100644
--- a/automated-tests/dali-test-suite/page-turn-view/utc-Dali-PageTurnView.cpp
+++ b/automated-tests/dali-test-suite/page-turn-view/utc-Dali-PageTurnView.cpp
@@ -109,7 +109,7 @@ static void SendPan(ToolkitTestApplication& application, Gesture::State state, c
last.y = pos.y;
}
- application.GetCore().SendEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
+ application.ProcessEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
last.x = pos.x;
last.y = pos.y;
diff --git a/automated-tests/dali-test-suite/popup/utc-Dali-Popup.cpp b/automated-tests/dali-test-suite/popup/utc-Dali-Popup.cpp
index acaefa6..5e33985 100644
--- a/automated-tests/dali-test-suite/popup/utc-Dali-Popup.cpp
+++ b/automated-tests/dali-test-suite/popup/utc-Dali-Popup.cpp
@@ -454,14 +454,14 @@ static void UtcDaliPopupOnTouchedOutside()
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render();
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render();
diff --git a/automated-tests/dali-test-suite/scroll-view/utc-Dali-ScrollView.cpp b/automated-tests/dali-test-suite/scroll-view/utc-Dali-ScrollView.cpp
index 2ebe46d..ed5dfe5 100644
--- a/automated-tests/dali-test-suite/scroll-view/utc-Dali-ScrollView.cpp
+++ b/automated-tests/dali-test-suite/scroll-view/utc-Dali-ScrollView.cpp
@@ -179,8 +179,7 @@ static void SendPan(ToolkitTestApplication& application, Gesture::State state, c
last.y = pos.y;
}
- Dali::Integration::Core& core = application.GetCore();
- core.SendEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
+ application.ProcessEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
last.x = pos.x;
last.y = pos.y;
diff --git a/automated-tests/dali-test-suite/selectors/utc-Dali-RotatingSelector.cpp b/automated-tests/dali-test-suite/selectors/utc-Dali-RotatingSelector.cpp
index 02506d2..3509065 100644
--- a/automated-tests/dali-test-suite/selectors/utc-Dali-RotatingSelector.cpp
+++ b/automated-tests/dali-test-suite/selectors/utc-Dali-RotatingSelector.cpp
@@ -259,11 +259,11 @@ static void UtcDaliRotatingSelectorSignalSelected()
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render(1000);
diff --git a/automated-tests/dali-test-suite/slider/utc-Dali-Slider.cpp b/automated-tests/dali-test-suite/slider/utc-Dali-Slider.cpp
index 1aa0c32..13cd708 100644
--- a/automated-tests/dali-test-suite/slider/utc-Dali-Slider.cpp
+++ b/automated-tests/dali-test-suite/slider/utc-Dali-Slider.cpp
@@ -189,7 +189,7 @@ static void UtcDaliSliderSignals()
const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 50.0f, 10.0f );
event.AddPoint( pointUp );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render();
diff --git a/automated-tests/dali-test-suite/text-input/utc-Dali-TextInput.cpp b/automated-tests/dali-test-suite/text-input/utc-Dali-TextInput.cpp
index e8f0b51..188df8f 100644
--- a/automated-tests/dali-test-suite/text-input/utc-Dali-TextInput.cpp
+++ b/automated-tests/dali-test-suite/text-input/utc-Dali-TextInput.cpp
@@ -187,8 +187,6 @@ static void UtcDaliTextInputSetMaxCharacterLength()
const int maxChars = 4;
const char* testChar = "v";
- Dali::Integration::Core& core = application.GetCore();
-
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
@@ -202,19 +200,19 @@ static void UtcDaliTextInputSetMaxCharacterLength()
// Send max number of characters
for (int i=0; i < maxChars; i++)
{
- core.SendEvent(event);
+ application.ProcessEvent(event);
testString.append(testChar);
}
DALI_TEST_EQUALS(testString,textInput.GetText(), TEST_LOCATION); // Get text which should be empty
- core.SendEvent(event); // try to append additional character
+ application.ProcessEvent(event); // try to append additional character
DALI_TEST_EQUALS(testString,textInput.GetText(), TEST_LOCATION); // Get text which should be empty
textInput.SetMaxCharacterLength(maxChars+1); // increment max characters by 1
- core.SendEvent(event); // append additional character
+ application.ProcessEvent(event); // append additional character
testString.append(testChar);
DALI_TEST_EQUALS(testString,textInput.GetText(), TEST_LOCATION); // Get text which should be empty
@@ -242,8 +240,6 @@ static void UtcDaliTextInputAddChars()
tet_infoline("Testing Adding characters");
- Dali::Integration::Core& core = application.GetCore();
-
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
@@ -251,12 +247,12 @@ static void UtcDaliTextInputAddChars()
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
- core.SendEvent(event);
+ application.ProcessEvent(event);
DALI_TEST_EQUALS("a",textInput.GetText(), TEST_LOCATION); // Get text which should be "a"
Integration::KeyEvent event2("v", "v", 0, 0, 0, Integration::KeyEvent::Down);
- core.SendEvent(event2);
+ application.ProcessEvent(event2);
DALI_TEST_EQUALS("av",textInput.GetText(), TEST_LOCATION); // Get text which should be "av"
}
@@ -267,8 +263,6 @@ static void UtcDaliTextInputRemoveChars()
tet_infoline("Testing Removal of end characters");
- Dali::Integration::Core& core = application.GetCore();
-
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
@@ -276,21 +270,21 @@ static void UtcDaliTextInputRemoveChars()
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
- core.SendEvent(event);
+ application.ProcessEvent(event);
DALI_TEST_EQUALS("a",textInput.GetText(), TEST_LOCATION); // Get text which should be "a"
Integration::KeyEvent event2("BackSpace", "", 0, 0, 0, Integration::KeyEvent::Down);
- core.SendEvent(event2);
+ application.ProcessEvent(event2);
DALI_TEST_EQUALS("",textInput.GetText(), TEST_LOCATION); // Get text which should be ""
- core.SendEvent(event);
- core.SendEvent(event);
+ application.ProcessEvent(event);
+ application.ProcessEvent(event);
DALI_TEST_EQUALS("aa",textInput.GetText(), TEST_LOCATION); // Get text which should be "aa"
- core.SendEvent(event2);
+ application.ProcessEvent(event2);
DALI_TEST_EQUALS("a",textInput.GetText(), TEST_LOCATION); // Get text which should be "a"
}
@@ -386,8 +380,6 @@ static void UtcDaliTextInputExceedMaxCharacters()
{
ToolkitTestApplication application;
- Dali::Integration::Core& core = application.GetCore();
-
tet_infoline("Testing Max characters is obeyed when inputting key events ");
TextInput textInput = TextInput::New(); // create empty TextInput
@@ -403,13 +395,13 @@ static void UtcDaliTextInputExceedMaxCharacters()
Integration::KeyEvent eventA("a", "a", 0, 0, 0, Integration::KeyEvent::Down );
Integration::KeyEvent eventB("b", "b", 0, 0, 0, Integration::KeyEvent::Down );
- core.SendEvent(eventA);
- core.SendEvent(eventB);
- core.SendEvent(eventA);
- core.SendEvent(eventB);
+ application.ProcessEvent(eventA);
+ application.ProcessEvent(eventB);
+ application.ProcessEvent(eventA);
+ application.ProcessEvent(eventB);
- core.SendEvent(eventA);
- core.SendEvent(eventB);
+ application.ProcessEvent(eventA);
+ application.ProcessEvent(eventB);
tet_printf( "Get text result : %s\n", textInput.GetText().c_str());
--
2.7.4