extern int UtcDaliWindowSetGetBrightnessP(void);
extern int UtcDaliWindowSetGetSizeResizedSignalP(void);
extern int UtcDaliWindowSetGetPositionP(void);
+extern int UtcWindowAddRemoveActorP(void);
+extern int UtcWindowSetGetBackgroundColorP(void);
+extern int UtcWindowGetRootLayerP(void);
+extern int UtcWindowGetLayerCountP(void);
+extern int UtcWindowGetLayerP(void);
extern int UtcDaliNativeImageSourceColorDepthDefaultP(void);
extern int UtcDaliNativeImageSourceColorDepth24P(void);
extern int UtcDaliNativeImageSourceColorDepth32P(void);
{"UtcDaliWindowSetGetBrightnessP",UtcDaliWindowSetGetBrightnessP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetSizeResizedSignalP",UtcDaliWindowSetGetSizeResizedSignalP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetPositionP",UtcDaliWindowSetGetPositionP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowAddRemoveActorP",UtcWindowAddRemoveActorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowSetGetBackgroundColorP",UtcWindowSetGetBackgroundColorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetRootLayerP",UtcWindowGetRootLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerCountP",UtcWindowGetLayerCountP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerP",UtcWindowGetLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliNativeImageSourceColorDepthDefaultP",UtcDaliNativeImageSourceColorDepthDefaultP,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth24P",UtcDaliNativeImageSourceColorDepth24P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth32P",UtcDaliNativeImageSourceColorDepth32P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
extern int UtcDaliWindowSetGetBrightnessP(void);
extern int UtcDaliWindowSetGetSizeResizedSignalP(void);
extern int UtcDaliWindowSetGetPositionP(void);
+extern int UtcWindowAddRemoveActorP(void);
+extern int UtcWindowSetGetBackgroundColorP(void);
+extern int UtcWindowGetRootLayerP(void);
+extern int UtcWindowGetLayerCountP(void);
+extern int UtcWindowGetLayerP(void);
extern int UtcDaliNativeImageSourceColorDepthDefaultP(void);
extern int UtcDaliNativeImageSourceColorDepth24P(void);
extern int UtcDaliNativeImageSourceColorDepth32P(void);
{"UtcDaliWindowSetGetBrightnessP",UtcDaliWindowSetGetBrightnessP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetSizeResizedSignalP",UtcDaliWindowSetGetSizeResizedSignalP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetPositionP",UtcDaliWindowSetGetPositionP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowAddRemoveActorP",UtcWindowAddRemoveActorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowSetGetBackgroundColorP",UtcWindowSetGetBackgroundColorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetRootLayerP",UtcWindowGetRootLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerCountP",UtcWindowGetLayerCountP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerP",UtcWindowGetLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliNativeImageSourceColorDepthDefaultP",UtcDaliNativeImageSourceColorDepthDefaultP,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth24P",UtcDaliNativeImageSourceColorDepth24P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth32P",UtcDaliNativeImageSourceColorDepth32P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
extern int UtcDaliWindowSetGetBrightnessP(void);
extern int UtcDaliWindowSetGetSizeResizedSignalP(void);
extern int UtcDaliWindowSetGetPositionP(void);
+extern int UtcWindowAddRemoveActorP(void);
+extern int UtcWindowSetGetBackgroundColorP(void);
+extern int UtcWindowGetRootLayerP(void);
+extern int UtcWindowGetLayerCountP(void);
+extern int UtcWindowGetLayerP(void);
extern int UtcDaliNativeImageSourceColorDepthDefaultP(void);
extern int UtcDaliNativeImageSourceColorDepth24P(void);
extern int UtcDaliNativeImageSourceColorDepth32P(void);
{"UtcDaliWindowSetGetBrightnessP",UtcDaliWindowSetGetBrightnessP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetSizeResizedSignalP",UtcDaliWindowSetGetSizeResizedSignalP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliWindowSetGetPositionP",UtcDaliWindowSetGetPositionP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowAddRemoveActorP",UtcWindowAddRemoveActorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowSetGetBackgroundColorP",UtcWindowSetGetBackgroundColorP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetRootLayerP",UtcWindowGetRootLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerCountP",UtcWindowGetLayerCountP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
+ {"UtcWindowGetLayerP",UtcWindowGetLayerP,utc_Dali_Window_startup,utc_Dali_Window_cleanup},
{"UtcDaliNativeImageSourceColorDepthDefaultP",UtcDaliNativeImageSourceColorDepthDefaultP,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth24P",UtcDaliNativeImageSourceColorDepth24P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
{"UtcDaliNativeImageSourceColorDepth32P",UtcDaliNativeImageSourceColorDepth32P,utc_Dali_NativeImageSource_startup,utc_Dali_NativeImageSource_cleanup},
void WindowSetGetBrightnessP( Application& application );
void WindowSetGetSizeResizedSignalP( Application& application );
void WindowSetGetPositionP( Application& application );
+void WindowAddRemoveActorP( Application& application );
+void WindowSetGetBackgroundColorP( Application& application );
+void WindowGetRootLayerP( Application& application );
+void WindowGetLayerCountP( Application& application );
+void WindowGetLayerP( Application& application );
void VTWindowSetGetSizeResizedSignal001( Application& application );
WINDOW_SET_GET_SCREEN_OFF_MODE_P,
WINDOW_SET_GET_BRIGHTNESS_P,
WINDOW_SET_GET_SIZE_RESIZED_SIGNAL_P,
- WINDOW_SET_GET_POSITION_P
+ WINDOW_SET_GET_POSITION_P,
+ WINDOW_ADD_REMOVE_ACTOR_P,
+ WINDOW_SET_GET_BACKGROUND_COLOR_P,
+ WINDOW_GET_ROOT_LAYER_P,
+ WINDOW_GET_LAYER_COUNT_P,
+ WINDOW_GET_LAYER_P
};
struct Window_TestApp : public ConnectionTracker
case WINDOW_SET_GET_POSITION_P:
WindowSetGetPositionP( mApplication );
break;
+
+ case WINDOW_ADD_REMOVE_ACTOR_P:
+ WindowAddRemoveActorP( mApplication );
+ break;
+
+ case WINDOW_SET_GET_BACKGROUND_COLOR_P:
+ WindowSetGetBackgroundColorP( mApplication );
+ break;
+
+ case WINDOW_GET_ROOT_LAYER_P:
+ WindowGetRootLayerP( mApplication );
+ break;
+
+ case WINDOW_GET_LAYER_COUNT_P:
+ WindowGetLayerCountP( mApplication );
+ break;
+
+ case WINDOW_GET_LAYER_P:
+ WindowGetLayerP( mApplication );
+ break;
}
}
DaliLog::PrintPass();
}
+void WindowAddRemoveActorP( Application& application )
+{
+ Window window = application.GetWindow();
+
+ Actor actor = Actor::New();
+ DALI_CHECK_FAIL( !actor, "Actor::New() is Failed" );
+
+ bool bIsOnStage = actor.OnStage();
+ DALI_CHECK_FAIL( bIsOnStage, " OnStage is Failed to get default value" );
+
+ window.Add( actor );
+ bIsOnStage = actor.OnStage();
+ DALI_CHECK_FAIL( !bIsOnStage, "OnStage is Failed to get the expected value" );
+
+ window.Remove( actor );
+ bIsOnStage = actor.OnStage();
+ DALI_CHECK_FAIL( bIsOnStage, "OnStage is Failed to get the expected value" );
+
+ DaliLog::PrintPass();
+}
+
+void WindowSetGetBackgroundColorP( Application& application )
+{
+ Window window = application.GetWindow();
+
+ window.SetBackgroundColor( Color::RED );
+ DALI_CHECK_FAIL( Color::RED != window.GetBackgroundColor(), "Window::SetBackgroundColor and Window::GetBackgroundColor are failed" );
+
+ DaliLog::PrintPass();
+}
+
+void WindowGetRootLayerP( Application& application )
+{
+ Window window = application.GetWindow();
+
+ Layer rootLayer = window.GetLayer( 0u );
+ DALI_CHECK_FAIL( window.GetRootLayer() != rootLayer, "GetRootLayer is failed to get expected value" );
+
+ Layer layer = Layer::New();
+ window.Add( layer );
+ layer.LowerToBottom();
+ DALI_CHECK_FAIL( window.GetRootLayer() != rootLayer, "GetRootLayer is failed to get expected value" );
+
+ DaliLog::PrintPass();
+}
+
+void WindowGetLayerCountP( Application& application )
+{
+ Window window = application.GetWindow();
+
+ // Initially we have a default layer
+ DALI_CHECK_FAIL( window.GetLayer( 0u ) != window.GetRootLayer(), "GetLayer is failed to get expected value" );
+ DALI_CHECK_FAIL( window.GetLayerCount() != 1u, "GetLayerCount is failed to get expected value" );
+
+ // Add a new layer to the window
+ Layer newLayer = Layer::New();
+ window.Add( newLayer );
+ DALI_TEST_EQUALS( window.GetLayerCount() != 2u, "GetLayerCount is failed to get expected value" );
+
+ // Retrieves the new layer from the window
+ DALI_TEST_EQUALS( window.GetLayer( 1u ) != newLayer, "GetLayer is failed to get expected value" );
+
+ DaliLog::PrintPass();
+}
+
+void WindowGetLayerP( Application& application )
+{
+ Window window = application.GetWindow();
+
+ // Initially we have a default layer
+ DALI_CHECK_FAIL( window.GetLayerCount() != 1u, "GetLayerCount is failed to get expected value" );
+
+ // Add a new layer to the window
+ Layer layer = Layer::New();
+ window.Add( layer );
+ DALI_TEST_EQUALS( window.GetLayerCount() != 2u, "GetLayerCount is failed to get expected value" );
+
+ // Remove the new layer from the window
+ window.Remove( layer );
+ DALI_TEST_EQUALS( window.GetLayerCount() != 1u, "GetLayerCount is failed to get expected value" );
+
+ DaliLog::PrintPass();
+}
+
/**
* @testcase UtcDaliWindowNewP
* @since_tizen 2.4
application.MainLoop();
return test_return_value;
}
+
+/**
+* @testcase UtcWindowAddRemoveActorP
+* @since_tizen 5.5
+* @description checks for Window::Add() and Window::Remove() functionality
+*/
+int UtcWindowAddRemoveActorP(void)
+{
+ DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ Window_TestApp testApp( application, WINDOW_ADD_REMOVE_ACTOR_P );
+ application.MainLoop();
+ return test_return_value;
+}
+
+/**
+* @testcase UtcWindowSetGetBackgroundColorP
+* @since_tizen 5.5
+* @description checks for Window::SetBackgroundColor() and Window::GetBackgroundColor() functionality
+*/
+int UtcWindowSetGetBackgroundColorP(void)
+{
+ DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ Window_TestApp testApp( application, WINDOW_SET_GET_BACKGROUND_COLOR_P );
+ application.MainLoop();
+ return test_return_value;
+}
+
+/**
+* @testcase UtcWindowGetRootLayerP
+* @since_tizen 5.5
+* @description checks for Window::GetRootLayer functionality
+*/
+int UtcWindowGetRootLayerP(void)
+{
+ DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ Window_TestApp testApp( application, WINDOW_GET_ROOT_LAYER_P );
+ application.MainLoop();
+ return test_return_value;
+}
+
+/**
+* @testcase UtcWindowGetLayerCountP
+* @since_tizen 5.5
+* @description checks for Window::GetLayerCount functionality
+*/
+int UtcWindowGetLayerCountP(void)
+{
+ DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ Window_TestApp testApp( application, WINDOW_GET_LAYER_COUNT_P );
+ application.MainLoop();
+ return test_return_value;
+}
+
+/**
+* @testcase UtcWindowGetLayerP
+* @since_tizen 5.5
+* @description checks for Window::GetLayer functionality
+*/
+int UtcWindowGetLayerP(void)
+{
+ DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ Window_TestApp testApp( application, WINDOW_GET_LAYER_P );
+ application.MainLoop();
+ return test_return_value;
+}