Change-Id: I90b9fa85d526ec343ff8d31e887069d272618983
Signed-off-by: David Steele <david.steele@partner.samsung.com>
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
{
DummyControl::DummyControl()
{
DummyControl::DummyControl()
-: mCustomSlot1Called(false)
{
}
DummyControl::DummyControl(const DummyControl& control)
{
}
DummyControl::DummyControl(const DummyControl& control)
-: Control( control ),
- mCustomSlot1Called(false),
- mCustomSlot1Value(Vector3::ZERO)
}
// Used to test signal connections
}
// Used to test signal connections
-void DummyControl::CustomSlot1( Actor actor, const Vector3& value )
+void DummyControlImpl::CustomSlot1( Actor actor, const Vector3& value )
{
mCustomSlot1Called = true;
mCustomSlot1Value = value;
{
mCustomSlot1Called = true;
mCustomSlot1Value = value;
}
DummyControlImpl::DummyControlImpl()
}
DummyControlImpl::DummyControlImpl()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+ mCustomSlot1Called(false),
+ mCustomSlot1Value(Vector3::ZERO)
DummyControlImpl::~DummyControlImpl()
{
}
DummyControlImpl::~DummyControlImpl()
{
}
}
DummyControl::DummyControl( DummyControlImpl& implementation )
}
DummyControl::DummyControl( DummyControlImpl& implementation )
-: Control( implementation ),
- mCustomSlot1Called(false),
- mCustomSlot1Value(Vector3::ZERO)
+: Control( implementation )
{
}
DummyControl::DummyControl( Dali::Internal::CustomActor* internal )
{
}
DummyControl::DummyControl( Dali::Internal::CustomActor* internal )
-: Control( internal ),
- mCustomSlot1Called(false),
- mCustomSlot1Value(Vector3::ZERO)
{
VerifyCustomActorPointer<DummyControlImpl>(internal);
}
{
VerifyCustomActorPointer<DummyControlImpl>(internal);
}
DummyControl();
DummyControl(const DummyControl& control);
DummyControl();
DummyControl(const DummyControl& control);
- virtual ~DummyControl();
static DummyControl New( bool override = false );
static DummyControl New( bool override = false );
DummyControl& operator=(const DummyControl& control);
DummyControl& operator=(const DummyControl& control);
- // Used to test signal connections
- void CustomSlot1( Actor actor, const Vector3& value );
-
-public:
-
- bool mCustomSlot1Called;
- Vector3 mCustomSlot1Value;
-
public: // Not intended for application developers
DummyControl( DummyControlImpl& implementation );
public: // Not intended for application developers
DummyControl( DummyControlImpl& implementation );
inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
inline LongPressGestureDetector GetLongPressGestureDetector() const { return Internal::Control::GetLongPressGestureDetector(); }
inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
inline LongPressGestureDetector GetLongPressGestureDetector() const { return Internal::Control::GetLongPressGestureDetector(); }
+ // Used to test signal connections
+ void CustomSlot1( Actor actor, const Vector3& value );
+
+ bool mCustomSlot1Called;
+ Vector3 mCustomSlot1Value;
+
protected:
DummyControlImpl();
protected:
DummyControlImpl();
mProgramUniforms4f.clear();
}
mProgramUniforms4f.clear();
}
+void TestGlAbstraction::PreRender()
+{
+}
+
+void TestGlAbstraction::PostRender(unsigned int timeDelta)
+{
+}
+
} // Namespace dali
bool BlendEnabled(const Dali::TraceCallStack& callStack)
} // Namespace dali
bool BlendEnabled(const Dali::TraceCallStack& callStack)
~TestGlAbstraction();
void Initialize();
~TestGlAbstraction();
void Initialize();
+ void PreRender();
+ void PostRender(unsigned int timeDelta);
+
/* OpenGL ES 2.0 */
inline void ActiveTexture( GLenum textureUnit )
/* OpenGL ES 2.0 */
inline void ActiveTexture( GLenum textureUnit )
Actor actor = Actor::New();
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
Actor actor = Actor::New();
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
- actor.SetSizeSignal().Connect( &dummy, &DummyControl::CustomSlot1 );
+ Toolkit::Internal::Control& control = dummy.GetImplementation();
+ DummyControlImpl* dummyImpl = dynamic_cast<DummyControlImpl*>(&control);
+ DALI_TEST_CHECK( dummyImpl );
+
+ actor.SetSizeSignal().Connect( dummyImpl, &DummyControlImpl::CustomSlot1 );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Value, Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value, Vector3::ZERO, TEST_LOCATION );
const Vector3 newSize( 10, 10, 0 );
actor.SetSize( newSize );
const Vector3 newSize( 10, 10, 0 );
actor.SetSize( newSize );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Called, true, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Value, newSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value, newSize, TEST_LOCATION );
- dummy.mCustomSlot1Called = false;
- actor.SetSizeSignal().Disconnect( &dummy, &DummyControl::CustomSlot1 );
+ dummyImpl->mCustomSlot1Called = false;
+ actor.SetSizeSignal().Disconnect( dummyImpl, &DummyControlImpl::CustomSlot1 );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
const Vector3 ignoredSize( 20, 20, 0 );
actor.SetSize( ignoredSize );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
const Vector3 ignoredSize( 20, 20, 0 );
actor.SetSize( ignoredSize );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Value, newSize/*not ignoredSize*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value, newSize/*not ignoredSize*/, TEST_LOCATION );
{
DummyControl dummy = DummyControlImpl::New();
{
DummyControl dummy = DummyControlImpl::New();
+ Toolkit::Internal::Control& control = dummy.GetImplementation();
+ DummyControlImpl* dummyImpl = dynamic_cast<DummyControlImpl*>(&control);
+ DALI_TEST_CHECK( dummyImpl );
- actor.SetSizeSignal().Connect( &dummy, &DummyControl::CustomSlot1 );
+ actor.SetSizeSignal().Connect( dummyImpl, &DummyControlImpl::CustomSlot1 );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Value, Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value, Vector3::ZERO, TEST_LOCATION );
const Vector3 newSize( 10, 10, 0 );
actor.SetSize( newSize );
const Vector3 newSize( 10, 10, 0 );
actor.SetSize( newSize );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Called, true, TEST_LOCATION );
- DALI_TEST_EQUALS( dummy.mCustomSlot1Value, newSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value, newSize, TEST_LOCATION );
}
// dummyControl automatically disconnects
}
// dummyControl automatically disconnects
DALI_TEST_CHECK( test.GetMaximumSize() == maxSize );
test.KeyEventSignal();
DALI_TEST_CHECK( test.GetMaximumSize() == maxSize );
test.KeyEventSignal();
- DummyControl test2 = DummyControl::New();
- dynamic_cast< ConnectionTrackerInterface& >( test2 ).GetConnectionCount();
// Provide coverage for pointer destructor
Control* testControlPtr = new Control;
// Provide coverage for pointer destructor
Control* testControlPtr = new Control;