亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mso_vlist.c

?? ZORAN 962/966 SOURCE CODE,DVD chip
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* **************************************************************************************
*  Copyright (c) 2004 ZORAN Corporation, All Rights Reserved
*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
*  File: $Workfile: o_vlist.c $
*
* Description:
* ============
* Project definition of the MSO_VLIST functions
*
****************************************************************************************/
#include "Config.h"		// Global Configuration - do not remove!

#ifdef DEBUG_UI_TRACE
#undef IFTRACE
#define IFTRACE if (gTraceUI)
#include "Debug\DbgMain.h"
#endif //DEBUG_UI_TRACE

#include "Include\SysDefs.h"
/***************************************************************************************
* Include files
****************************************************************************************/
#include <stdio.h>
#include <string.h>
#include "include\math-macro.h"

#include "GUI\Menu_system\ms_object.h"
#include "GUI\Menu_system\ms_navigation.h"
#include "gui\menu_system\osd_rendering.h"
#include "gui\menu_system\ms_display.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_container.h"

#include "GUI\Object_class\Vlist\mso_vlist.h"
#include "GUI\Resource\Bitmap\bitmap.h"
#include "Menu\menu_operation_def.h"
#include "Font\fonts.h"
#include "Library\String_generate.h"
#ifndef DEBUG_UI_TRACE
#undef dbg_printf(sMsg)
#define dbg_printf(sMsg)
#undef	dbgm_printf(sMsg, mode)
#define dbgm_printf(sMsg, mode)
#endif


/***************************************************************************************
* 	Named Constants
****************************************************************************************/
#define LIST_ITEM_MIN_HEIGHT		24
#define SCROLL_MIN_HEIGHT			24
#define SCROLLBAR_WIDTH			16
#define DEFAULT_OFFSET			4 // Offset in pixel before the first item in the list.

/***************************************************************************************
* 	Private static functions
****************************************************************************************/
static UINT16 VlistGetRelativeItemIndex(MSO_OBJECT __NEAR *pObject, MSO_CONTAINER __NEAR *pContainer);
static BOOL VlistSetFocusToRelativeItem(MSO_OBJECT __NEAR *pThis, UINT16 wIndex);
static BOOL _VScrollListBarFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);
static BOOL _VScrollListArrowFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);
static BOOL _VScrollListArrowOnSideFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);

/***************************************************************************************
* 	Operation functions
****************************************************************************************/

