/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
END_TEST;
}
-static bool gSliderValueChangedCallBackCalled;
+static bool gSliderValueChangedCallBackCalled=false;
static bool OnSliderValueChanged( Slider slider, float value )
{
gSliderValueChangedCallBackCalled = true;
return true;
}
-static bool gSliderMarkCallBackCalled;
+static bool gSliderMarkCallBackCalled=false;
static bool OnSliderMark( Slider slider, int value )
{
gSliderMarkCallBackCalled = true;
return true;
}
+static bool gSliderSlidingFinishedCallBackCalled=false;
+static bool OnSlidingFinished( Slider slider, float value )
+{
+ gSliderSlidingFinishedCallBackCalled = true;
+ return true;
+}
+
int UtcDaliSliderSignals1(void)
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
slider.ValueChangedSignal().Connect( &OnSliderValueChanged );
slider.MarkReachedSignal().Connect( &OnSliderMark );
+ slider.SlidingFinishedSignal().Connect( &OnSlidingFinished );
application.SendNotification();
application.Render();
gSliderValueChangedCallBackCalled = false;
gSliderMarkCallBackCalled = false;
+ gSliderSlidingFinishedCallBackCalled = false;
- Dali::Integration::TouchEvent event;
-
- event = Dali::Integration::TouchEvent();
-
- Integration::Point pointDown;
- pointDown.SetState( PointState::DOWN );
- pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
- event.AddPoint( pointDown );
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+ Integration::Point pointDown;
+ pointDown.SetState( PointState::DOWN );
+ pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+ event.AddPoint( pointDown );
+
+ application.ProcessEvent( event );
+ application.SendNotification();
+ application.Render();
+ }
for( int i = 0; i < 5; ++i )
{
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
Integration::Point pointMotion;
pointMotion.SetState( PointState::MOTION );
pointMotion.SetScreenPosition( Vector2( 10.0f + i * 10.0f, 10.0f ) );
event.AddPoint( pointMotion );
- }
-
- Integration::Point pointUp;
- pointUp.SetState( PointState::UP );
- pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
- event.AddPoint( pointUp );
- application.ProcessEvent( event );
+ application.ProcessEvent( event );
+ application.SendNotification();
+ application.Render();
+ }
- application.SendNotification();
- application.Render();
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+ Integration::Point pointUp;
+ pointUp.SetState( PointState::UP );
+ pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+ event.AddPoint( pointUp );
+
+ application.ProcessEvent( event );
+ application.SendNotification();
+ application.Render();
+ }
DALI_TEST_CHECK(gSliderValueChangedCallBackCalled);
DALI_TEST_CHECK(gSliderMarkCallBackCalled);
+ DALI_TEST_CHECK(gSliderSlidingFinishedCallBackCalled);
END_TEST;
}
application.SendNotification();
application.Render();
- Property::Map map;
- map["rendererType"] = "image";
- map["url"] = "url";
slider.SetProperty(Slider::Property::LOWER_BOUND, 1.0f);
slider.SetProperty(Slider::Property::UPPER_BOUND, 5.0f);
slider.SetProperty(Slider::Property::VALUE, 3.0f);
DALI_TEST_EQUALS( tolerance, 0.5f, TEST_LOCATION );
{
+ Property::Map map;
+ map["visualType"] = "IMAGE";
+ map["size"] = Vector2(200, 200);
map["url"] = "track2.png";
slider.SetProperty(Slider::Property::TRACK_VISUAL, map);
map["url"] = "handle2.png";