?? ir_drv.c
字號:
//清除左部的'選定框';
vod_osd_clear_checkbox( 0 );
//畫右部選定框
vod_logo_draw_checkbox(1);
}
else{
if(vod_current_button_right == VOD_BUTTON_3||
vod_current_button_right == VOD_BUTTON_8)
return 0;
vod_current_button_right ++;
//畫右部選定框
vod_logo_draw_checkbox(1);
}
return 0;
}
//按鍵'OK'
if(rx == VOD_IRC_CONFIRM){
if(vod_current_button_right == VOD_BUTTON_NULL){
vod_current_button_right = VOD_BUTTON_1;
//清除左部的'選定框';
vod_osd_clear_checkbox( 0 );
//畫右部選定框
vod_logo_draw_checkbox(1);
}
else if(vod_current_button_right <= VOD_BUTTON_6){
vod_logo_12_confirm();
}
//上一頁
else if(vod_current_button_right == VOD_BUTTON_7){
if(vod_current_page<=0)
return 0;
vod_current_page --;
//畫6張小BMP圖
vod_logo_12_draw_BMP();
}
//下一頁
else if(vod_current_button_right == VOD_BUTTON_8){
if(vod_current_page>=1)
return 0;
vod_current_page ++;
//畫6張小BMP圖
vod_logo_12_draw_BMP();
}
}
return 0;
}
/***************************************************
在vod_logo_12中畫framebuf圖
******************************************************/
void vod_logo_12_draw_BMP(){
if(vod_current_button_left > VOD_BUTTON_2)
return;
//畫framebuf圖
//第幾類別的圖像
BYTE * framebufBMP_type_data_start_temp = (BYTE *)(vod_framebufBMP_type_bufstart + VOD_SERVER_HEADER+(vod_framebufBMP_type_header+vod_current_button_left+1)->type_bufstart ) ;
vod_framebufBMP_header = (vod_framebufBMP_header_t *)(framebufBMP_type_data_start_temp+0x04);
coordinate start = ( vod_zuobiao_header +vod_current_button_left_counts )->start;
//coordinate start ;
//start.x = 160;
//start.y = 80+52;
dimension dim = vod_framebufBMP_header->dim;
//第幾頁的第一張圖像
vod_framebufBMP_datastart = (BYTE *)( framebufBMP_type_data_start_temp + (vod_framebufBMP_header+6*vod_current_page)->bufstart );
vod_framebuf_draw_counts( vod_framebufBMP_datastart, start , dim,6);
}
/***************************************************
在vod_logo_12中等待確定
******************************************************/
BYTE vod_logo_12_confirm(){
if(vod_current_button_left > VOD_BUTTON_2)
return 0;
vod_order_amount = 1;
//清除右部的'選定框';
vod_osd_clear_checkbox( 1 );
//畫產品的數量選定框
vod_osd_order_amount();
vod_current_logo = VOD_LOGO_121;
return 0;
}
/***************************************************
在vod_logo_12中等待確定
******************************************************/
BYTE vod_logo_121(UINT16 rx){
//按鍵‘上’
if(rx == VOD_IRC_UP){
if(vod_order_amount<9){
vod_order_amount ++;
vod_osd_change_order_amount();
}
}
//按鍵‘下’
if(rx == VOD_IRC_DOWN){
if(vod_order_amount>1){
vod_order_amount --;
vod_osd_change_order_amount();
}
}
//返回
if(rx == VOD_IRC_RETURN){
//清除產品的數量選定框
vod_osd_clear_order_amount();
vod_current_logo = VOD_LOGO_12;
//畫右部選定框
vod_osd_draw_checkbox( 1 );
return 0;
}
//確定
if(rx == VOD_IRC_CONFIRM){
//清除產品的數量選定框
vod_osd_clear_order_amount();
vod_current_logo = VOD_LOGO_12;
//畫右部選定框
vod_osd_draw_checkbox( 1 );
return 0;
}
return 0;
}
#endif
/*************************************************************
精彩電影logo13
**************************************************************/
//BYTE vod_logo_13(UINT16 rx){
BYTE vod_logo_11(UINT16 rx){
//返回
if(rx == VOD_IRC_RETURN){
//返回上一頁
if(vod_current_button_right == VOD_BUTTON_NULL)
vod_switch_logo(VOD_LOGO_1);
else{
if(vod_current_button_right <=VOD_BUTTON_6){
//字符串不被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
//先讓字符串沒選中,再復位右鍵
vod_current_button_right = VOD_BUTTON_NULL;
//畫左部選定框
vod_osd_draw_checkbox( 0 );
}
else{
//清除右部選定框
vod_osd_clear_checkbox( 1 );
vod_current_button_right = VOD_BUTTON_NULL;
//畫左部選定框
vod_osd_draw_checkbox( 0 );
}
}
return 0;
}
//按鍵‘上’
if(rx == VOD_IRC_UP){
if(vod_current_button_right == VOD_BUTTON_NULL){
if(vod_current_button_left <= VOD_BUTTON_1)
return 0;
vod_current_button_left --;
//頁數清0
vod_current_page = 0;
//畫左部選定框
vod_logo_draw_checkbox(0);
//列出6條OSD字幕信息
//vod_logo_11_search_song_byGxm("陳楚生");
vod_logo_search_program_byType(vod_current_button_left);
}
else{
if(vod_current_button_right <= VOD_BUTTON_1)
return 0;
if(vod_current_button_right <= VOD_BUTTON_6){
//字符串不被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_current_button_right --;
//字符串被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
return 0;
}
if (vod_current_button_right == VOD_BUTTON_7){
//是否不滿一頁
if((vod_current_page+1)*6 > vod_program_search_result[0])
vod_current_button_right = (vod_program_search_result[0]-1)%6;
else
vod_current_button_right --;
vod_osd_clear_checkbox(1);
//字符串被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
return 0;
}
vod_current_button_right --;
//畫右部選定框
vod_logo_draw_checkbox(1);
}
return 0;
}
//按鍵‘下’
if(rx == VOD_IRC_DOWN){
if(vod_current_button_right == VOD_BUTTON_NULL){
if(vod_current_button_left >= VOD_BUTTON_9)
return 0;
vod_current_button_left ++;
//頁數清0
vod_current_page = 0;
//畫左部選定框
vod_logo_draw_checkbox(0);
//列出6條OSD字幕信息
//vod_logo_11_search_song_byGxm("張學友");
vod_logo_search_program_byType(vod_current_button_left);
}
else{
if(vod_current_button_right <=VOD_BUTTON_5){
//字符串不被選中
vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
//是否沒有下一項了?
if(vod_current_page*6+vod_current_button_right+1 >= vod_program_search_result[0]){
vod_current_button_right = VOD_BUTTON_7;
//畫右部選定框
vod_logo_draw_checkbox2(1);
return 0;
}
vod_current_button_right ++;
//字符串被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
return 0;
}
if(vod_current_button_right ==VOD_BUTTON_6){
//字符串不被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_current_button_right ++;
//畫右部選定框
vod_logo_draw_checkbox2(1);
return 0;
}
if(vod_current_button_right <=VOD_BUTTON_8){
vod_current_button_right ++;
//畫右部選定框
vod_logo_draw_checkbox(1);
}
}
return 0;
}
//按鍵‘左’
if(rx == VOD_IRC_LEFT){
if(vod_current_button_right != VOD_BUTTON_NULL){
if(vod_current_button_right <=VOD_BUTTON_6){
//字符串不被選中
//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
//先讓字符串沒選中,再復位右鍵
vod_current_button_right = VOD_BUTTON_NULL;
//畫左部選定框
vod_osd_draw_checkbox( 0 );
}
else if(vod_current_button_right >=VOD_BUTTON_8){
vod_current_button_right --;
//畫右部選定框
vod_logo_draw_checkbox(1);
}
}
return 0;
}
//按鍵‘右’
if(rx == VOD_IRC_RIGHT){
if(vod_current_button_right == VOD_BUTTON_NULL){
//如果記錄為空
if(vod_program_search_result[0] == 0)
return 0;
//如果記錄不為空
vod_current_button_right = VOD_BUTTON_1;
//清除左部的'選定框';
vod_osd_clear_checkbox( 0 );
//字符串被選中
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
}
else if(vod_current_button_right == VOD_BUTTON_7||
vod_current_button_right == VOD_BUTTON_8){
vod_current_button_right ++;
//畫右部選定框
vod_logo_draw_checkbox(1);
}
return 0;
}
//按鍵'OK'
if(rx == VOD_IRC_CONFIRM){
//選擇某一類型的電影
if(vod_current_button_right == VOD_BUTTON_NULL){
//如果記錄為空
if(vod_program_search_result[0] == 0)
return 0;
//如果記錄不為空
vod_current_button_right = VOD_BUTTON_1;
//清除左部的'選定框';
vod_osd_clear_checkbox( 0 );
//字符串被選中
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
return 0;
}
//電影簡介信息
if(vod_current_button_right <= VOD_BUTTON_6){
if(vod_logo_11_film_info())
return 1;
return 0;
}
//上一頁
if(vod_current_button_right == VOD_BUTTON_8){
if(vod_current_page<=0)
return 0;
vod_current_page --;
//列出6條字符串記錄
//vod_logo_11_draw_string_list();
vod_logo_draw_string_list();
return 0;
}
//下一頁
if(vod_current_button_right == VOD_BUTTON_9){
//是否下一頁沒有記錄可以顯示了?
if((vod_current_page+1)*6 >= vod_program_search_result[0])
return 0;
vod_current_page ++;
//列出6條字符串記錄
//vod_logo_11_draw_string_list();
vod_logo_draw_string_list();
return 0;
}
//返回類型選擇
if(vod_current_button_right == VOD_BUTTON_7){
vod_current_button_right = VOD_BUTTON_NULL;
//清除右部的'選定框';
vod_osd_clear_checkbox( 1 );
//畫左部選定框
vod_osd_draw_checkbox( 0 );
}
return 0;
}
//獲得數字按鍵
if(vod_logo_get_button_digital(rx)){
//清除右部選定框
vod_osd_clear_checkbox( 1 );
vod_current_button_right = VOD_BUTTON_NULL;
//頁數清0
vod_current_page = 0;
//畫左部選定框
vod_logo_draw_checkbox(0);
//列出6條OSD字幕信息
vod_logo_search_program_byType(vod_current_button_left);
return 0;
}
//上頁
if(rx == VOD_IRC_PAGE_UP){
if(vod_current_page<=0)
return 0;
vod_current_page --;
//列出6條字符串記錄
vod_logo_draw_string_list();
//如果選定了字符串
if(vod_current_button_right <= VOD_BUTTON_6){
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
}
return 0;
}
//下頁
if(rx == VOD_IRC_PAGE_DOWN){
//是否下一頁沒有記錄可以顯示了?
if((vod_current_page+1)*6 >= vod_program_search_result[0])
return 0;
vod_current_page ++;
//列出6條字符串記錄
vod_logo_draw_string_list();
//如果選定了字符串
if(vod_current_button_right <= VOD_BUTTON_6){
//如果下一頁沒有這一項
if(vod_current_page*6 + vod_current_button_right +1 > vod_program_search_result[0])
vod_current_button_right = (vod_program_search_result[0] -1) %6;
vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
}
return 0;
}
return 0;
}
/*
void vod_logo_11_search_song_byGxm(char * gxm){
UINT16 gqbh =0;
char * gm = NULL;
char mtv =0;
char yb = 0;
char gl = 0;
char * py = NULL;
char zs =0;
UINT16 gxbh = 0 ;
//char * gxm = "劉德華";
char ycyg =0;
char yl =0;
UINT16 djs =0;
UINT16 jg =0;
vod_song_search(gqbh, gm, mtv, yb, gl, py, zs, gxbh, gxm, ycyg, yl, djs, jg);
vod_logo_11_draw_string_list();
}
void vod_logo_11_draw_string_list(){
coordinate start;
UINT16 area_width;
font_palette palette ;
palette.background_color=0;
palette.font_color = VOD_FONTCOLOR_NOT_SEL;
char only_font_color = 1;
const char region_1 = 1;
const UINT16 region_0_height = 52;
// 清空之前畫的列表
vod_logo_clear_string_list();
UINT16 i;
for (i = 0 ; i < 6 && vod_current_page*6+i< vod_song_search_result[0]; i++){
//注意:加1,因為第1個數是表示搜索結果條數
char * song_name = (vod_song_header+vod_song_search_result[vod_current_page*6+i+1])->gm;
start = ( vod_zuobiao_header +vod_current_button_left_counts+i)->start;
start.y -= region_0_height;
area_width = (( vod_zuobiao_header +vod_current_button_left_counts+i)->dim).x_length;
vod_osd_draw_string_center(song_name, start, area_width,&palette, region_1, only_font_color);
}
//printf_w("###### vod_song_search_result[0]=%d\n", vod_song_search_result[0]);
}
void vod_logo_11_draw_string_byColor(char font_color){
coordinate start;
UINT16 area_width;
font_palette palette ;
palette.background_color=0;
palette.font_color=font_color;
char only_font_color = 0;
const char region_1 = 1;
const UINT16 region_0_height = 52;
//注意:加1,因為第1個數是表示搜索結果條數
char * song_name = (vod_song_header+vod_song_search_result[vod_current_page*6+vod_current_button_right+1])->gm;
start = ( vod_zuobiao_header +vod_current_button_left_counts+vod_current_button_right)->start;
start.y -= region_0_height; //減去0區域的高度
area_width = (( vod_zuobiao_header +vod_current_button_left_counts+vod_current_button_right)->dim).x_length;
vod_osd_draw_string_center(song_name, start, area_width,&palette, region_1, only_font_color);
}
*/
/***************************************************
按分類搜索
******************************************************/
void vod
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -