Esempio n. 1
0
/** 停用事件模块并进行清理 */
static void LCUI_ExitEvent(void)
{
	System.event.is_running = FALSE;
	LCUICond_Broadcast( &System.event.cond );
	LCUIThread_Join( System.event.tid, NULL );
	LCUICond_Destroy( &System.event.cond );
	LCUIEventBox_Destroy( System.event.box );
	System.event.box = NULL;
}
Esempio n. 2
0
/** 部件析构函数 */
static void $(OnDestroy)( void *arg )
{
	LCUI_WidgetEvent e;
	LCUI_Widget widget = (LCUI_Widget)arg;

	Widget_DestroyTaskBox( widget );
	LCUIEventBox_Destroy( widget->event );
	widget->event = NULL;
	LinkedList_Destroy( &widget->children );
	LinkedList_Destroy( &widget->children_show );
	DirtyRectList_Destroy( &widget->dirty_rects );
	/* 如果是从根级部件中移出,则触发 WET_REMOVE 事件 */
	if( widget->parent == LCUIRootWidget ) {
		e.type_name = "TopLevelWidget";
		e.target = widget;
		Widget_PostEvent( LCUIRootWidget, &e, (int*)WET_REMOVE );
	}
}