/***************************************************************************************
*	Function	: 	VListOperation
*
*	In		: 	pThis	=	Pointer to MSO_VLIST object.
*
*				MsOp	=	Operation ID.
*
*				lParam	=	Parameter associated with an MS_OP if any.
*
*	Out		: 	None.
*
*	Return	:	ID of the operation that is to be propagated once processing is done,
*				otherwise MS_OP_NONE.
*
*	Desc 	:	This function default operation function of MSO_VLIST objects.
*
*	NOTE	:	The MS_ATTR_GENERAL_PURPOSE_1 attribute is used determine the item
*				to be focused when scrolling past the currently displayed items.
*				I.e. If the last item in the list is currently focused, and user presses the
*				down key, then the first item should be focused.
****************************************************************************************/
MS_OP VListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_INIT:
		{
			//((MSO_VLIST __NEAR*)pThis)->moParam.mwTotalItems 		= 0;
			((MSO_VLIST __NEAR*)pThis)->moParam.mwFirstDisplayItem 	= 0;
			MS_SET_FOCUS_ON_FIRSTITEM(pThis);
			//MS_CLEAR_VSLIST_DISPLAY_SCROLL_ARROW(pThis);
		}
		break;

	case MS_OP_MENU_SET_FOCUS_TO_INDEX:
		if (!VlistSetFocusToRelativeItem(pThis, (UINT16)lParam))
			return MsOp;
		return MS_OP_NONE;

	default:
		break;
	}

 	//If up or down operation, send to the focused child first. 	
	if ((MsOp == MS_OP_UP) || (MsOp == MS_OP_DOWN))
	{
		MSO_VLIST __NEAR* pList = (MSO_VLIST __NEAR*)pThis;
		BOOL bSimulate = (MS_PARAM_OP_SIMULATE & lParam) ? TRUE : FALSE;
		MSO_OBJECT __NEAR* pFocusObject  = MS_GetFocusInContainer((MSO_CONTAINER __NEAR*)pList);
		
		if(NULL != pFocusObject)
		{
			
			MsOp = MS_SendOperation(pFocusObject,  MsOp, lParam);

	 		if(MsOp == MS_OP_UP)
			{
				UINT16 wFocusedItem;

				wFocusedItem = pList->moParam.mwFirstDisplayItem + VlistGetRelativeItemIndex(pFocusObject, (MSO_CONTAINER __NEAR *)pList);

				// Scroll the list pagewise if the Up key is being held down (lParam is 1).
				// Will scroll up only till the first page.
				if (		(MS_PARAM_OP_KEYHOLD & lParam)
					&& 	(0 != pList->moParam.mwFirstDisplayItem)
					&& 	(wFocusedItem == pList->moParam.mwFirstDisplayItem))
				{
					if(FALSE == bSimulate)
					{
						if (pList->moParam.mwFirstDisplayItem > pList->moParam.mcNumVisibleItems)
							pList->moParam.mwFirstDisplayItem -= pList->moParam.mcNumVisibleItems;
						else
							pList->moParam.mwFirstDisplayItem = 0;

						// Refresh list and set focus to the first item.
						MS_SET_FOCUS_ON_FIRSTITEM(pList);
						return MS_OP_REFRESH;
					}
					else
						return MS_OP_NONE;
				}

				// Don't scroll if key hold while focus on first item in the list
				if ((MS_PARAM_OP_KEYHOLD & lParam) && (0 == wFocusedItem))
				{
					return MS_OP_NONE;
				}

				// We are focused on the first item.
				if(0 == wFocusedItem)
				{
					// Let the parent handle the navigation in case the Vlist doesn't do wrap up/down
					// If a Vscroll-List contains the Vlist and does wrap up-down, then the focus will to the 
					// last currently displayed item in the Vlist.
					// Limitation: Don't handle the unfocusable items
					if (MS_NavIsContainerWrapUD(pThis))
					{
					if(pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
					{
						if(FALSE == bSimulate)
						{
							UINT16 wTemp = pList->moParam.mwTotalItems % pList->moParam.mcNumVisibleItems;

							if(0 == wTemp)
								wTemp = pList->moParam.mcNumVisibleItems;

							pList->moParam.mwFirstDisplayItem = pList->moParam.mwTotalItems - wTemp;

							// Refresh list and set focus to the last item.
							MS_SET_FOCUS_ON_LASTITEM(pList);
							return MS_OP_REFRESH;
						}
						else
							return MS_OP_NONE;
					}
				}
				}
				else
				{
					// Update the first displayed item index.
					if(wFocusedItem <= pList->moParam.mwFirstDisplayItem)
					{
						if(FALSE == bSimulate)
						{
							if(MS_IS_VLIST_SCROLL_SINGLE_ITEM(pList))
							{
								// pList->moParam.mwFirstDisplayItem is >= 1 as well as wFocusedItem
								pList->moParam.mwFirstDisplayItem -= 1;

								// Refresh list and set focus to the first item.
								MS_SET_FOCUS_ON_FIRSTITEM(pList);
							}
							else
							{
								if (pList->moParam.mwFirstDisplayItem > pList->moParam.mcNumVisibleItems)
									pList->moParam.mwFirstDisplayItem -= pList->moParam.mcNumVisibleItems;
								else
									pList->moParam.mwFirstDisplayItem = 0;

								// Refresh list and set focus to the last item.
								MS_SET_FOCUS_ON_LASTITEM(pList);
							}
							return MS_OP_REFRESH;
						}
						else
							return MS_OP_NONE;
					}
				}
				return MS_NavInContainer((MSO_CONTAINER __NEAR*)pThis, MsOp, bSimulate);
			}

	 		else if (MsOp == MS_OP_DOWN)
			{
				UINT16 wFocusedItem;
				
				wFocusedItem = pList->moParam.mwFirstDisplayItem + VlistGetRelativeItemIndex(pFocusObject, (MSO_CONTAINER __NEAR *)pList);
				
				// Scroll the list pagewise if the Down key is being held down (lParam is 1).
				// Will scroll down only till the last page.
				if((MS_PARAM_OP_KEYHOLD & lParam)
					&& ((pList->moParam.mwTotalItems - pList->moParam.mwFirstDisplayItem) > pList->moParam.mcNumVisibleItems)
					&& (wFocusedItem == (pList->moParam.mwFirstDisplayItem + pList->moParam.mcNumVisibleItems - 1)))
				{
					if(FALSE == bSimulate)
					{
						pList->moParam.mwFirstDisplayItem += pList->moParam.mcNumVisibleItems;

						// Refresh list and set focus to the last item.
						MS_SET_FOCUS_ON_LASTITEM(pList);
						return MS_OP_REFRESH;
					}
					else
						return MS_OP_NONE;
				}

				// Don't scroll if key hold while focus on last item in the list
				if ((MS_PARAM_OP_KEYHOLD & lParam) && (wFocusedItem == (pList->moParam.mwTotalItems - 1)))
				{
					return MS_OP_NONE;
				}

				// Let the parent handle the navigation in case the Vlist doesn't do wrap up/down
				if (wFocusedItem >= (pList->moParam.mwTotalItems - 1))
				{
					// If a Vscroll-List contains the Vlist and does wrap up-down, then the focus will to the 
					// first currently displayed item in the Vlist.
					// Limitation: Don't handle the unfocusable items
					if (MS_NavIsContainerWrapUD(pThis))
					{
					if (pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
					{
						if (FALSE == bSimulate)
						{
							pList->moParam.mwFirstDisplayItem = 0;

							// Refresh list and set focus to the first item.
							MS_SET_FOCUS_ON_FIRSTITEM(pList);
							return MS_OP_REFRESH;
						}
						else
							return MS_OP_NONE;
					}
				}
				}
				else
				{
					// Update the first displayed item index.
					if (wFocusedItem >= (pList->moParam.mwFirstDisplayItem + pList->moParam.mcNumVisibleItems - 1))
					{
						if (FALSE == bSimulate)
						{
							if (MS_IS_VLIST_SCROLL_SINGLE_ITEM(pList))
							{
								pList->moParam.mwFirstDisplayItem += 1;

								// Refresh list and set focus to the last item.
								MS_SET_FOCUS_ON_LASTITEM(pList);
							}
							else
							{
								pList->moParam.mwFirstDisplayItem += pList->moParam.mcNumVisibleItems;

								// Refresh list and set focus to the first item.
								MS_SET_FOCUS_ON_FIRSTITEM(pList);
							}
							return MS_OP_REFRESH;
						}
						return MS_OP_NONE;
					}
				}
				return MS_NavInContainer((MSO_CONTAINER __NEAR*)pThis, MsOp, bSimulate);
			}
		}
	}
	return  MS_BasicContainerOperation(pThis, MsOp, lParam);
}

/***************************************************************************************
*	Function	: 	VScrollListOperation
*
*	In		: 	pThis	=	Pointer to MSO_VSCROLL_LIST object.
*
*				MsOp	=	Operation ID.
*
*				lParam	=	Parameter associated with an MS_OP if any.
*
*	Out		: 	None.
*
*	Return	:	ID of the operation that is to be propagated once processing is done,
*				otherwise MS_OP_NONE.
*
*	Desc 	:	This function default operation function of MSO_VSCROLL_LIST objects.
****************************************************************************************/
MS_OP VScrollListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	MS_ASSERT(NULL != pThis);

	switch(MsOp)
	{
	case MS_OP_OPEN:
		{
			MSO_OBJECT __NEAR* pObject 	= NULL;
			MS_DESCRIPTOR_VSCROLL_LIST* pScrollListDescriptor = (MS_DESCRIPTOR_VSCROLL_LIST*)pThis->mpDescriptor;

			if(NULL != pScrollListDescriptor->mpDescriptorVList)
			{
				pObject = MS_CreateAndAddObject((MS_DESCRIPTOR*)pScrollListDescriptor->mpDescriptorVList, (MSO_CONTAINER __NEAR*)pThis);

				// Resize the list according to X, Y padding and dimensions of the scrollbar.
				pObject->moArea.msX 	= pScrollListDescriptor->mcXPadding;
				pObject->moArea.msY 	= pScrollListDescriptor->mcYPadding;
				pObject->moArea.mwH 	= pThis->moArea.mwH - (pScrollListDescriptor->mcYPadding << 1);

				if(MS_IS_VSLIST_DISPLAY_SCROLL_ARROW(pThis) && !MS_IS_VSLIST_DISPLAY_SCROLL_ARROW_ON_SIDE(pThis))
					pObject->moArea.mwW = pThis->moArea.mwW - (pScrollListDescriptor->mcXPadding << 1);
				else
					pObject->moArea.mwW = pThis->moArea.mwW - (pScrollListDescriptor->mcXPadding * 3) - SCROLLBAR_WIDTH;
			}
		}
		break;
	}
	return  MS_BasicContainerOperation(pThis, MsOp, lParam);
}

