static void *Move_Flash_Img(void *arg) /* 功能:移动进度条中闪光的位置 */ { int x=0; LCUI_Widget *widget = (LCUI_Widget*)arg; LCUI_Widget *flash = Get_ProgressBar_Flash_Img_Widget(widget); LCUI_ProgressBar *pb = Get_Widget_PrivData(widget); while(1) { for(x=(0-flash->size.w); x<=flash->parent->size.w; x+=(pb->img_move_speed/20.0+0.5)) { Move_Widget(flash, Pos(x , flash->pos.y)); usleep(50000); } usleep(pb->sleep_time); } LCUI_Thread_Exit(NULL); }
void *change_graph(void *arg) /* 功能:改变显示的图形 */ { LCUI_Widget *widget = (LCUI_Widget *)arg; int i; LCUI_Graph frame, temp; Graph_Init(&frame);/* 初始化 */ Load_Image("ring.png", &frame);/* 载入之 */ /* 居中显示图形 */ Set_Widget_Align(widget, ALIGN_MIDDLE_CENTER, Pos(0, -20)); Set_PictureBox_Size_Mode(widget, SIZE_MODE_CENTER); Show_Widget(widget); while(1) { Set_PictureBox_Image_From_Graph(widget, &frame); for(i=10; i<=360; i+=10) { Rotate_Graph(&frame, i, &temp); Set_PictureBox_Image_From_Graph(widget, &temp); usleep(20000); } } LCUI_Thread_Exit(NULL); }