[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 <p.wisbey@samsung.com>
13 files changed:
ToolkitTestApplication application;
ToolkitTestApplication application;
- Dali::Integration::Core& core ( application.GetCore() );
-
tet_infoline("Testing Text Selection with replace.");
Toolkit::TextInput textInput = Toolkit::TextInput::New();
tet_infoline("Testing Text Selection with replace.");
Toolkit::TextInput textInput = Toolkit::TextInput::New();
Integration::KeyEvent event(testChar, testChar, 0, 0, 0, Integration::KeyEvent::Down );
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 );
tet_printf("Simulate pressing of a key: %s\n", testChar );
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
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.
}
tet_result(TET_PASS); // For line coverage, as long as there are no exceptions, we assume passed.
}
application.SendNotification();
Integration::KeyEvent keyEvent;
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.
}
tet_result(TET_PASS); // For line coverage, as long as there are no exceptions, we assume passed.
}
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gButtonClicked );
DALI_TEST_CHECK( gButtonClicked );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
DALI_TEST_CHECK( !gButtonClicked );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
DALI_TEST_CHECK( !gButtonClicked );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gButtonClicked = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gButtonClicked );
}
DALI_TEST_CHECK( !gButtonClicked );
}
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gClickedCallBackCalled == true );
DALI_TEST_CHECK( gClickedCallBackCalled == true );
pushButton.ClickedSignal().Disconnect(TestClickedCallback);
// simulate another touch event
pushButton.ClickedSignal().Disconnect(TestClickedCallback);
// simulate another touch event
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gClickedCallBackCalled == false );
}
DALI_TEST_CHECK( gClickedCallBackCalled == false );
}
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( eventDown );
+ application.ProcessEvent( eventDown );
DALI_TEST_CHECK( gPushButtonPressed );
}
DALI_TEST_CHECK( gPushButtonPressed );
}
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gPushButtonReleased );
DALI_TEST_CHECK( gPushButtonReleased );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonReleased );
DALI_TEST_CHECK( !gPushButtonReleased );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gPushButtonReleased );
DALI_TEST_CHECK( gPushButtonReleased );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gPushButtonReleased = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonReleased );
}
DALI_TEST_CHECK( !gPushButtonReleased );
}
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
DALI_TEST_CHECK( !gPushButtonToggleState );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
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 );
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 );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
DALI_TEST_CHECK( !gPushButtonToggleState );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
DALI_TEST_CHECK( !gPushButtonToggleState );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointLeave );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
DALI_TEST_CHECK( !gPushButtonToggleState );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
gPushButtonToggleState = false;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointEnter );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gPushButtonToggleState );
}
DALI_TEST_CHECK( !gPushButtonToggleState );
}
// flush the queue and render once
application.SendNotification();
application.Render();
// 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.
// An up event is sent outside the button's boundary but inside the actor's one.
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
// flush the queue and render once
application.SendNotification();
application.Render();
// 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.
// A motion event is sent outside the button's boundary but inside the actor's one.
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
// flush the queue and render once
application.SendNotification();
application.Render();
// 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.
actor.SetSensitive( true );
// An up event is sent inside the button's boundary.
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
// flush the queue and render once
application.SendNotification();
application.Render();
// 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();
// More renders are needed in order to allow the node of the actor to become invisible.
application.SendNotification();
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
// flush the queue and render once
application.SendNotification();
application.Render();
// 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();
// More renders are needed in order to allow the node of the actor to become invisible.
application.SendNotification();
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
DALI_TEST_CHECK( gOnTouchPointInterrupted );
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
tetButton.SetVisible( true );
tetButton.SetVisible( true );
// flush the queue and render once
application.SendNotification();
application.Render();
// flush the queue and render once
application.SendNotification();
application.Render();
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
DALI_TEST_CHECK( !gOnTouchPointInterrupted );
}
pinch.scale = 10.0f;
pinch.speed = 50.0f;
pinch.centerPoint = Vector2(20.0f, 20.0f);
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 );
DALI_TEST_CHECK( dummyImpl.pinchCalled == true );
DALI_TEST_CHECK( dummyImpl.panCalled == false );
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
pan.state = Gesture::Started;
pan.state = Gesture::Started;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
DALI_TEST_CHECK( dummyImpl.panCalled == true );
DALI_TEST_CHECK( dummyImpl.tapCalled == false );
DALI_TEST_CHECK( dummyImpl.panCalled == true );
DALI_TEST_CHECK( dummyImpl.tapCalled == false );
tap.numberOfTaps = 1u;
tap.numberOfTouches = 1u;
tap.point = Vector2(50.0f, 50.0f);
tap.numberOfTaps = 1u;
tap.numberOfTouches = 1u;
tap.point = Vector2(50.0f, 50.0f);
- application.GetCore().SendEvent(tap);
+ application.ProcessEvent(tap);
tap.state = Gesture::Started;
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);
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;
longPress.state = Gesture::Started;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
longPress.state = Gesture::Finished;
DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
longPress.state = Gesture::Finished;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
Stage::GetCurrent().Remove(dummy);
}
Stage::GetCurrent().Remove(dummy);
}
pinch.scale = 10.0f;
pinch.speed = 50.0f;
pinch.centerPoint = Vector2(20.0f, 20.0f);
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();
// Render and notify a couple of times
application.SendNotification();
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
pan.currentPosition = Vector2(20.0f, 20.0f);
pan.timeDelta = 10;
pan.numberOfTouches = 1u;
- application.GetCore().SendEvent(pan);
+ application.ProcessEvent(pan);
pan.state = Gesture::Started;
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);
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;
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);
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;
longPress.state = Gesture::Started;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
longPress.state = Gesture::Finished;
longPress.state = Gesture::Finished;
- application.GetCore().SendEvent(longPress);
+ application.ProcessEvent(longPress);
Stage::GetCurrent().Remove(dummy);
}
Stage::GetCurrent().Remove(dummy);
}
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
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);
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
Integration::TouchEvent touchEvent(1);
TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
touchEvent.AddPoint(point);
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);
}
Stage::GetCurrent().Remove(dummy);
}
// simulate a mouse wheel event
Vector2 screenCoordinates( 10.0f, 10.0f );
Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
// 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);
DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
// simulate a mouse wheel event
Vector2 screenCoordinates( 20.0f, 20.0f );
Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
// 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);
}
Stage::GetCurrent().Remove(dummy);
}
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, false, TEST_LOCATION );
Integration::KeyEvent keyEvent;
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);
DALI_TEST_EQUALS( dummyImpl.keyEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
application.SendNotification();
Integration::KeyEvent keyEvent;
application.SendNotification();
Integration::KeyEvent keyEvent;
- application.GetCore().SendEvent(keyEvent);
+ application.ProcessEvent(keyEvent);
Stage::GetCurrent().Remove(dummy);
}
Stage::GetCurrent().Remove(dummy);
}
KeyInputFocusManager manager = KeyInputFocusManager::Get();
manager.UnhandledKeyEventSignal().Connect( &callback, &SignalUnhandledKeyEventCallback::Callback );
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);
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Up);
+ application.ProcessEvent(event);
DALI_TEST_CHECK(data.functorCalled);
DALI_TEST_CHECK(event.keyName == data.receivedKeyEvent.keyPressedName );
DALI_TEST_CHECK(data.functorCalled);
DALI_TEST_CHECK(event.keyName == data.receivedKeyEvent.keyPressedName );
data.Reset();
Integration::KeyEvent event2("v", "v", 0, 0, 0, Integration::KeyEvent::Up);
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 );
DALI_TEST_CHECK(data.functorCalled);
DALI_TEST_CHECK(event2.keyName == data.receivedKeyEvent.keyPressedName );
FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
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
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
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);
DALI_TEST_CHECK(focusGroupChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusGroupChangedCallback.mCurrentFocusedActor == Actor());
DALI_TEST_CHECK(focusGroupChangedCallback.mForward == false);
FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
manager.FocusedActorActivatedSignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
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
Integration::KeyEvent returnEvent("Return", "", 0, 0, 0, Integration::KeyEvent::Up);
// Create the first button and add it to the stage
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstPushButton);
// Send the return event to activate the first button
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();
DALI_TEST_CHECK(focusedActorActivatedCallback.mSignalVerified);
DALI_TEST_CHECK(focusedActorActivatedCallback.mActivatedActor == firstPushButton);
focusedActorActivatedCallback.Reset();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondPushButton);
// Send the return event again to activate the second button
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();
DALI_TEST_CHECK(focusedActorActivatedCallback.mSignalVerified);
DALI_TEST_CHECK(focusedActorActivatedCallback.mActivatedActor == secondPushButton);
focusedActorActivatedCallback.Reset();
- 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;
last.x = pos.x;
last.y = pos.y;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownOutside );
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.SendNotification();
application.Render();
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpOutside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- 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;
last.x = pos.x;
last.y = pos.y;
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointDownInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
event = Dali::Integration::TouchEvent();
event.AddPoint( pointUpInside );
- application.GetCore().SendEvent( event );
+ application.ProcessEvent( event );
application.SendNotification();
application.Render(1000);
application.SendNotification();
application.Render(1000);
const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 50.0f, 10.0f );
event.AddPoint( pointUp );
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();
application.SendNotification();
application.Render();
const int maxChars = 4;
const char* testChar = "v";
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);
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
// Send max number of characters
for (int i=0; i < maxChars; i++)
{
// Send max number of characters
for (int i=0; i < maxChars; i++)
{
+ application.ProcessEvent(event);
testString.append(testChar);
}
DALI_TEST_EQUALS(testString,textInput.GetText(), TEST_LOCATION); // Get text which should be empty
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
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
testString.append(testChar);
DALI_TEST_EQUALS(testString,textInput.GetText(), TEST_LOCATION); // Get text which should be empty
tet_infoline("Testing Adding characters");
tet_infoline("Testing Adding characters");
- Dali::Integration::Core& core = application.GetCore();
-
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
+ 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);
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"
}
DALI_TEST_EQUALS("av",textInput.GetText(), TEST_LOCATION); // Get text which should be "av"
}
tet_infoline("Testing Removal of end characters");
tet_infoline("Testing Removal of end characters");
- Dali::Integration::Core& core = application.GetCore();
-
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
TextInput textInput = TextInput::New(); // create empty TextInput
Stage::GetCurrent().Add(textInput);
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
textInput.SetKeyInputFocus();
Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Down);
+ 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);
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 ""
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"
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"
}
DALI_TEST_EQUALS("a",textInput.GetText(), TEST_LOCATION); // Get text which should be "a"
}
{
ToolkitTestApplication application;
{
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
tet_infoline("Testing Max characters is obeyed when inputting key events ");
TextInput textInput = TextInput::New(); // create empty TextInput
Integration::KeyEvent eventA("a", "a", 0, 0, 0, Integration::KeyEvent::Down );
Integration::KeyEvent eventB("b", "b", 0, 0, 0, Integration::KeyEvent::Down );
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());
tet_printf( "Get text result : %s\n", textInput.GetText().c_str());