/***************************************************************************************
* 	Display functions
****************************************************************************************/

/***************************************************************************************
*	Function	: 	VListFillOSDSeg
*
*	In		: 	pThis	=	Pointer to a MSO_VLIST object.
*
*				pAbsArea	=	Absolute area of pThis object.
*
*	Out		: 	None.
*
*	Return	:	None.
*
*	Desc 	:	Default display function of MSO_VLIST objects.
****************************************************************************************/
BOOL VListFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
	// To avoid compiler warnings:
	pThis = pThis;

	// Just fill in the background:
	return OSDR_FillOsdSegBitmapFitArea(BMP_BG_3, pAbsArea);
}

/***************************************************************************************
*	Function	: 	VScrollListFillOSDSeg
*
*	In		: 	pThis	=	Pointer to a MSO_VSCROLL_LIST object.
*
*				pAbsArea	=	Absolute area of pThis object.
*
*	Out		: 	None.
*
*	Return	:	None.
*
*	Desc 	:	Default display function of MSO_VSCROLL_LIST objects.
****************************************************************************************/
BOOL VScrollListFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
	if(MS_IS_VSLIST_DISPLAY_SCROLL_ARROW(pThis))
	{
		if(MS_IS_VSLIST_DISPLAY_SCROLL_ARROW_ON_SIDE(pThis))
			return _VScrollListArrowOnSideFillOSDSeg(pThis, pAbsArea);
		else
			return _VScrollListArrowFillOSDSeg(pThis, pAbsArea);
	}
	else
		return _VScrollListBarFillOSDSeg(pThis, pAbsArea);
}

