Exemplo n.º 1
0
ENDDISPATCH

/*	XGToolbarView::DoPeriodic
 *
 *		Handle periodic events
 */

long XGToolbarView::DoPeriodic(long,void *)
{
	long i,len;
	autoptr<XGDraw> draw;
	char c;
	
	/*
	 *	Scan all the commands and figure out their status
	 */
	
	len = fStatus.GetSize();
	for (i = 0; i < len; i++) {
		c = GetMenuStatus(GetItemCommand(i));
		if (c != fStatus.GetChar(i)) {
			if (NULL == draw.Ptr()) draw = new XGDraw(this);
			fStatus.SetChar(i,c);
			DrawButton(*draw,
					   CalcButton(i),
					   i,
					   c);
		}
	}
	return 0;
}
Exemplo n.º 2
0
Arquivo: key.c Projeto: mrtos/testing
//--------------------------------------------------------------------------------------------------------------------------
static void VOUTButtonControl(void)
{
	WORD nID = GetMenuStatus(6,2);
	WORD max = GetMenuItemMax(6,2);

	if (++nID>=max) nID = 0;
	SetOSDMenuID(0x6210);
	SetOSDItemID(nID);
	SetMenuStatus(6,2,nID);
}