コード例 #1
0
SIGNAL_HANDLER int app_search_menu_box_keypress(const char* widgetname, void *usrdata)
{
	GUI_Event *event = NULL;
	int i =0;
	event = (GUI_Event *)usrdata;
	switch(event->type)
	{
		case GUI_MOUSEBUTTONDOWN:
			break;

		case GUI_KEYDOWN:
			switch(event->key.sym)
			{
				case KEY_UP:
					GUI_GetProperty("win_search_menu_box", "select", &i);
					i--;
					if (i <0)
					{ 
						i = 3;
					}
					GUI_SetProperty("win_search_menu_box", "select", &i);
					return EVENT_TRANSFER_STOP;
				case KEY_DOWN:
					GUI_GetProperty("win_search_menu_box", "select", &i);
					i++;
					if (i > 3)
					{
						i = 0;
					} 
					GUI_SetProperty("win_search_menu_box", "select", &i);
					return EVENT_TRANSFER_STOP;
				case KEY_OK:
					GUI_GetProperty("win_search_menu_box", "select", &i);
					switch(i)
					{ 
						case 0:
							app_win_auto_search();
							break;
						case 1:
							GUI_CreateDialog("win_manual_search");
							break;
						case 2:
							GUI_CreateDialog("win_all_search");
							break;
						case 3:
							GUI_CreateDialog("win_main_frequecy_set");
							break;

					}
					return EVENT_TRANSFER_KEEPON;
				default:
					return EVENT_TRANSFER_KEEPON;
			}

		default:
			return EVENT_TRANSFER_KEEPON;
	}
	return EVENT_TRANSFER_KEEPON;
} 
コード例 #2
0
int app_win_auto_search(void)
{
	uint32_t symbol_rate = 0;
	uint32_t qam = 0;
	uint32_t fre = 0;
	uint32_t fre1 = 0;
	symbol_rate = app_flash_get_config_center_freq_symbol_rate();
	qam = app_flash_get_config_center_freq_qam();
	fre = app_flash_get_config_center_freq();
	fre1 = app_flash_get_config_manual_search_freq(); 

#ifdef DVB_CA_TYPE_DVB_FLAG
	GUI_CreateDialog("win_search_result");
	GUI_SetInterface("flush", NULL);
#ifdef CUST_TAOYUAN
	app_win_hunan_taoyuan_search();		
#endif
#ifdef CUST_LINLI
	app_win_hunan_linli_search();		
#endif
#ifdef CUST_TAIKANG
	app_win_hunan_taikang_search();		
#endif
#ifdef CUST_JINGANGSHAN
	app_win_hunan_taikang_search();		
#endif
#ifdef CUST_SHANGSHUI
	app_win_shangshui_search();		
#endif

#else
	GxFrontend_StopMonitor(0);
	if (0 == app_search_lock_tp(fre, symbol_rate,
				INVERSION_OFF, qam,1000))
	{
		GUI_CreateDialog("win_search_result");
		GUI_SetInterface("flush", NULL);
		app_search_scan_nit_mode();
	}
	else
	{
		if (0 == app_search_lock_tp(fre1, symbol_rate,
					INVERSION_OFF, qam,100))
		{
			GUI_CreateDialog("win_search_result");
			GUI_SetInterface("flush", NULL);
			app_search_scan_nit_mode();
		}
		else
		{	
			GxFrontend_StartMonitor(0);

			app_popmsg(POP_DIALOG_X_START, POP_DIALOG_Y_START,"Lock Failed",POPMSG_TYPE_OK);
		}
		return EVENT_TRANSFER_STOP;
	}
#endif
	return EVENT_TRANSFER_KEEPON;	
}
コード例 #3
0
SIGNAL_HANDLER  int app_factory_menu_dplay_keypress(const char* widgetname, void *usrdata)
{

	GUI_Event *event = NULL;
	event = (GUI_Event *)usrdata;
	if(event->type == GUI_KEYDOWN)
	{	
		switch(event->key.sym)
		{
			case KEY_GREEN:
				GUI_EndDialog("win_factory_menu_dplay");
				GUI_CreateDialog("win_factory_menu");
				return EVENT_TRANSFER_STOP;	
			case KEY_RECALL: 
			case KEY_EXIT:
				GUI_EndDialog("win_factory_menu_dplay");
				GUI_CreateDialog("win_factory_menu");
				return EVENT_TRANSFER_STOP;	
			case KEY_YELLOW:
			case KEY_MENU:
				GUI_EndDialog("win_factory_menu_dplay");
				GUI_CreateDialog("win_factory_menu_port");
				return EVENT_TRANSFER_STOP;	
			case KEY_LEFT:
			case KEY_RIGHT:
				key_lr(event->key.sym);
				return EVENT_TRANSFER_STOP;

			case KEY_UP:
			case KEY_CHANNEL_UP:
				//gApp_lock_right = 0;
				pos = app_play_by_direction(-1);	
				factory_update_cur_program_info();
				app_play_reset_play_timer(PLAY_TIMER_DURATION);

				return EVENT_TRANSFER_STOP;	
				
			case KEY_DOWN:
			case KEY_CHANNEL_DOWN:
				//gApp_lock_right = 0;
				pos = app_play_by_direction(1);
				factory_update_cur_program_info();
				app_play_reset_play_timer(PLAY_TIMER_DURATION);

				return EVENT_TRANSFER_STOP;	
			case KEY_POWER:
				return EVENT_TRANSFER_KEEPON;	
			default:
				return EVENT_TRANSFER_KEEPON;	
		}
	}
	return EVENT_TRANSFER_KEEPON;
コード例 #4
0
SIGNAL_HANDLER int youtube_play_keypress(const char* widgetname, void *usrdata)
{
	int ret = EVENT_TRANSFER_KEEPON;
	GUI_Event *event = NULL;
	GxMsgProperty_PlayerStop player_stop;
	
	event = (GUI_Event *)usrdata;
	switch(event->type)
	{
		case GUI_SERVICE_MSG:
			youtube_play_service(widgetname, usrdata);
			break;

		case GUI_MOUSEBUTTONDOWN:
			break;

		case GUI_KEYDOWN:
			switch(event->key.sym)
			{
				case STBK_EXIT:
					app_send_msg(GXMSG_PLAYER_STOP, PLAYER_FOR_IPTV);
					//app_player_close(PLAYER_FOR_IPTV);
					GUI_EndDialog("wnd_youtube_play");
					return EVENT_TRANSFER_STOP;
				case KEY_MUTE:
            		youtube_mute_exec();
            		youtube_mute_draw();
                    return EVENT_TRANSFER_STOP;
				case KEY_VOLUME_DOWN_1:
				case STBK_LEFT:
					event->key.sym = APPK_VOLDOWN;
					GUI_CreateDialog("win_volume");
					GUI_SendEvent("win_volume", event);
					return EVENT_TRANSFER_STOP;

				case KEY_VOLUME_UP_1:
				case STBK_RIGHT:
					event->key.sym = APPK_VOLUP;
					GUI_CreateDialog("win_volume");
					GUI_SendEvent("win_volume", event);
					return EVENT_TRANSFER_STOP;
				default:
					youtube_play_show_sliderbar(6000);
					break;
			}
			break;
		default:
			break;
	}

	return ret;
}
コード例 #5
0
SIGNAL_HANDLER  int app_update_menu_box_keypress(const char* widgetname, void *usrdata)
{
	GUI_Event *event = NULL;
	event = (GUI_Event *)usrdata;
	int i = 0;

	if(event->type == GUI_KEYDOWN)
	{	
		switch(event->key.sym)
		{
		case KEY_OK:
			GUI_GetProperty("win_update_menu_box", "select", &i);
			switch(i)
			{
			case 0:	//ota 升级
				GUI_EndDialog("win_update_menu");
				GUI_CreateDialog("win_system_update");
				break;
			case 1:	//usb 升级
				GUI_EndDialog("win_update_menu");
				GUI_CreateDialog("win_update_manual");
				break;
			default:
				break;
			}
			return EVENT_TRANSFER_KEEPON;
		case KEY_UP:
			GUI_GetProperty("win_update_menu_box", "select", &i);
			i--;
			if (i <0)
			{
				i = 1;
			}
			GUI_SetProperty("win_update_menu_box", "select", &i);
			return EVENT_TRANSFER_STOP;
			break;
		case KEY_DOWN:
			GUI_GetProperty("win_update_menu_box", "select", &i);
			i++;
			if (i > 1)
			{
				i = 0;
			}
			GUI_SetProperty("win_update_menu_box", "select", &i);
			return EVENT_TRANSFER_STOP;
			break;
		default:
			return EVENT_TRANSFER_KEEPON;
		}
	}
	return EVENT_TRANSFER_KEEPON;
}
コード例 #6
0
int32_t app_gy_cas_gxmsg_ca_on_event_ippv_buy(GxMsgProperty0_OnEvent* event)
{
	gy_cas_ippv_buy_st* ippv_buy = NULL;
	char* focus_Window = (char*)GUI_GetFocusWindow();

	if (NULL == event)
		return 0;

	ippv_buy = (gy_cas_ippv_buy_st*)(event->buf);

	if (NULL == ippv_buy)
		return 0;
	if(ippv_buy->wStatus == TRUE && caippvbuy.wShowStatus == FALSE)
	{
		memcpy(&caippvbuy,ippv_buy,sizeof(gy_cas_ippv_buy_st));
		
		if ((NULL != focus_Window)&&(strcasecmp("win_full_screen", focus_Window) != 0))
		{
			GUI_EndDialog(focus_Window);
			
			GxCore_ThreadDelay(300);
			GUI_SetInterface("flush", NULL);
			GxCore_ThreadDelay(50);
		}

		GUI_CreateDialog("win_gy_cas_ippv_buy");	
	}
	else if (ippv_buy->wStatus == FALSE && caippvbuy.wShowStatus == TRUE)
	{
		GUI_EndDialog("win_gy_cas_ippv_buy");
	}
	return 1;
}
コード例 #7
0
ファイル: dialogs.c プロジェクト: nongxiaoming/STM32F4_Tx
void PAGE_ShowSafetyDialog()
{
    if (disable_safety) {
        return; // don't show safety dialog when calibrating
    }
    if (dialog) {
        u64 unsafe = PROTOCOL_CheckSafe();
        if (! unsafe) {
            GUI_RemoveObj(dialog);
            dialog = NULL;
            PROTOCOL_Init(0);
        } else {
            safety_string_cb(NULL, NULL);
            u32 crc = Crc(tempstring, strlen(tempstring));
            if (crc != dialogcrc) {
                GUI_Redraw(dialog);
                dialogcrc = crc;
            }
        }
    } else {
        tempstring[0] = 0;
        dialogcrc = 0;
        dialog = GUI_CreateDialog(&gui->dialog, 10 + DLG_XOFFSET, 42 + DLG_YOFFSET, 300, 188, _tr("Safety"), safety_string_cb, safety_ok_cb, dtOk, NULL);
    }
}
コード例 #8
0
popmsg_ret pop_rss_msg(char *context,int YesorNo)
{

	GUI_CreateDialog("wnd_rss_dialog");
	if(YesorNo)
		GUI_SetFocusWidget("wnd_button_yes");
	else
		GUI_SetFocusWidget("wnd_button_no");
	GUI_SetProperty("wnd_text", "string", (void*)context);
	app_msg_destroy(g_app_msg_self);
#if 0
	while(POPMSG_RET_NONE == popmsg_result)
	{
		GUI_Exec();
		GxCore_ThreadDelay(50);
	}
#endif
	while(POPMSG_RET_NONE == popmsg_result)
	{
	   GUI_Loop();
	   GxCore_ThreadDelay(50);
	}
	GUI_StartSchedule();
	GUI_EndDialog("wnd_rss_dialog");
	//GUI_Exec();
	GUI_SetInterface("flush",NULL);
	app_msg_init(g_app_msg_self);
	return popmsg_result;
}
コード例 #9
0
ファイル: main_layout.c プロジェクト: DeviationTX/deviation
void show_config()
{
    int count = 0;
    int row_idx = 0;
    long type;
    if (OBJ_IS_USED(&gui->dialog)) {
        u8 draw_mode = FullRedraw;
        GUI_RemoveObj((guiObject_t *)&gui->dialog);
        FullRedraw = draw_mode;
    }
    if(lp->selected_for_move >= 0) {
        type = ELEM_TYPE(pc->elem[lp->selected_for_move]);
        row_idx = elem_abs_to_rel(lp->selected_for_move);
        count = elem_get_count(type);
    }
    if (! count) {
        dialog_ok_cb(1, NULL);
        return;
    }
    int x = LAYDLG_X - (type == ELEM_TOGGLE ? 68/2 : 0);
    int width = LAYDLG_MIN_WIDTH + (type == ELEM_TOGGLE ? 64 : 0);
    GUI_CreateDialog(&gui->dialog,
         x, LAYDLG_Y,
         width, LAYDLG_HEIGHT,
         _tr("Page Config"), NULL, dialog_ok_cb, dtOk, "");

    GUI_CreateScrollable(&gui->scrollable,
         x + LAYDLG_SCROLLABLE_X, LAYDLG_Y + LAYDLG_SCROLLABLE_Y,
         width - 2 * LAYDLG_SCROLLABLE_X + 1,
         LAYDLG_SCROLLABLE_HEIGHT,
         LAYDLG_TEXT_HEIGHT, count, row_cb, NULL, NULL, (void *)type);
    GUI_SetSelected(GUI_ShowScrollableRowCol(&gui->scrollable, row_idx, 0));
}
コード例 #10
0
ファイル: dialogs.c プロジェクト: nongxiaoming/STM32F4_Tx
void PAGE_ShowResetPermTimerDialog(void *guiObject, void *data)
{
    (void)guiObject;
    if (dialog)
        return;
    dialogcrc = 0;
    dialog = GUI_CreateDialog(&gui->dialog, 10 + DLG_XOFFSET, 42 + DLG_YOFFSET, 300, 188, _tr("Reset Permanent Timer?"), reset_timer_string_cb, reset_permtimer_cb, dtOkCancel, data);
}
コード例 #11
0
ファイル: dialogs.c プロジェクト: F-D-R/deviation
void PAGE_ShowInvalidStandardMixerDialog(void *guiObj)
{
    if (dialog)
        return;
    dialog = GUI_CreateDialog(&gui->dialog, DIALOG2_X, DIALOG2_Y, DIALOG2_WIDTH, DIALOG2_HEIGHT, NULL,
            invalidstdmixer_string_cb,
            invalid_stdmixer_cb, dtOkCancel, guiObj);
}
コード例 #12
0
ファイル: dialogs.c プロジェクト: F-D-R/deviation
void PAGE_ShowResetPermTimerDialog(void *guiObject, void *data)
{
    (void)guiObject;
    if (dialog)
        return;
    dialog = GUI_CreateDialog(&gui->dialog, DIALOG2_X, DIALOG2_Y, DIALOG2_WIDTH, DIALOG2_HEIGHT,
                              NULL, reset_timer_string_cb, reset_permtimer_cb, dtOkCancel, data);
}
コード例 #13
0
ファイル: dialogs.c プロジェクト: PhracturedBlue/deviation
void PAGE_ShowWarning(const char *title, const char *str)
{
    (void)title;
    if (dialog)
        return;
    snprintf(dlg_string, sizeof(dlg_string), "%s", str);
    dialog = GUI_CreateDialog(&gui->dialog, DIALOG3_X, DIALOG3_Y,
                 DIALOG3_WIDTH, DIALOG3_HEIGHT, NULL, NULL, lowbatt_ok_cb, dtOk, dlg_string);
}
コード例 #14
0
ファイル: dialogs.c プロジェクト: nongxiaoming/STM32F4_Tx
void PAGE_ShowInvalidStandardMixerDialog(void *guiObj)
{
    (void)guiObj;
    if (dialog)
        return;
    dialog = GUI_CreateDialog(&gui->dialog, 10 + DLG_XOFFSET, 42 + DLG_YOFFSET, 300, 188,
            _tr("Standard Mixer"), invalidstdmixer_string_cb, invalid_stdmixer_cb, dtOkCancel,
            guiObj);
}
コード例 #15
0
ファイル: dialogs.c プロジェクト: F-D-R/deviation
void PAGE_ShowWarning(const char *title, const char *str)
{
    (void)title;
    if (dialog)
        return;
    if (str != tempstring)
        tempstring_cpy(str);
    dialog = GUI_CreateDialog(&gui->dialog, DIALOG3_X, DIALOG3_Y,
                 DIALOG3_WIDTH, DIALOG3_HEIGHT, NULL, NULL, lowbatt_ok_cb, dtOk, tempstring);
}
コード例 #16
0
ファイル: dialogs.c プロジェクト: nongxiaoming/STM32F4_Tx
void PAGE_ShowWarning(const char *title, const char *str)
{   
    if (dialog)
        return;
    if(str != tempstring)
        sprintf(tempstring, "%s", str);
    dialogcrc = 0;
    current_selected_obj = GUI_GetSelected();
    dialog = GUI_CreateDialog(&gui->dialog, 10 + DLG_XOFFSET, 42 + DLG_YOFFSET, 300, 188, title, NULL, lowbatt_ok_cb, dtOk, tempstring);
}
コード例 #17
0
SIGNAL_HANDLER int text_view_keypress(const char* widgetname, void *usrdata)
{
    GUI_Event *event = NULL;
    uint32_t value=1;

    if(NULL == usrdata) return EVENT_TRANSFER_STOP;

    event = (GUI_Event *)usrdata;
    switch(find_virtualkey_ex(event->key.scancode,event->key.sym))
    {
        case APPK_BACK:
            GUI_GetProperty(NOTEPAD, "cur_pos", &stop_line);
            //printf("########[%s]%d, stop_line = %d #########\n", __func__, __LINE__, stop_line);
            GUI_EndDialog("win_text_view");
            return EVENT_TRANSFER_STOP;

        case APPK_MENU:
            GUI_GetProperty(NOTEPAD, "cur_pos", &stop_line);
            //printf("########[%s]%d, stop_line = %d #########\n", __func__, __LINE__, stop_line);
            GUI_EndDialog("win_text_view");
            return EVENT_TRANSFER_STOP;

        case APPK_UP:
            GUI_SetProperty(NOTEPAD, "line_up", &text_roll_line_num);
            return EVENT_TRANSFER_STOP;

        case APPK_DOWN:
            GUI_SetProperty(NOTEPAD, "line_down", &text_roll_line_num);
            return EVENT_TRANSFER_STOP;

        case APPK_LEFT:
        case APPK_PAGE_UP:
            GUI_SetProperty(NOTEPAD, "page_up", &value);
            return EVENT_TRANSFER_STOP;

        case APPK_RIGHT:
        case APPK_PAGE_DOWN:
            GUI_SetProperty(NOTEPAD, "page_down", &value);
            return EVENT_TRANSFER_STOP;

        case APPK_OK:
            break;

        case APPK_SET:
            GUI_CreateDialog("win_text_set");
            return EVENT_TRANSFER_STOP;

        default:
            break;
    }


    return EVENT_TRANSFER_KEEPON;
}
コード例 #18
0
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	g_hInst = hInstance;

	// First, start networking.
	NETWORK_Construct( DEFAULT_STATS_PORT, false );

	main_SetupProtocols ( );

	// Create the dialog, which will call COLLECTOR_StartCollecting.
	GUI_CreateDialog( );

	return 0;
}
コード例 #19
0
ファイル: dialogs.c プロジェクト: nongxiaoming/STM32F4_Tx
void PAGE_ShowBindingDialog(u8 update)
{
    if (update && ! dialog)
        return;
    binding_string_cb(NULL, NULL);
    u32 crc = Crc(tempstring, strlen(tempstring));
    if (dialog && crc != dialogcrc) {
        GUI_Redraw(dialog);
    } else if(! dialog) {
        const char *title = Model.name[0] ? Model.name : _tr("Binding");
        dialog = GUI_CreateDialog(&gui->dialog, 10 + DLG_XOFFSET, 42 + DLG_YOFFSET, 300, 188, title, binding_string_cb, binding_ok_cb, dtOk, NULL);
    }
    dialogcrc = crc;
}
コード例 #20
0
ファイル: dialogs.c プロジェクト: F-D-R/deviation
void PAGE_ShowBindingDialog(u8 update)
{
    if (update && ! dialog)
        return;
    binding_string_cb(NULL, NULL);
    u32 crc = Crc(tempstring, strlen(tempstring));
    if (dialog && crc != dialogcrc) {
        GUI_Redraw(dialog);
    } else if(! dialog) {
        dialog = GUI_CreateDialog(&gui->dialog, DIALOG2_X, DIALOG2_Y,
                     DIALOG2_WIDTH, DIALOG2_HEIGHT, NULL, NULL, binding_ok_cb, dtOk, tempstring);
    }
    dialogcrc = crc;
}
コード例 #21
0
/*void system_pvr_partition_init(int *pvr_partition)
{
    if(NULL == pvr_partition)
        return;

    GxBus_ConfigGetInt(PVR_PARTITION_KEY, pvr_partition, PVR_PARTITION);
}*/
void app_create_disk_information_menu(void)
{

	partition_list = GxHotplugPartitionGet(HOTPLUG_TYPE_USB);

	if((NULL != partition_list) && (0 < partition_list->partition_num))
	{
		GUI_CreateDialog("win_disk_information");
	}
	else
	{
		app_popmsg(POP_DIALOG_X_START,POP_DIALOG_Y_START,"Insert the device please",POPMSG_TYPE_OK);
		return;
	}
	return ;
}
コード例 #22
0
popmsg_ret popmsg_timeout(const char *info_str, time_t sec, popmsg_ret default_ret, bool show_time, PopMsgExitCb exit_cb)
{
#define SEC_TO_MILLISEC (1000)

	uint32_t x = POP_MEDIA_X_START;
	uint32_t y = POP_MEDIA_Y_START;

	s_pop_timeout_result = MEDIA_POPMSG_RET_NONE;
	s_timeout_sec = sec;
	s_default_result = default_ret;
	s_show_time = show_time;
	s_exit_cb = exit_cb;

	if(s_time_str != NULL)
	{
		GxCore_Free(s_time_str);
		s_time_str = NULL;
	}
	
	GUI_CreateDialog(WIN_POPMSG_TIMEOUT);
	GUI_SetProperty(WIN_POPMSG_TIMEOUT, "move_window_x", &x);
	GUI_SetProperty(WIN_POPMSG_TIMEOUT, "move_window_y", &y);
	GUI_SetProperty(TEXT_POPMSG_TIMEOUT_INFO, "string", (void*)info_str);

	if(MEDIA_POPMSG_RET_NO == s_default_result)
	{
		GUI_SetFocusWidget(BUTTON_POPMSG_TIMEOUT_NO);
	}
	else
	{
		GUI_SetFocusWidget(BUTTON_POPMSG_TIMEOUT_YES);
	}

	if(s_timeout_sec > 0)
	{
		if(show_time == true)
		{
			s_time_str = app_time_to_hms_str(s_timeout_sec);
			GUI_SetProperty(TEXT_POPMSG_TIMEOUT_TIME, "string", (void*)s_time_str);
			s_popmsg_timer = create_timer(popmsg_timeout_cb, SEC_TO_MILLISEC,  NULL, TIMER_REPEAT);
		}
	}
	
	return s_pop_timeout_result;
}
コード例 #23
0
ファイル: main_layout.c プロジェクト: DeviationTX/deviation
static void add_dlg_cb(guiObject_t *obj, const void *data)
{
    (void)obj;
    (void)data;
    GUI_CreateDialog(&gui->dialog,
        ADD_DIALOG_X,
        ADD_DIALOG_Y,
        ADD_DIALOG_W,
        ADD_DIALOG_H,
        _tr("Page Config"), NULL, dialog_ok_cb, dtOk, "");
    GUI_CreateLabelBox(&gui->dlglbl[0],
        ADD_LBL_X,
        ADD_DIALOG_Y + 30,
        ADD_TS_X - ADD_LBL_X, 0,
        &LABEL_FONT, GUI_Localize, NULL, _tr_noop("Type"));
    GUI_CreateTextSelect(&gui->dlgts[0],
        ADD_TS_X,
        ADD_DIALOG_Y + 30,
        TEXTSELECT_128, NULL, newelem_cb, NULL);
    GUI_CreateButton(&gui->dlgbut[0],
        ADD_ADDBUT_X,
        ADD_DIALOG_Y + 30,
        BUTTON_64x16, add_dlgbut_str_cb, newelem_press_cb, (void *)1L);

    GUI_CreateLabelBox(&gui->dlglbl[1],
        ADD_LBL_X,
        ADD_DIALOG_Y + 60,
        ADD_BUT_X - ADD_LBL_X, 0,
        &LABEL_FONT, GUI_Localize, NULL, _tr_noop("Template"));
    GUI_CreateButton(&gui->dlgbut[1],
        ADD_BUT_X,
        ADD_DIALOG_Y + 60,
        BUTTON_96x16, add_dlgbut_str_cb, add_dlgbut_cb, (void *)0L);
    int y = ADD_DIALOG_Y + 90;
    for (long i = 0; i < NUM_QUICKPAGES; i++) {
        GUI_CreateLabelBox(&gui->dlglbl[i+2], ADD_LBL_X, y, ADD_MENU_X - ADD_LBL_X, 0, &LABEL_FONT, menulabel_cb, NULL, (void *)i);
        GUI_CreateTextSelect(&gui->dlgts[i+2], ADD_MENU_X, y, TEXTSELECT_224, NULL, menusel_cb, (void *)i);
        y += 24;
    }
    GUI_SetSelected((guiObject_t *)&gui->dlgbut[0]);
}
コード例 #24
0
uint8_t win_tr_cas_announce_show(void *data, int size)
{
	TR_CAS_ANNOUNCE_INFO_t *pTmpData = NULL;
	uint32_t x = 210;
	uint32_t y = 150;

	if (NULL == data)
	{
		return 1;
	}

	if (size == sizeof(TR_CAS_ANNOUNCE_INFO_t))
	{
		pTmpData = (TR_CAS_ANNOUNCE_INFO_t *)data;
		memset(&s_curAnnounceInfo, 0, sizeof(TR_CAS_ANNOUNCE_INFO_t));
		memcpy(&s_curAnnounceInfo, pTmpData, sizeof(TR_CAS_ANNOUNCE_INFO_t));
		s_bValidData = 1;
	}
	else
	{
		s_bValidData = 0;
		printf("[win_tr_cas_announce_show]invalid announce data size!!!\n");
		return 2;
	}

	/*wangjian modify on 20150327 for update announce display string.*/
	if (0 == s_bAnnounceShow)
	{
		GUI_CreateDialog("win_tr_cas_announce");
		GUI_SetProperty("win_tr_cas_announce", "move_window_x", &x);
		GUI_SetProperty("win_tr_cas_announce", "move_window_y", &y);
		s_bAnnounceShow = 1;
	}
	else
	{
		GUI_SetProperty("win_announce_head", "string", s_curAnnounceInfo.title);
		GUI_SetProperty("win_announce_content", "string", s_curAnnounceInfo.content);
	}
	
	return 0;
}
コード例 #25
0
void win_mg_cas312_showDialog(void *data, int size)
{
#ifdef APP_SD
        uint32_t x = 210;
        uint32_t y = 160;
#endif
#ifdef APP_HD
        uint32_t x = 340;
        uint32_t y = 200;
#endif

	//printf("[win_mg_cas312_showDialog]------------.\n");

    if (data == NULL)
    {
    	return;
	}

    if (size == sizeof(mg_cas312_rolling_message_st))
    {
        mg_cas312_rolling_message_st *pdata = data;
        memset(&s_312RollMsg, 0, sizeof(mg_cas312_rolling_message_st));
        memcpy(&s_312RollMsg, pdata, sizeof(mg_cas312_rolling_message_st));
        s_msgType = DVB_CA_CURTAIN_INFO;
    }
    else
    {
        s_msgType = -1;
        return;
    }
    
    if (s_winPopmsgCreateFlag)
    {
        GUI_EndDialog("win_popmsg");
    }
    
    GUI_CreateDialog("win_popmsg");
	GUI_SetProperty("win_popmsg", "move_window_x", &x);
	GUI_SetProperty("win_popmsg", "move_window_y", &y);
    s_winPopmsgCreateFlag = true;
}
コード例 #26
0
ファイル: dialogs.c プロジェクト: F-D-R/deviation
void PAGE_ShowSafetyDialog()
{
    if (dialog) {
        u64 unsafe = safety_check();
        if (! unsafe) {
            DialogClose(dialog, 0);
            safety_confirmed();
        } else {
            safety_string_cb(NULL, NULL);
            u32 crc = Crc(tempstring, strlen(tempstring));
            if (crc != dialogcrc) {
                GUI_Redraw(dialog);
                dialogcrc = crc;
            }
        }
    } else {
        tempstring[0] = 0;
        dialogcrc = 0;
        dialog = GUI_CreateDialog(&gui->dialog, DIALOG1_X, DIALOG1_Y,
                 DIALOG1_WIDTH, DIALOG1_HEIGHT, NULL, safety_string_cb, safety_ok_cb, dtOk, NULL);
    }
}
コード例 #27
0
ファイル: app_pvr_bar.c プロジェクト: github188/GX3113C_JIMO
void event_to_pvr(uint8_t flag) //flag: 0 is rec; 1 is pvr;2 is stop;
{
	GUI_Event event = {0};

    event.type = GUI_KEYDOWN;
	 if(flag == 0)
	 {
		event.key.sym = KEY_RED;//rec
	 }
	 else if(flag == 1)
	 {
	 	event.key.sym = KEY_GREEN;//tms
	 }
	 else if(flag == 2)
	 {
	 	event.key.sym = KEY_YELLOW;//stop rec or tms
	 }
	GUI_EndDialog("win_program_info");
	GUI_CreateDialog("wnd_pvr_bar");
	GUI_SetProperty("wnd_pvr_bar", "draw_now", NULL);
	GUI_SendEvent("wnd_pvr_bar", &event);
}
コード例 #28
0
void win_cd_cas30_cardupdating_message_show(u_int8_t byProgress,u_int8_t byMark)
{

	int32_t BarTmp=0;
	int8_t percentStr[10] = {0};
	BarTmp = byProgress;

	if (byProgress > 100)
	{
		/*进度值大于100,关闭或隐藏进度条显示*/
		GUI_EndDialog("win_cd_cas30_updating");
	}
	else
	{
		if (FALSE == create_flag)
		{
			GUI_CreateDialog("win_cd_cas30_updating");
		}			

		if (2 == byMark)
		{
			GUI_SetProperty("win_cd_cas30_updating_mark", "string", "Writing to smart card");
		}
		else if (1 == byMark)
		{
			GUI_SetProperty("win_cd_cas30_updating_mark", "string", "Receiving data");	
		}

		GUI_SetProperty("win_cd_cas30_updating_progbar", "value", (void*)&BarTmp);	
		sprintf((char *)percentStr,"%d%%",BarTmp);
		GUI_SetProperty("win_cd_cas30_updating_text_percent", "string", (void*)percentStr);	
		if ((100 == byProgress)&&(2 == byMark))
		{	
			GUI_SetProperty("win_cd_cas30_updating_mark", "string", "Card Update Success"); 
		}
	}
}
コード例 #29
0
SIGNAL_HANDLER  int win_tr_cas_announce_list_keypress(const char* widgetname, void *usrdata)
{
	GUI_Event *event = NULL;
	uint32_t nListViewSel = 0;
	uint32_t deleteSel;
	ca_delete_data_t delete_data = {0};
	ca_get_date_t get_data = {0};
	char config[10] = {0};
	uint32_t gMail_sel = 0;
	char strNewNum[10] = {0};

	event = (GUI_Event *)usrdata;
	switch (event->type)
	{
	case GUI_MOUSEBUTTONDOWN:
		break;

	case GUI_KEYDOWN:
		switch (event->key.sym)
		{
		case KEY_RED://删除单封公告
			GUI_GetProperty("win_tr_cas_announce_list_listview", "select", &nListViewSel);
			if (s_announceGetCount.totalnum > 0)
			{
				deleteSel = nListViewSel;
				if (nListViewSel >= (s_announceGetCount.totalnum - 1))
				{
					nListViewSel--;
				}
				
				delete_data.date_type = DVB_CA_CURTAIN_INFO;
				delete_data.pos = deleteSel;
				app_cas_api_delete(&delete_data);
				s_announceGetCount.date_type = DVB_CA_CURTAIN_INFO;
				app_cas_api_get_count(&s_announceGetCount);
				GUI_SetProperty("win_tr_cas_announce_list_listview", "update_all", NULL);
				GUI_SetProperty("win_tr_cas_announce_list_listview","select",(void*)&nListViewSel);
				sprintf(config, "%d", s_announceGetCount.totalnum);
				GUI_SetProperty("win_tr_cas_announce_list_text_count", "string", (void *)config);
				sprintf(config, "%d", s_announceGetCount.newnum);
				GUI_SetProperty("win_tr_cas_announce_list_text_new_count", "string", (void *)config);
			}
			else
			{
				app_popmsg(POP_DIALOG_X_START, POP_DIALOG_Y_START,"No Announce",POPMSG_TYPE_OK);
			}
			break;
			
		case KEY_BLUE://删除全部邮件
			if (s_announceGetCount.totalnum > 0)
			{
				delete_data.date_type = DVB_CA_CURTAIN_INFO;
				app_cas_api_delete_all(&delete_data);
                
				s_announceGetCount.date_type = DVB_CA_CURTAIN_INFO;
				app_cas_api_get_count(&s_announceGetCount);

				GUI_SetProperty("win_tr_cas_announce_list_listview", "update_all", NULL);
				sprintf(config, "%d", s_announceGetCount.totalnum);
				GUI_SetProperty("win_tr_cas_announce_list_text_count", "string", (void *)config);
				sprintf(config, "%d", s_announceGetCount.newnum);
				GUI_SetProperty("win_tr_cas_announce_list_text_new_count", "string", (void *)config);
			}
			else
			{
				app_popmsg(POP_DIALOG_X_START, POP_DIALOG_Y_START,"No Announce",POPMSG_TYPE_OK);
			}
			break;
			
		case KEY_MENU:
		case KEY_EXIT:
		case KEY_RECALL:
			GUI_EndDialog("win_tr_cas_announce_list");
			return EVENT_TRANSFER_STOP;
		
		case KEY_OK:
			GUI_GetProperty("win_tr_cas_announce_list_listview","select",(void*)&gMail_sel);
			if ( 0 == s_announceGetCount.totalnum)
			{
				app_popmsg(POP_DIALOG_X_START, POP_DIALOG_Y_START, "No Announce", POPMSG_TYPE_OK);
			}
			else
			{	
				get_data.date_type = DVB_CA_CURTAIN_INFO;
				get_data.pos = gMail_sel; // 行
				get_data.ID = TR_ANNOUNCE_CONTENT_ID;
				if (NULL != app_cas_api_get_data(&get_data))
				{
					s_announceGetCount.date_type = DVB_CA_CURTAIN_INFO;
					app_cas_api_get_count(&s_announceGetCount);
					sprintf(strNewNum, "%d", s_announceGetCount.newnum);
					GUI_SetProperty("win_tr_cas_announce_list_text_new_count", "string", (void *)strNewNum);
					
					GUI_CreateDialog("win_tr_cas_announce_content");
				}
				else
				{
					app_popmsg(POP_DIALOG_X_START, POP_DIALOG_Y_START, "No Announce", POPMSG_TYPE_OK);
				}
			}
			return EVENT_TRANSFER_STOP;
			
		default:
			break;
		}
		break;
		
	default:
		break;
	}
	
	return EVENT_TRANSFER_KEEPON;
}
コード例 #30
0
SIGNAL_HANDLER int app_advanced_menu_box_keypress(const char* widgetname, void *usrdata)
{
	GUI_Event *event = NULL;
	int i =0;
	popmsg_ret ret;
	event = (GUI_Event *)usrdata;
	char language[LANGUAGE_NAME_MAX+1]={0};
	switch(event->type)
	{
		case GUI_MOUSEBUTTONDOWN:
			break;

		case GUI_KEYDOWN:
			switch(event->key.sym)
			{
				case KEY_UP:
					GUI_GetProperty("win_system_set_box", "select", &i);
					i--;
					if (i <0)
					{
						i = 2;
					}
					GUI_SetProperty("win_system_set_box", "select", &i);
					return EVENT_TRANSFER_STOP;
				case KEY_DOWN:
					GUI_GetProperty("win_system_set_box", "select", &i);
					i++;
					if (i > 2)
					{
						i = 0;
					}
					GUI_SetProperty("win_system_set_box", "select", &i);
					return EVENT_TRANSFER_STOP;
				case KEY_OK:
					GUI_GetProperty("win_system_set_box", "select", &i);
					switch(i)
					{
						case 0:
							GUI_CreateDialog("win_sys_update");
							break;
						case 1:
							GUI_CreateDialog("win_passwd_set");
							break;
						case 2:
							memcpy(language,app_flash_get_config_osd_language(),LANGUAGE_NAME_MAX);
#if MEDIA_SUBTITLE_SUPPORT
							app_subt_pause();
#endif
							ret =app_win_reset_factory();
							if(ret == 1)
								return EVENT_TRANSFER_STOP;
							if (0 == strcmp(language,LANGUAGE_ENGLISH))
							{
								GUI_SetProperty("win_system_set_image229","img", "DS_TITLE_ADV_SET.bmp");
								GUI_SetProperty("win_sys_set_factory_text", "draw_now", NULL);
								GUI_SetProperty("win_advanced_set_menu_image_bg","state","hide");
								GUI_SetProperty("win_advanced_set_menu_image_warning","state","hide");
								GUI_SetProperty("win_advanced_set_menu", "update", NULL);//update
								GxCore_ThreadDelay(1000);	
								GUI_SetProperty("win_advanced_set_menu_image_bg","state","hide");
								GUI_SetProperty("win_advanced_set_menu_image_warning","state","hide");
								GUI_SetProperty("win_sys_set_factory_text","state","hide");
							}
							else
							{
								GUI_SetProperty("win_sys_set_factory_text", "draw_now", NULL);
								GUI_SetProperty("win_advanced_set_menu_image_warning","state","hide");
								GUI_SetProperty("win_advanced_set_menu_image_bg","state","hide");
								GUI_SetProperty("win_advanced_set_menu", "update", NULL);//update
								GxCore_ThreadDelay(1000);	
								GUI_SetProperty("win_advanced_set_menu_image_bg","state","hide");
								GUI_SetProperty("win_advanced_set_menu_image_warning","state","hide");
								GUI_SetProperty("win_sys_set_factory_text","state","hide");
															}
							break;
					}
					return EVENT_TRANSFER_KEEPON;
				default:
					return EVENT_TRANSFER_KEEPON;
			}

		default:
			return EVENT_TRANSFER_KEEPON;
	}
	return EVENT_TRANSFER_KEEPON;
}