/***************************************************************************************
*	Function	: 	VScrollListFillOSDSeg
*
*	In		: 	pThis	=	Pointer to a MSO_VSCROLL_LIST object.
*
*				pAbsArea	=	Absolute area of pThis object.
*
*	Out		: 	None.
*
*	Return	:	TRUE if successful.
*
*	Desc 	:	Display function of the vertical scroll list with scroll bar.
****************************************************************************************/
static BOOL _VScrollListBarFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
	UINT16 wScrollHeight  		= 0;
	UINT16 wScrollStartX		= 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频999| 亚洲综合成人在线视频| 亚洲国产精品一区二区久久| 免费看欧美女人艹b| 成人高清视频在线| 精品少妇一区二区三区视频免付费 | 欧美v亚洲v综合ⅴ国产v| 亚洲婷婷综合色高清在线| 开心九九激情九九欧美日韩精美视频电影| 国产99久久精品| 91精品国产综合久久久久久| 亚洲综合久久久久| 91麻豆高清视频| 国产亚洲成年网址在线观看| 日韩精品1区2区3区| 欧美影视一区在线| 亚洲同性gay激情无套| 国产精品亚洲视频| 精品国产凹凸成av人网站| 婷婷久久综合九色综合绿巨人| 99久久久无码国产精品| 国产精品久久影院| 成人黄色av电影| 中文在线一区二区| 国产成人精品一区二| 久久影视一区二区| 极品少妇xxxx精品少妇偷拍| 欧美一区二区视频在线观看2020 | 久久久久久久电影| 久草中文综合在线| 亚洲精品一区二区三区精华液| 午夜激情一区二区三区| 欧美另类久久久品| 日本午夜精品一区二区三区电影| 欧美日韩免费电影| 视频一区二区国产| 欧美一区二区在线观看| 美女在线一区二区| 欧美精品一区二区三区蜜臀| 国产一区二区三区免费看| 久久精子c满五个校花| 丁香激情综合五月| 日韩伦理电影网| 在线看日韩精品电影| 亚洲成人免费电影| 91精品婷婷国产综合久久竹菊| 蜜臀精品一区二区三区在线观看 | 欧美一卡二卡三卡四卡| 日韩不卡手机在线v区| 日韩欧美国产1| 国产成人av资源| 亚洲精品乱码久久久久久| 在线国产电影不卡| 亚洲成人免费电影| 久久综合狠狠综合久久综合88 | 久久综合九色欧美综合狠狠| 懂色中文一区二区在线播放| 18欧美亚洲精品| 欧美精品三级日韩久久| 九色综合狠狠综合久久| 国产精品丝袜一区| 欧美卡1卡2卡| 成人一区二区三区| 亚洲国产欧美在线| 26uuu国产在线精品一区二区| 成人久久18免费网站麻豆| 午夜av区久久| 欧美国产精品劲爆| 制服丝袜一区二区三区| 国产成人自拍在线| 成人一级视频在线观看| 天堂va蜜桃一区二区三区 | 久久aⅴ国产欧美74aaa| 欧美激情一区二区三区全黄| 欧美一a一片一级一片| 精品制服美女丁香| 日日夜夜精品视频免费| 欧美激情一区二区在线| 欧美一区永久视频免费观看| 99re热这里只有精品视频| 麻豆精品一区二区三区| 亚洲精品免费在线观看| 欧美极品aⅴ影院| 91精品国产综合久久小美女| 91在线一区二区| 国产一区二区免费视频| 午夜精品免费在线观看| 亚洲色图欧美在线| 国产色婷婷亚洲99精品小说| 91精品国产欧美日韩| 91麻豆高清视频| 成人精品电影在线观看| 国产一区二区三区四区在线观看 | 国内成人精品2018免费看| 亚洲一区二区免费视频| 成人免费一区二区三区在线观看| 欧美精品一区二区三区四区| 日韩午夜在线播放| 欧美日韩一区二区欧美激情| 色综合咪咪久久| 成人午夜视频在线观看| 国产一区二区三区在线观看免费| 日韩精品电影在线| 亚洲成在线观看| 亚洲人成网站色在线观看| 中文乱码免费一区二区 | 欧美日韩精品一区二区在线播放| 91啦中文在线观看| 色综合久久综合中文综合网| 95精品视频在线| 91丨porny丨蝌蚪视频| 99久久精品一区二区| 成人性生交大片| 成人丝袜视频网| av电影天堂一区二区在线| 懂色av一区二区三区免费看| 国产一区二区三区四| 国产一区二区三区四区在线观看| 精品一二三四区| 国模冰冰炮一区二区| 国产精品88888| 岛国精品在线播放| www.久久久久久久久| eeuss鲁一区二区三区| 色域天天综合网| 欧美日韩成人综合天天影院| 制服丝袜在线91| 国产亚洲精品中文字幕| 欧美韩国日本不卡| 亚洲欧美日韩中文字幕一区二区三区| 亚洲欧美激情小说另类| 亚洲成人免费视频| 精品在线免费观看| 不卡在线观看av| 欧美在线色视频| 久久一区二区三区国产精品| 国产精品美女久久久久aⅴ国产馆| 综合欧美一区二区三区| 午夜精品久久一牛影视| 久久国产精品99久久久久久老狼| 国产福利电影一区二区三区| 波多野结衣在线一区| 欧美日韩在线直播| 日韩欧美国产一二三区| 亚洲国产成人私人影院tom| 亚洲精品高清在线观看| 日本麻豆一区二区三区视频| 国产成人综合在线观看| 欧美怡红院视频| 国产日产亚洲精品系列| 亚洲尤物视频在线| 国模大尺度一区二区三区| 在线精品视频小说1| 精品成人在线观看| 一二三区精品视频| 国产主播一区二区三区| 欧美中文字幕一区| 国产无一区二区| 亚洲777理论| 99精品久久99久久久久| 日韩免费福利电影在线观看| 亚洲靠逼com| 国产麻豆精品在线观看| 欧美日韩中文字幕一区| 国产欧美一区视频| 蜜桃在线一区二区三区| 一本高清dvd不卡在线观看| 日韩一区二区三区在线观看| 一区二区久久久久| 国产不卡在线播放| 欧美一区二区三区视频在线| 亚洲夂夂婷婷色拍ww47| www.欧美日韩国产在线| 久久久久久久久久久久久夜| 日韩中文字幕一区二区三区| 91农村精品一区二区在线| 国产欧美综合色| 国产精品一区二区久久不卡| 欧美久久高跟鞋激| 亚洲成人中文在线| 91亚洲永久精品| 国产精品高潮久久久久无| 蜜臀av在线播放一区二区三区 | 99久久久免费精品国产一区二区| 欧美电影免费观看高清完整版在| 亚洲一区二区综合| 99精品视频中文字幕| 国产精品久久久久毛片软件| 国产69精品一区二区亚洲孕妇 | 亚洲精品成人少妇| 91一区一区三区| 中文字幕一区在线| 成人污污视频在线观看| 国产三级一区二区| 国产精品资源在线| 久久久久国产一区二区三区四区| 精品无人区卡一卡二卡三乱码免费卡| 欧美电视剧免费全集观看| 久久国产精品99久久久久久老狼 | 欧美又粗又大又爽|