/* * 功能:LCUI程序的主循环 * 说明:每个LCUI程序都需要调用它,此函数会让程序执行LCUI分配的任务 * */ int LCUI_Main( void ) { LCUI_MainLoop loop; loop = LCUI_MainLoop_New(); LCUI_MainLoop_Run( loop ); return LCUI_Destroy(); }
int test_xml_parser( void ) { int ret = 0; LCUI_Widget root, pack; LCUI_Init(); TEST_LOG( "test widget layout\n" ); LCUIDisplay_SetSize( 960, 680 ); root = LCUIWidget_GetRoot(); CHECK( pack = LCUIBuilder_LoadFile( "test_xml_parser.xml" ) ); if( !pack ) { LCUI_Destroy(); return ret; } Widget_UpdateStyle( root, TRUE ); Widget_Append( root, pack ); Widget_Unwrap( pack ); LCUIWidget_Update(); ret += check_widget_attribute(); LCUI_Destroy(); return ret; }
int test_widget_inline_block_layout( void ) { int ret = 0; LCUI_Widget root, pack; LCUI_Init(); TEST_LOG( "test widget inline block layout\n" ); LCUIDisplay_SetSize( SCREEN_WIDTH, SCREEN_HEIGHT ); root = LCUIWidget_GetRoot(); CHECK( pack = LCUIBuilder_LoadFile( "test_widget_inline_block_layout.xml" ) ); if( !pack ) { LCUI_Destroy(); return ret; } Widget_UpdateStyle( root, TRUE ); Widget_Append( root, pack ); Widget_Unwrap( pack ); LCUIWidget_Update(); ret += check_layout(); LCUI_Destroy(); return ret; }