static void win_finger_print_draw_info(char* str, UINT16* unistr, UINT16 xpos) { TEXT_FIELD* txt; static UINT16 pre_xpos = 0; txt = &txt_fingerprint; if(xpos != pre_xpos) { OSD_ClearObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); pre_xpos = xpos; } txt->head.frame.uLeft = xpos; if(str != NULL) OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str); else if (unistr != NULL) OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)unistr); if((str != NULL)||(unistr != NULL)) { OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } else { OSD_ClearObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }
/////////////////////////////////////////////////////////////////////////////////////////////////////// // The following are same for Keyboard or mobile style input. static void input_callback(UINT8* string) { UINT32 prog_num = 0; UINT16* unistr; P_NODE p_node; UINT32 find_cnt; find_cnt = win_find_prog_num; unistr = (UINT16*)string; if(ComUniStrLen(unistr) == 0) win_find_prog_num = 0; else win_find_prog_num = find_prog_by_name(string,&p_node); if(win_find_prog_num == 0) { if( find_cnt!=0) OSD_ClearObject((POBJECT_HEAD)&g_win_com_lst, C_UPDATE_ALL); } else { win_findprog_set_display(); OSD_TrackObject((POBJECT_HEAD)&g_win_com_lst, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } }
static PRESULT Containerca_set1_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; switch (event) { case EVN_PRE_OPEN: OSD_ClearObject((POBJECT_HEAD) &g_win_sys_management, C_UPDATE_ALL); hde_set_mode(0); //wincom_close_preview(); // wincom_open_title_ext(RS_SYSTEM_SETUP, IM_TITLE_ICON_SYSTEM); // wincom_open_help(win_sys_help, 4); //set_update_flag(TRUE); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: //wincom_close_preview(); break; case EVN_MSG_GOT: //ret = sys_mg_message_proc(param1, param2); break; case EVN_UNKNOWN_ACTION: break; } return ret; }
void ShowSignalStatusOSDOnOff(UINT8 flag) { OBJECT_HEAD* obj; POBJECT_HEAD topmenu =NULL; BOOL bifClear = 1; struct OSDRect relative_rect; obj = (OBJECT_HEAD*)&g_win_sigstatus; topmenu =(POBJECT_HEAD)menu_stack_get_top();//@Alan modify if(topmenu && topmenu != obj) { relative_rect.uWidth = 0; relative_rect.uHeight = 0; OSD_GetRectsCross(&(topmenu->frame),&(obj->frame),&relative_rect); if(relative_rect.uHeight != 0 && relative_rect.uWidth != 0) { bifClear = 0; } } if(flag) OSD_DrawObject(obj, C_UPDATE_ALL); else //OSD_ClearObject(obj, 0); { bifClear ? OSD_ClearObject(obj, 0):NULL;//@Alan modify } signal_stataus_showed = flag ? TRUE : FALSE; }
static void show_title(UINT16 idx) { char str_name[FULL_PATH_SIZE],str_buff[FULL_PATH_SIZE]; char full_name[FULL_PATH_SIZE]; TEXT_FIELD *pTxt; FileInfo file_node; if(image_folderloop_flag == 1)//filelist { STRCPY(str_buff, "Disk "); get_file_from_play_list(cur_playlist_image, idx, &file_node); win_get_fullname(full_name, file_node.path, file_node.name); win_get_display_dirname(str_name, full_name); strcat(str_buff, str_name); } else//playlist { STRCPY(str_buff, "Image Play List/"); get_file_from_play_list(cur_playlist_image,idx,&file_node); //filter_unkownfont_name(file_node.name,str_name); win_shorten_filename(file_node.name,str_name); strcat(str_buff, str_name); } pTxt = &imgpreview_title; OSD_ClearObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_buff); OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); }
static PRESULT hdmi_factest_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 bID; POBJECT_HEAD nxtObj; POBJECT_HEAD topmenu; bID = OSD_GetObjID(pObj); extern sys_state_t system_state; switch(event) { case EVN_PRE_OPEN: //ap_enable_key_task_get_key(TRUE); //key_set_upgrade_check_flag(0); last_system_state = system_state; //system_state = SYS_STATE_UPGRAGE_HOST; memset(hdmi_info_name_str,0x00,sizeof(hdmi_info_name_str)); memset(hdmi_info1_str,0x00,sizeof(hdmi_info1_str)); memset(hdmi_info2_str,0x00,sizeof(hdmi_info2_str)); memset(hdmi_info3_str,0x00,sizeof(hdmi_info3_str)); memset(hdmi_info4_str,0x00,sizeof(hdmi_info4_str)); wincom_close_title(); if(menu_stack_get(0) == (POBJECT_HEAD)&g_win_mainmenu) { OSD_ClearObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); topmenu = menu_stack_get_top(); if(topmenu) OSD_ClearObject( topmenu, C_UPDATE_ALL); } break; case EVN_POST_OPEN: hdmi_display_info_set(); break; case EVN_POST_CLOSE: if(menu_stack_get(0) == (POBJECT_HEAD)&g_win_mainmenu) OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); system_state = last_system_state; break; case EVN_UNKNOWN_ACTION: break; } return ret; }
void ap_cas_free_previewing_close() { if (CAS_POPUP_FREE_PREVIEWING_STATUS) { OSD_ClearObject((POBJECT_HEAD)&cas_freeprewing_info,C_UPDATE_ALL); CAS_POPUP_FREE_PREVIEWING_STATUS = 0; } }
void ShowTmsHintOSDOnOff(UINT8 flag) { OBJECT_HEAD* obj; obj = (OBJECT_HEAD*)&win_tms_hint_bmp; if(flag) OSD_DrawObject(obj, C_UPDATE_ALL); else OSD_ClearObject(obj, 0); }
void ShowDetitleOSDOnOff ( UINT8 flag ) { OBJECT_HEAD* obj; obj = ( OBJECT_HEAD* ) & win_detitle_bmp; if ( 1 == flag) OSD_DrawObject ( obj, C_UPDATE_ALL ); else if (0 == flag) OSD_ClearObject ( obj, 0 ); }
static void win_imageslide_showrotate(UINT8 flag) { if(flag) { OSD_DrawObject((POBJECT_HEAD)&imageslide_rotateicon,C_UPDATE_ALL); } else { OSD_ClearObject((POBJECT_HEAD)&imageslide_rotateicon, 0); } }
static void win_mpegYT_player_draw(BOOL bShow) { POBJECT_HEAD pObj = (POBJECT_HEAD) & g_win_mpegYT_player; if (bShow) { m_HideWindow = FALSE; OSD_DrawObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } else { m_HideWindow = TRUE; OSD_ClearObject(pObj, C_UPDATE_ALL); } }
static PRESULT sp_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_spielercam); switch(event) { case EVN_PRE_OPEN: //wincom_close_help(); nc_setting_init(); //OSD_SetID(&sp_item_con2,2,2,2,7,3); OSD_SetID(&sp_item_con7,7,7,7,6,6); OSD_SetContainerFocus(&g_win_spielercam,7); if(CccamNewcamdData.spidercam_code_active!=0&&CccamNewcamdData.spidercam_code_active!=1) CccamNewcamdData.spidercam_code_active=0; sp_item_sel_active(CccamNewcamdData.spidercam_code_active, 0,TRUE); break; case EVN_POST_OPEN: spidercam_title_display(); break; case EVN_PRE_CLOSE: nc_save_serinfo(0); sys_data_save(1); *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: OSD_ClearObject( (POBJECT_HEAD)&g_win_spielercam, C_UPDATE_ALL); //wincom_close_help(); //OSD_TrackObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); 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); //soc_printf("param1:0x%x vaction is 0x%x, 0x%x\n",param1,msg_got,VACT_CURSOR_LEFT); break; } return ret; }
static PRESULT disk_operate_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; char temp[30]; UINT8 *cur_select = NULL; switch(event) { case EVN_PRE_OPEN: switch(operate_type) { case OPERATE_TYPE_PART_FORMAT: STRCPY(temp, "Disk Mode"); cur_select = &mode_select; break; case OPERATE_TYPE_DVR_SET: STRCPY(temp, "DVR Type"); cur_select = &dvr_select_type; break; case OPERATE_TYPE_PART_COPY: STRCPY(temp, "Dest Partition"); cur_select = &partition_select; break; #ifdef DISK_MANAGER_SUPPORT case OPERATE_TYPE_DISK_REMOVE: STRCPY(temp, "Remove"); cur_select = &disk_select; break; #endif default: break; } ComAscStr2Uni(temp, display_strs[0]); win_disk_info_set_string(operate_type, *cur_select); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: if (menu_stack_get_top() == NULL) OSD_ClearObject((POBJECT_HEAD)&g_win_disk_operate, C_UPDATE_ALL); break; } return ret; }
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; }
void ShowReplayHintOSDOnOff(UINT8 flag) { OBJECT_HEAD* obj; obj = (OBJECT_HEAD*)&win_replay_hint_bmp; if(exit_submenu_flag_replay==FALSE) { if(flag) OSD_DrawObject(obj, C_UPDATE_ALL); else OSD_ClearObject(obj, 0); } exit_submenu_flag_replay=FALSE; }
static void win_imageslide_showpause(void) { UINT16 slide_interval; slide_interval = (image_slide_setting.uTime_gap * 1000); if(0 != slide_interval) { if(imageslide_pause_state == IMG_PAUSE_STATE) { OSD_DrawObject((POBJECT_HEAD)&imageslide_pause,C_UPDATE_ALL); } else { OSD_ClearObject((POBJECT_HEAD)&imageslide_pause, 0); } } }
static UINT32 mpegYT_file_prompt(char *str_prompt,UINT32 param) { UINT16 uni_prompt[32]; DEF_TEXTFIELD(txtprompt,NULL,NULL,C_ATTR_ACTIVE,C_FONT_2, \ 0,0,0,0,0, 300,250,500,50, WSTL_TEXT_07,WSTL_TEXT_07,WSTL_TEXT_07,WSTL_TEXT_07, \ NULL,NULL, \ C_ALIGN_CENTER| C_ALIGN_VCENTER, 0,0,0,uni_prompt) if(param > 0) { if (mpegYT_prompt_on_screen == 0) mpegYT_prompt_on_screen = 1; OSD_SetTextFieldContent(&txtprompt,STRING_ANSI,(UINT32)str_prompt); OSD_DrawObject((POBJECT_HEAD)&txtprompt,C_UPDATE_ALL); } else { mpegYT_prompt_on_screen = 0; OSD_ClearObject((POBJECT_HEAD)&txtprompt,C_UPDATE_ALL); } }
// The following are same for Keyboard or mobile style input. static void input_callback(UINT8* string) { UINT32 prog_num = 0; UINT16* unistr; P_NODE p_node; UINT32 find_chanlist_cnt; find_chanlist_cnt = win_find_chanlist_prog_num; unistr = (UINT16*)string; if(ComUniStrLen(unistr) == 0) win_find_chanlist_prog_num = 0; else win_find_chanlist_prog_num = find_prog_by_name(string,&p_node); if(win_find_chanlist_prog_num == 0) { if( find_chanlist_cnt!=0) { OSD_ClearObject((POBJECT_HEAD)&g_win_com_lst, C_UPDATE_ALL); #ifdef ORDER_GZ1011001 wincom_restore_region1(); #endif } } else { #ifdef ORDER_GZ1011001 { struct OSDRect rW; OSD_SetRect(&rW,W_PROG_L,W_PROG_T, W_PROG_W,W_PROG_H); wincom_backup_region1(&rW); } #endif win_find_chanlistprog_set_display(); OSD_TrackObject((POBJECT_HEAD)&g_win_com_lst, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } }
void ShowMuteOSDOnOff(UINT8 flag) { OBJECT_HEAD* obj; obj = (OBJECT_HEAD*)&win_mute_bmp; if (flag != m_mute_on_screen) { if(flag) api_inc_wnd_count(); } if(flag) OSD_DrawObject(obj, C_UPDATE_ALL); else OSD_ClearObject(obj, 0); if (flag != m_mute_on_screen) { if(!flag) api_dec_wnd_count(); m_mute_on_screen = flag; } }
static PRESULT hdmi_factest_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { struct hdmi_device *hdmi_dev = (struct hdmi_device *)dev_get_by_type(NULL,HLD_DEV_TYPE_HDMI); PRESULT ret = PROC_PASS; UINT8 bID; POBJECT_HEAD nxtObj; POBJECT_HEAD topmenu; bID = OSD_GetObjID(pObj); extern sys_state_t system_state; UINT8 buf[512]; UINT32 v_key, i; FILE *fp; MULTISEL *pMsel; static BOOL log_edid_info = FALSE, log_dbg_info = FALSE, ignore_hotplug = FALSE; switch(event) { case EVN_PRE_OPEN: //ap_enable_key_task_get_key(TRUE); //key_set_upgrade_check_flag(0); last_system_state = system_state; //system_state = SYS_STATE_UPGRAGE_HOST; memset(hdmi_info_name_str,0x00,sizeof(hdmi_info_name_str)); memset(hdmi_info1_str,0x00,sizeof(hdmi_info1_str)); memset(hdmi_info2_str,0x00,sizeof(hdmi_info2_str)); memset(hdmi_info3_str,0x00,sizeof(hdmi_info3_str)); memset(hdmi_info4_str,0x00,sizeof(hdmi_info4_str)); wincom_close_title(); if(menu_stack_get(0) == (POBJECT_HEAD)&g_win_mainmenu) { OSD_ClearObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); topmenu = menu_stack_get_top(); if(topmenu) OSD_ClearObject( topmenu, C_UPDATE_ALL); } break; case EVN_POST_OPEN: hdmi_dev->io_control(hdmi_dev,HDMI_CMD_REG_CALLBACK, HDMI_CB_DBG_MSG, (UINT32)hdmi_debug_message_callback); hdmi_display_info_set(); break; case EVN_POST_CLOSE: if(menu_stack_get(0) == (POBJECT_HEAD)&g_win_mainmenu) OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); system_state = last_system_state; break; case EVN_UNKNOWN_ACTION: break; case EVN_UNKNOWNKEY_GOT: ap_hk_to_vk(0, param1, &v_key); switch(v_key) { case V_KEY_RED: // Red Button : Log EDID Information //old IR Red key is 65 if(log_edid_info == FALSE) { log_edid_info = TRUE; // Check log file exist or not, if exist delete it. edid_log_file= fs_open("/c/hdmi_edid_log.txt", O_RDONLY, 0666); // if(edid_log_file >= 0) /*always is true ,clean the warning */ { fs_close(edid_log_file); fs_remove("/c/hdmi_edid_log.txt"); } edid_log_file = fs_open("/c/hdmi_edid_log.txt", O_RDWR | O_CREAT, S_IFREG | S_IRWXU); hdmi_log_edid_start(); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Start to Log EDID Information", 0); } else { log_edid_info = FALSE; fs_close( edid_log_file ); fs_sync("/c/"); hdmi_log_edid_stop(); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Stop to Log EDID Information", 0); } osal_task_sleep(2000); win_compopup_close(); hdmi_display_info_set(); break; case V_KEY_GREEN: // Green Button : Log debug Information if(log_dbg_info == FALSE) { log_dbg_info = TRUE; // Check log file exist or not, if exist delete it. debug_log_file= fs_open("/c/hdmi_debug_log.txt", O_RDONLY, 0666); // if(debug_log_file >= 0) /*always is true ,clean the warning */ { fs_close(debug_log_file); fs_remove("/c/hdmi_debug_log.txt"); } debug_log_file = fs_open("/c/hdmi_debug_log.txt", O_RDWR | O_CREAT, S_IFREG | S_IRWXU); hdmi_log_debug_start(); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Start to Log Debug Information", 0); } else { log_dbg_info = FALSE; fs_close( debug_log_file ); fs_sync("/c/"); hdmi_log_debug_stop(); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Stop to Log Debug Information", 0); } osal_task_sleep(2000); win_compopup_close(); hdmi_display_info_set(); break; case V_KEY_YELLOW: // Yellow Button : Switch on/off HDCP if(api_get_hdmi_hdcp_onoff() == TRUE) { api_set_hdmi_hdcp_onoff(FALSE); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Turn HDCP Off", 0); } else { api_set_hdmi_hdcp_onoff(TRUE); win_com_popup_open(WIN_POPUP_TYPE_SMSG,"Turn HDCP On", 0); } osal_task_sleep(2000); win_compopup_close(); hdmi_display_info_set(); break; default: break; } break; } return ret; }
static PRESULT win_imageslide_unkown_act_proc(VACTION act) { PRESULT ret = PROC_PASS; UINT8 rotate_mode, display_mode; POBJECT_HEAD win,mplayer_menu; int next_image; UINT16 slide_interval; FileInfo file_node; char image_name[FULL_PATH_SIZE]; switch(act) { case VACT_ROTATEL: case VACT_ROTATER: if(FALSE == decode_finish_flag) break; if(imageslide_pause_state == IMG_UNPAUSE_STATE) { api_stop_timer(&imageslide_timer_id); imageslide_pause_state = IMG_PAUSE_STATE; } if(act == VACT_ROTATER) { image_rot_ang = (image_rot_ang + 1)%IMAGE_ANGLE_CNT; } else { image_rot_ang = (image_rot_ang+IMAGE_ANGLE_CNT - 1)%IMAGE_ANGLE_CNT; } image_rotate(image_rot_ang); if(image_rot_ang == ANG_ORI) { win_imageslide_showrotate(FALSE); win_imageslide_showpause(); } else { OSD_ClearObject((POBJECT_HEAD)&imageslide_pause, 0); win_imageslide_showrotate(TRUE); } slideidx_display(TRUE); break; case VACT_INCREASE: case VACT_DECREASE: if(imageslide_pause_state == IMG_UNPAUSE_STATE) { api_stop_timer(&imageslide_timer_id); imageslide_pause_state = IMG_PAUSE_STATE; win_imageslide_showpause(); } if(act == VACT_INCREASE) { next_image = get_next_index_from_play_list(cur_playlist_image); } else { next_image = get_previous_index_from_play_list(cur_playlist_image); } if(next_image != -1) { cur_image_idx = next_image; api_stop_timer(&imageslide_timer_id); image_abort(); if(image_rot_ang!= ANG_ORI) { image_rot_ang = ANG_ORI; win_imageslide_showrotate(FALSE); win_imageslide_showpause(); } osal_task_sleep(20); set_play_list_info(cur_playlist_image,&cur_image_idx,NULL); get_file_from_play_list(cur_playlist_image, cur_image_idx, &file_node); win_get_fullname(image_name, file_node.path, file_node.name); win_image_file_play(image_name, image_rot_ang); decode_finish_flag = FALSE; osal_task_sleep(20); slideidx_display(TRUE); } break; case VACT_PAUSE: if(imageslide_pause_state == IMG_UNPAUSE_STATE) { imageslide_pause_state = IMG_PAUSE_STATE; win_imageslide_showpause(); api_stop_timer(&imageslide_timer_id); } else { if(image_rot_ang == ANG_ORI) { imageslide_pause_state = IMG_UNPAUSE_STATE; slide_interval = (image_slide_setting.uTime_gap * 1000); win_imageslide_showpause(); if(0 != image_slide_setting.uTime_gap) imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler); } } ret = PROC_LOOP; break; case VACT_PLAY: if(IMG_PAUSE_STATE == imageslide_pause_state) { if(image_rot_ang == ANG_ORI) { imageslide_pause_state = IMG_UNPAUSE_STATE; win_imageslide_showpause(); slide_interval = (image_slide_setting.uTime_gap * 1000); if(0 != image_slide_setting.uTime_gap) imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler); } } ret = PROC_LOOP; break; case VACT_ZOOM: if(decode_finish_flag) { if(imageslide_pause_state == IMG_UNPAUSE_STATE) { imageslide_pause_state = IMG_PAUSE_STATE; win_imageslide_showpause(); api_stop_timer(&imageslide_timer_id); } win_mpzoom_open(); if(image_rot_ang == ANG_ORI) { imageslide_pause_state = IMG_UNPAUSE_STATE; slide_interval = (image_slide_setting.uTime_gap * 1000); win_imageslide_showpause(); imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler); } } break; case VACT_MP: win = (POBJECT_HEAD)(&g_win_imageslide); OSD_ObjClose(win,C_CLOSE_CLRBACK_FLG); while((POBJECT_HEAD)&g_win_usb_filelist != menu_stack_get_top()) { menu_stack_pop(); } image_abort(); win_set_image_multiview_firstidx(); mplayer_menu = (POBJECT_HEAD)(&g_win_imagepreview); if(OSD_ObjOpen(mplayer_menu,(UINT32)(~0)) != PROC_LEAVE) menu_stack_push(mplayer_menu); break; default: break; } return ret; }
static PRESULT slide_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT16 slide_interval; PlayListLoopType loop_type; VACTION unact; FileInfo file_node; char image_name[FULL_PATH_SIZE]; int next_image; static UINT8 timer_start_flag = 0; UINT32 file_idx; switch(event) { case EVN_PRE_OPEN: imageslide_timer_id = OSAL_INVALID_ID; imageslide_proc_id = OSAL_INVALID_ID; if(from_imagepreview == TRUE) { imageslide_pause_state = IMG_PAUSE_STATE; } else { imageslide_pause_state = IMG_UNPAUSE_STATE; } win_imageslide_showpause(); api_set_preview_vpo_color(FALSE); break; case EVN_POST_OPEN: image_rot_ang = ANG_ORI; loop_type = image_slide_setting.bRepeat ? PLAY_LIST_REPEAT : PlAY_LIST_SEQUENCE; set_play_list_info(cur_playlist_image,&cur_image_idx,&loop_type); get_file_from_play_list(cur_playlist_image, cur_image_idx, &file_node); win_get_fullname(image_name, file_node.path, file_node.name); win_image_file_play(image_name, image_rot_ang); slideidx_display(TRUE); decode_finish_flag = FALSE; break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); ret = win_imageslide_unkown_act_proc(unact); break; case EVN_PRE_CLOSE: g_from_imageslide = TRUE; imagedec_ioctl(1, IMAGEDEC_IO_CMD_CLEAN_FRM, TRUE); //when quit win_slide, clean 2 frm buffer if(image_folderloop_flag == 1)//filelist { get_file_from_play_list(cur_playlist_image, cur_image_idx, &file_node); win_get_fullname(image_name, file_node.path, file_node.name); usblist_set_filelist_param(image_name); } image_abort(); api_stop_timer(&imageslide_timer_id); api_stop_timer(&imageslide_proc_id); timer_start_flag = 0; imageslide_timer_id = OSAL_INVALID_ID; imageslide_proc_id = OSAL_INVALID_ID; win_set_image_multiview_firstidx(); OSD_ClearObject((POBJECT_HEAD)&imageslide_idx,C_UPDATE_ALL); OSD_ClearObject((POBJECT_HEAD)&imageslide_pause,C_UPDATE_ALL); OSD_ClearObject((POBJECT_HEAD)&decode_txt_progress,C_UPDATE_ALL); OSD_ClearObject((POBJECT_HEAD)&decode_bmp_progress,C_UPDATE_ALL); break; case EVN_POST_CLOSE: image_restore_vpo_rect();//TODO break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER) { //storage_dev_mount_hint(1); file_list_check_storage_device(FALSE, FALSE); } else if(param1 == CTRL_MSG_SUBTYPE_STATUS_IMAGEOVER) { image_abort(); decode_finish_flag = TRUE; if(imageslide_pause_state == IMG_UNPAUSE_STATE) { slide_interval = (image_slide_setting.uTime_gap * 1000); if(0 != slide_interval) imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler); else { imageslide_pause_state = IMG_PAUSE_STATE; win_imageslide_showpause(); } } } else if (param1 == CTRL_MSG_SUBTYPE_STATUS_IMGTOOVER) // timer timeouts { //TODO: play next next_image = get_next_index_from_play_list(cur_playlist_image); if (next_image != -1) { cur_image_idx = next_image; set_play_list_info(cur_playlist_image,&cur_image_idx,NULL); get_file_from_play_list(cur_playlist_image, cur_image_idx, &file_node); win_get_fullname(image_name, file_node.path, file_node.name); win_image_file_play(image_name, image_rot_ang); decode_finish_flag = FALSE; ap_send_msg(CTRL_MSG_SUBTYPE_CMD_UPDATE_VIEW, 0, TRUE); } else { ap_send_msg(CTRL_MSG_SUBTYPE_CMD_EXIT, 0,TRUE); } } else if(param1 == CTRL_MSG_SUBTYPE_CMD_EXIT) { if(from_imagepreview == TRUE) back_to_filelist = TRUE; ret = PROC_LEAVE; } else if(param1 == CTRL_MSG_SUBTYPE_CMD_UPDATE_VIEW) { slideidx_display(TRUE); ret = PROC_LOOP; } else if(param1 == CTRL_MSG_SUBTYPE_STATUS_MP3OVER) { win_play_next_music_ex(); } else if(param1 == CTRL_MSG_SUBTYPE_STATUS_PROC_UPDATE) { OSD_SetBitmapContent(&decode_bmp_progress, loading_bmp_ids[proc_cnt]); OSD_DrawObject((POBJECT_HEAD)&decode_bmp_progress,C_UPDATE_ALL); proc_cnt ++; if(proc_cnt >= LOADING_MAX) proc_cnt = 0; } if ((param1 == CTRL_MSG_SUBTYPE_STATUS_JPEG_DEC_PROCESS) || (param1 == CTRL_MSG_SUBTYPE_STATUS_IMAGEOVER)) { if ((param2 < 100) && (param1 == CTRL_MSG_SUBTYPE_STATUS_JPEG_DEC_PROCESS)) { loading_progress = (param2 * LOADING_MAX)/100; if (loading_progress > LOADING_MAX - 1) loading_progress = LOADING_MAX - 1; if(0 == timer_start_flag) { imageslide_proc_id = OSAL_INVALID_ID; imageslide_proc_id = api_start_cycletimer("SLIDE_PROC", 200, win_imageslide_proc_handler); timer_start_flag = 1; } // OSD_SetBitmapContent(&decode_bmp_progress, loading_bmp_ids[loading_progress]); // OSD_DrawObject((POBJECT_HEAD)&decode_bmp_progress,C_UPDATE_ALL); } else if((param2 >= 100) || (param1 == CTRL_MSG_SUBTYPE_STATUS_IMAGEOVER)) { OSD_ClearObject((POBJECT_HEAD)&decode_bmp_progress,C_UPDATE_ALL); api_stop_timer(&imageslide_proc_id); imageslide_proc_id = OSAL_INVALID_ID; timer_start_flag = 0; proc_cnt = 0; // imageslide_proc_id = OSAL_INVALID_ID; } } break; default: break; } return ret; }
static PRESULT srch_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT16 title_id; POBJECT_HEAD mainmenu; UINT8 av_flag; UINT16 cur_chan; UINT8 back_saved; switch(event) { case EVN_PRE_OPEN: system_state = SYS_STATE_SEARCH_PROG; if(win_search_param.as_method == AS_METHOD_TP || win_search_param.as_method == AS_METHOD_NIT_TP) // tp scan title_id = RS_INSTALLATION_TP_SCAN; else if(win_search_param.as_method == AS_METHOD_FFT || win_search_param.as_method == AS_METHOD_MULTI_FFT)//auto scan title_id = RS_INSTALLATION_AUTO_SCAN; else if(win_search_param.as_method == AS_METHOD_SAT_TP ||win_search_param.as_method == AS_METHOD_MULTI_TP || win_search_param.as_method == AS_METHOD_NIT || win_search_param.as_method == AS_METHOD_MULTI_NIT)//preset scan title_id = RS_INSTALLATION_PRESET_SCAN; else title_id = RS_INSTALLATION_AUTO_SCAN; wincom_open_subtitle(pObj,title_id,0); /*Remove progress bar when search type is AS_METHOD_NIT_TP/AS_METHOD_NIT/AS_METHOD_MULTI_NIT*/ if(win_search_param.as_method == AS_METHOD_NIT_TP || win_search_param.as_method == AS_METHOD_NIT|| win_search_param.as_method == AS_METHOD_MULTI_NIT) { OSD_SetAttr(&srch_progress_txt, C_ATTR_HIDDEN); OSD_SetAttr(&srch_progress_bar, C_ATTR_HIDDEN); } else { OSD_SetAttr(&srch_progress_txt, C_ATTR_ACTIVE); OSD_SetAttr(&srch_progress_bar, C_ATTR_ACTIVE); } key_pan_display("srch", 4); epg_off(); stop_tdt(); #ifdef AUTOSCAN_BYPASS_CI // Before Autoscan, DMX0 bypass CI if(win_search_param.as_method == AS_METHOD_FFT || win_search_param.as_method == AS_METHOD_MULTI_FFT)//auto scan { tsi_dmx_src_select(TSI_DMX_0, TSI_TS_B); tsi_para_src_select(TSI_SPI_1,0); api_set_nim_ts_type(2, 0x03); } #endif #ifdef HW_SS830C tsi_dmx_src_select(TSI_DMX_0, TSI_TS_B); api_set_nim_ts_type(2, 0x03); #endif break; case EVN_POST_OPEN: win_search_init(); break; case EVN_PRE_CLOSE: win_search_pre_close = 1; osal_task_dispatch_off(); moving_disk = 0;/*Clear moving dish flag*/ win_search_stop_signal = 1; osal_task_dispatch_on(); as_service_stop(); db_search_exit(); //api_stop_timer(&win_search_tmr_id); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; prog_callback_unregister(); pid_search_flg = 0; break; case EVN_POST_CLOSE: if((srch_ch_cnt[0] != 0x0) || (srch_ch_cnt[1] != 0x0)) { win_search_last_tp_ok_failed(srch_tp_cnt); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_WAIT_FOR_SAVING); //win_compopup_open(); win_compopup_open_ext(&back_saved); update_data(); win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("Search End", NULL, 0); win_compopup_open_ext(&back_saved); /* Change to all satellite group */ UINT32 grp_idx = sys_data_get_cur_group_index(); sys_data_check_channel_groups(); sys_data_set_cur_group_index(grp_idx); av_flag = sys_data_get_cur_chan_mode(); if(sys_data_get_sate_group_num(av_flag) == 0) { av_flag = (av_flag == TV_CHAN)? RADIO_CHAN : TV_CHAN; sys_data_set_cur_chan_mode(av_flag); } if(av_flag == RADIO_CHAN && (srch_ch_cnt[1] != 0x0)) //guop add 20101231 { av_flag = TV_CHAN; sys_data_set_cur_chan_mode(av_flag); } sys_data_change_group(grp_idx); if(srch_ch_cnt[av_flag] > 0) { cur_chan = get_prog_pos(win_search_cur_prog[av_flag].prog_id); if(cur_chan == 0xFFFF) { grp_idx = get_sat_pos(cur_sat_id) + 1; sys_data_change_group(grp_idx); cur_chan = get_prog_pos(win_search_cur_prog[av_flag].prog_id); if (cur_chan == 0xFFFF) { sys_data_change_group(0); cur_chan = get_prog_pos(win_search_cur_prog[av_flag].prog_id); if (cur_chan == 0xffff) cur_chan = 0; } } sys_data_set_cur_group_channel(cur_chan); } else if(sys_data_get_sate_group_num(av_flag)) key_pan_display("noCH", 4); else key_pan_display("----", 4); sys_data_save(1); epg_reset(); } OSD_ClearObject( (POBJECT_HEAD)&srch_progress_bar, C_UPDATE_ALL); OSD_ClearObject( (POBJECT_HEAD)&srch_progress_txt, C_UPDATE_ALL); mainmenu = (POBJECT_HEAD)&g_win_mainmenu; OSD_TrackObject(mainmenu,C_UPDATE_ALL); #ifdef AUTOSCAN_BYPASS_CI // After Autoscan, DMX0 NOT bypass CI if(win_search_param.as_method == AS_METHOD_FFT || win_search_param.as_method == AS_METHOD_MULTI_FFT)//auto scan { tsi_dmx_src_select(TSI_DMX_0, TSI_TS_A); tsi_para_src_select(TSI_SPI_1,0); } #endif start_tdt(); system_state = SYS_STATE_NORMAL; break; case EVN_MSG_GOT: ret = win_search_message_proc(param1,param2); break; } return ret; }
static PRESULT mail_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; BOOL changed; UINT8 TV_Out; UINT16 x, y, w, h; VACTION unact; UINT8 av_mode, id; UINT16 chan_idx; UINT8 rating; UINT16 rating_ret; OBJLIST* ol = &mail_ol; /*struct help_item_resource mail_help[] = { {1,IM_EPG_COLORBUTTON_RED,RS_HELP_DELETE}, {1,IM_EPG_COLORBUTTON_GREEN,RS_DELETE_ALL}, {1,IM_HELP_ICON_TB,RS_HELP_SELECT}, {0,RS_HELP_ENTER,RS_HELP_ENTER_INTO}, }; */ switch (event) { case EVN_PRE_OPEN: OSD_ClearObject((POBJECT_HEAD)&g_win_mainmenu, C_UPDATE_ALL); rating_ret = GYCA_GetParentControl(&rating); /*if ((CDCA_RC_CARD_INVALID == rating_ret)|| (CDCA_RC_POINTER_INVALID ==rating_ret)) { win_popup_msg(NULL, NULL, RS_CAERR_NOSMC); return PROC_LEAVE; } else if (CDCA_RC_OK != rating_ret) { win_popup_msg(NULL, NULL, RS_CAERR_UNKNOWN); return PROC_LEAVE; } */ MEMSET(display_strs[0], 0, sizeof(display_strs[0])*MAX_DISP_STR_ITEMS); //wincom_open_title_ext(RS_EMAIL, IM_TITLE_ICON_EMAIL); //wincom_open_help(mail_help, 4); mail_got_info(); //mail_init_str(20); //mail_clear_del_flag(); if(email_count<=100) OSD_SetObjListCount(ol, email_count); else OSD_SetObjListCount(ol, 100); if (email_count <= OSD_GetObjListCurPoint(ol)) { OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); } //CDCASTB_RequestMaskBuffer(); break; case EVN_POST_OPEN: MailDrawNum0(); wincom_scroll_textfield_resume(); break; case EVN_PRE_CLOSE: mail_exec_delete(); if(menu_stack_get(0)==((POBJECT_HEAD)&g_win_mainmenu)) *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; else { wincom_close_title(); wincom_close_help(); *((UINT32*)param2) &= C_CLOSE_CLRBACK_FLG; } //CDCASTB_RequestUpdateBuffer(); wincom_scroll_textfield_pause(); break; case EVN_POST_CLOSE: break; case EVN_MSG_GOT: if( param1 == CTRL_MSG_SUBTYPE_STATUS_SCROLL_STRING) win_mail_scroll_string(); if(param1 == CTRL_MSG_SUBTYPE_STATUS_SIGNAL) ret = PROC_LOOP; default: break; } return ret; }
/************************************************************** *CAS Main message process entry. *msg_code has different meaning for different msg_type, check the *tf_catask.c for detailed info. **************************************************************/ PRESULT ap_cas_smc_info_proc( UINT32 msg_type, UINT32 msg_code) { cas_sc_t card_info; UINT16 cur_chan = 0; UINT8 scramble = 0; P_NODE p_node; POBJECT_HEAD p_top_menu = NULL,p_newtop_menu=NULL; PRESULT ret; p_top_menu = menu_stack_get_top(); if(p_top_menu == (POBJECT_HEAD)&g_win_cti_cardinfo || p_top_menu == (POBJECT_HEAD)&g_win_cti_set_maturity || p_top_menu == (POBJECT_HEAD)&g_win_cti_PPID || p_top_menu == (POBJECT_HEAD)&g_win_cti_PPID_info || p_top_menu == (POBJECT_HEAD)&g_win_cti_pin) { ret = OSD_ObjProc(p_top_menu, (MSG_TYPE_MSG << 16) | msg_type, msg_code, 0); while( ret == PROC_LEAVE) { menu_stack_pop(); p_newtop_menu = menu_stack_get_top(); if(NULL != p_newtop_menu) { ret = OSD_ObjOpen(p_newtop_menu, MENU_OPEN_TYPE_STACK) ; } } } cas_get_sc_info_req(&card_info); sys_data_get_cur_group_channel(&cur_chan, sys_data_get_cur_chan_mode()); get_prog_at(cur_chan, &p_node); //get_prog_scramble_type(p_node.prog_number, &scramble); if(card_info.sc_status==0) //smart card ok { //win_popup_msg("Smartcart is in!",NULL,0); } else if(card_info.sc_status==1) //smart card out { if(GetScrollStopFlag()!=SCROLL_STOP) { SetScrollStopFlag(SCROLL_STOP); } cas_sub_clear(); subtitle_clear_all_message(); //clean subtitle msg buffer when the card is out. ap_cas_fingerprint_proc(3);// to clear finger print buf and area if( p_top_menu == (POBJECT_HEAD)&g_win_ippv_popup) { OSD_ClearObject((POBJECT_HEAD)&g_win_ippv_popup, C_UPDATE_ALL); menu_stack_pop(); } //win_popup_msg("Smartcart is out!",NULL,0); } else if(card_info.sc_status==2||card_info.sc_status==3) { //win_popup_msg(NULL,NULL,RS_CTI_READ_SMC_ERROR); } }
static PRESULT sys_backup_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); OSD_RECT rect; UINT32 posi; switch(event) { case EVN_PRE_OPEN: #ifdef PREVIEW_SUBMENU //-a by wangyang if(param2==MENU_OPEN_TYPE_OTHER) { if(focus_flag==1) { POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj); focusObj_id =focusObj->bID; OSD_SetContainerFocus((CONTAINER*)pObj,0); focus_flag =0; } } else { OSD_SetContainerFocus((CONTAINER*)pObj,focusObj_id); focus_flag =1; } #endif #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif // win_usb_backup_tmr_loop =0; wincom_open_subtitle(pObj, RS_SYSTEM_BACKUP, 0); wincom_open_help(NULL, NULL, HELP_TYPE_RS232); OSD_SetProgressBarPos(&sys_backup_bar_progress,(INT16)0); OSD_SetTextFieldContent(&sys_backup_txt_progress, STRING_NUM_PERCENT, (UINT32)0); ret = win_sys_backup_init(); break; case EVN_POST_OPEN: system_state = SYS_STATE_USB_UPG; wincom_open_commen_help(pObj);//-a by wangyang win_sys_backup_msg_clear(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: system_state = SYS_STATE_NORMAL; //wincom_close_title(); wincom_close_subtitle(); wincom_close_help(); win_progress_bar_draw_bmp_close(); OSD_ClearScreen(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif //epg_init(ap_send_epg_PF_update, ap_send_epg_sch_update, ap_send_epg_detail_update); //OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_EXIT) { ret = PROC_LEAVE; } #ifdef PREVIEW_SUBMENU //-a by wangyang if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER) { system_state = SYS_STATE_NORMAL; wincom_close_subtitle(); OSD_ClearScreen(); wincom_close_help(); OSD_ClearObject( pObj, C_UPDATE_ALL); OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL); OSD_ObjOpen((POBJECT_HEAD)&win_rs232upg_con, MENU_OPEN_TYPE_OTHER ); ret = PROC_LEAVE; } #endif if (param1 == CTRL_MSG_SUBTYPE_CMD_TIMEDISPLAYUPDATE ) { /*if(start_backup==1) { win_usb_backup_tmr_loop++; posi = win_usb_backup_tmr_loop % PROGRESS_BAR_ICON_CNT; OSD_SetRect(&rect, BAR_TXT_L, BAR_TXT_T+BAR_TXT_H+4, 80, 80); win_progress_bar_draw_bmp(&rect,progress_bar_ids[posi]); } else win_progress_bar_draw_bmp_close();*/ } break; default: break; } return ret; }
void win_progress_bar_draw_bmp_close(void) { OSD_ClearObject( (POBJECT_HEAD)&progress_bar_bmp, C_UPDATE_ALL); }
static PRESULT find_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT8 bID; UINT32 pos0; switch(event) { case EVN_PRE_OPEN: set_color_style(); api_inc_wnd_count(); if(!edit_keyboard_flag)//when flag is TRUE,it is for edit use { name_valid_func = NULL; MEMSET(input_name_str,0,sizeof(input_name_str)); win_find_prog_num = 0; win_keyboard_set_title(RS_HELP_FIND); } find_init_keys(); find_set_key_display(); break; case EVN_POST_OPEN: draw_caps_colbtn_ext(COLBTN_L, COLBTN_T, 1,IM_EPG_COLORBUTTON_YELLOW); draw_del_colbtn_ext(COLBTN_L + 120, COLBTN_T, 1,IM_EPG_COLORBUTTON_RED); draw_ok_colbtn_ext(COLBTN_L + 240, COLBTN_T, 1,IM_EPG_COLORBUTTON_BLUE); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ if(edit_keyboard_flag) { *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; } if(!edit_keyboard_flag) { if(win_find_prog_num > 0) { OSD_ClearObject((POBJECT_HEAD)&g_win_find, C_UPDATE_ALL); menu_stack_pop(); menu_stack_push((POBJECT_HEAD)&g_win_com_lst); ret = PROC_LOOP; } } break; case EVN_POST_CLOSE: api_dec_wnd_count(); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_CANCEL) { if((win_find_prog_num > 0) && (!edit_keyboard_flag)) { OSD_ClearObject((POBJECT_HEAD)&g_win_com_lst, C_UPDATE_ALL); win_find_prog_num = 0; } check_ok = FALSE; ret = PROC_LEAVE; } else if(unact >= VACT_NUM_0 && unact<= VACT_NUM_9) { for(pos0=0;pos0<KEY_CNT;pos0++) { if(key_chars[pos0] == '0') break; } bID = pos0+1 + unact - VACT_NUM_0; OSD_ChangeFocus( pObj,bID,C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); ap_send_msg(CTRL_MSG_SUBTYPE_KEY_UI, V_KEY_ENTER, TRUE); ret = PROC_LOOP; } } return ret; }
static PRESULT map_city_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; INT32 news_list_num = 0; UINT8 focusID = OSD_GetFocusID( pObj); char strTmp[30]; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif bMapDownloading = FALSE; map_city_list_load(); break; case EVN_POST_OPEN: wincom_open_subtitle(pObj,RS_MAP,0); //wincom_open_commen_help(pObj); wincom_open_help_OK_list_small(pObj, map_city_helpinfo, HELP_CNT); memset(search_string, 0x0, sizeof(search_string)); break; case EVN_PRE_CLOSE: map_download_abort(s_mapdl_handle); s_mapdl_handle = 0; sys_data_save(1); break; case EVN_POST_CLOSE: SetReplayHintState(0); ShowReplayHintOSDOnOff(0); wincom_close_subtitle(); wincom_close_help(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif break; case EVN_MSG_GOT: if (param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH) { bMapDownloading = FALSE; s_mapdl_handle = 0; if ((int)param2 >= 0) { win_compopup_smsg_restoreback(); wincom_close_subtitle(); wincom_close_help(); OSD_ClearObject((POBJECT_HEAD)&g_win_map_display,0); if(OSD_ObjOpen(&g_win_map_display, param2) != PROC_LEAVE) { menu_stack_push(&g_win_map_display); } } else { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_ERROR),strTmp); win_compopup_set_msg(NULL,NULL,RS_ERROR); win_compopup_open_ext(&back_saved); ret = PROC_LOOP; } } break; default: break; } return ret; }
static PRESULT satsrch_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; MULTISEL* msel; UINT16 title_id,sat_idx,sat_cnt; OSD_RECT rect; POBJECT_HEAD lastitem; SYSTEM_DATA* sys_data = sys_data_get(); UINT16 i; UINT8 flag; S_NODE s_node; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif sat_idx = 0; if(!single_multi_srch_flag) { if(sys_data_get_cur_satidx() == (UINT16)(~0)) sat_idx = win_load_default_satidx(); else sat_idx = sys_data_get_cur_satidx(); } recreate_sat_view(VIEW_ALL, 0); #if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY)) for(i=0; i<get_sat_num(VIEW_ALL); i++) { get_sat_at((UINT16)i,VIEW_ALL,&s_node); flag = s_node.tuner1_valid | s_node.tuner2_valid; if(s_node.selected_flag != flag) { s_node.selected_flag = flag; modify_sat(s_node.sat_id, &s_node); } } #endif msel = satsrch_sels[SAT_ID - 1]; sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); OSD_SetMultiselCount(msel, sat_cnt); /*if(sat_idx >= sat_cnt)//albert.li del 2011.7.6 { sat_idx = 0; } OSD_SetMultiselSel(msel,sat_idx);*/ sat_idx=get_sat_idx_in_selected_sats(sat_cnt);//albert.li add 2011.7.6 OSD_SetMultiselSel(msel,sat_idx); if(single_multi_srch_flag) title_id = RS_INSTALLATION_MULTI_SEARCH; else title_id = RS_INSTALLATION_SINGLE_SEARCH; //wincom_open_subtitle(pObj,title_id,0); wincom_open_subtitle_ex(pObj,title_id,0,-15,0,-10);//albert.li add 2011.6.21 /*lastitem = (POBJECT_HEAD)&satsrch_item7; if(single_multi_srch_flag) OSD_SetObjpNext(lastitem, &satsrch_multisats_back); //OSD_SetObjpNext(lastitem, NULL); else OSD_SetObjpNext(lastitem, NULL);*/ win_satsrch_set_nitactive(FALSE); set_container_active(&satsrch_item6, C_ATTR_INACTIVE); get_sat_at(sat_idx,SET_SELECTED,&s_node); if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF) { #ifdef SUPPORT_SELECT_SAME_SAT OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0)? RS_LNB1 : RS_LNB2)); #else OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); #endif } else { OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, RS_LNB1); } OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL); #ifndef SUPPORT_TWO_TUNER remove_menu_item(&g_win_sat_srchset,(POBJECT_HEAD)&satsrch_item6,(CON_H + CON_GAP)); //guop add #endif break; case EVN_POST_OPEN: //wincom_open_help(pObj,search_set_helpinfo, HELP_CNT); wincom_open_commen_help(pObj); if(single_multi_srch_flag == 1) { OSD_DrawObject((POBJECT_HEAD)&satsrch_split,C_UPDATE_ALL); } sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); if(sat_cnt <=(SELSAT_ROW_CNT*2)) win_satsrch_set_fix_drawselectsats(); else { start_scroll_sat_id=0; //api_stop_timer(&sat_display_scroll); sat_display_scroll = api_start_timer("SATDISP",500,(OSAL_T_TIMER_FUNC_PTR)sat_search_scroll_disp_handler); } break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: api_stop_timer(&sat_display_scroll); wincom_close_subtitle(); OSD_ClearObject((POBJECT_HEAD)&g_win_sat_srchset,C_UPDATE_ALL);//albert.li add //OSD_TrackObject( (POBJECT_HEAD) &g_win_submenu/*g_win_mainmenu*/, C_UPDATE_ALL); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_SAT_SCROLL_DISP) { start_scroll_sat_id=win_satsrch_set_scroll_drawselectsats(start_scroll_sat_id); if(sat_display_scroll!=OSAL_INVALID_ID) { api_stop_timer(&sat_display_scroll); sat_display_scroll = api_start_timer("SATDISP",500,(OSAL_T_TIMER_FUNC_PTR)sat_search_scroll_disp_handler); } } break; } return ret; }