📄 ap_cas_menu.c
字号:
/****************************************************************************
*
* ALi
*
* File: ap_cas_menu.c
*
* Description: Strut of Provaider's
*
* History:
* Date Author Version Comment
* ==== ====== ======= =======
*
*
****************************************************************************/
#include <api/libc/string.h> // Lib C for string
#include "ap_root.h" // Mpeg Sat Menu
#include "cas_menu.h" // Current highlight sat pos
extern UINT16 * win_sat_lst_txt_addr[MAX_SAT_NUM];
extern UINT16 win_sat_lst_txt[MAX_SAT_NUM][15 + MAX_SATELLITE_NAME_LENGTH + 1];
struct CAS_MENU_COMM info_cas_menu;
struct WinReturnInfo ret_cas_menu = {0, 0, &info_cas_menu, 0, 0};
void ap_cas_menu_get_default(BOOL flag)
{
UINT8 i;
UINT8 temp[40];
info_cas_menu.total_cnt=CAS_OSD_GetCASCount() ;\
info_cas_menu.cur_cas_pos=0;
MEMSET(win_sat_lst_txt, 0, MAX_SAT_NUM * sizeof(win_sat_lst_txt[1]));
for(i = 0; i < info_cas_menu.total_cnt; i++)
{
ComAscStr2Uni(CAS_OSD_GetCASName(i), win_sat_lst_txt[i]);
win_sat_lst_txt_addr[i] = win_sat_lst_txt[i];
}
}
BOOL ap_cas_menu_init(ControlMsg_t* msg, struct winhandle_t* p_win_handle)
{
ap_cas_menu_get_default(TRUE);
ap_cas_menu_hdl.win_handle->display(0, NULL);
return TRUE;
}
BYTE ap_cas_menu_proc(UINT32 msg_type, UINT32 msg_sub_type, UINT32 msg_code)
{
UINT8 result = PROC_LOOP;
if(CTL_MSG_TYPE_CMD == msg_type)
{
if(CTRL_MSG_SUBTYPE_CMD_EXIT_ROOT != msg_sub_type)
return result ;
}
ret_cas_menu.type = WIN_DATA_NOCHANGE;
result = ap_cas_menu_hdl.win_handle->proc(msg_type, msg_sub_type, msg_code,&ret_cas_menu);
if(PROC_LEAVE == result)
{
ap_cas_menu_hdl.win_handle->update(0, WIN_UPDATE_CLOSE);
}
else
{
ap_cas_menu_hdl.win_handle->update(&ret_cas_menu, WIN_UPDATE);
}
return result;
}
struct ap_handle_t ap_cas_menu_hdl =
{
ap_cas_menu_init,
ap_cas_menu_proc,
&win_cas_menu_handle
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -