Пример #1
0
static PRESULT mail_content_callback ( POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2 )
{
	PRESULT ret = PROC_PASS;
	INT32 iret;
	/*struct help_item_resource mail_con_help[] =
	{
		{1,IM_HELP_ICON_TB,RS_HELP_SELECT},
		{0,RS_MENU,RS_HELP_BACK},
		{0,RS_HELP_EXIT,RS_FULL_PLAY},  
	};*/

	switch ( event )
	{
		case EVN_PRE_OPEN:
			 OSD_ClearObject((POBJECT_HEAD)&g_win_mail, C_UPDATE_ALL);
			mail_title_info.pTextTable = ( PTEXT_CONTENT ) &mail_mtxt_title;
			//mail_title_info.pString = NULL;
			mail_content_info.pTextTable = ( PTEXT_CONTENT ) &mail_mtxt_content;
			//mail_content_info.pString = NULL;
			win_init_pstring(3);

			iret = mail_content_got_info();
			if (0 == iret)
			{
				ret = PROC_LEAVE;
				break;
			}
			//wincom_open_help(mail_con_help, 3);
			break;
		case EVN_POST_OPEN:
			break;
		case EVN_PRE_DRAW:
			mail_content_set_display();
			break;
		case EVN_PRE_CLOSE:
			/* Make OSD not flickering */
			if((menu_stack_get(0)!=( POBJECT_HEAD ) &g_win_mainmenu)&&(menu_stack_get(0)!=( POBJECT_HEAD ) &g_win_mail))
			{	
				*((UINT32*)param2) &= C_CLOSE_CLRBACK_FLG;
				MAILCONTENT_FORCE_FLAG=0;
			}
			else
				*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;
			break;
		case EVN_POST_CLOSE:
			break;
	}
	return ret;
}
Пример #2
0
static PRESULT maildetail_win_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	VACTION msg_got;
	UINT8 bFocusID=OSD_GetContainerFocus((PCONTAINER)&g_win_cti_mail_detail);
	INT32 iret;
	
	switch(event)
	{
		case EVN_PRE_OPEN:
			mail_init_pstring(3);
			iret = mail_content_got_info();
			if (0 == iret)
			{
				ret = PROC_LEAVE;
				break;
			}
			break;
		case EVN_POST_OPEN:
			break;

		case EVN_PRE_CLOSE:
	       	*((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG;

			break;
		case EVN_POST_CLOSE:
			break;

		case EVN_UNKNOWN_ACTION:
			unact = (VACTION)(param1>>16);
			break;
		case EVN_ITEM_POST_CHANGE:
			break;
		case EVN_MSG_GOT:
			msg_got = (VACTION)(param1>>16);
			break;
		case EVN_PRE_DRAW:
			maildetail_fill_content();
			break;
	}	

	return ret;
}