?? mso_vlist.h
字號(hào):
/* **************************************************************************************
* Copyright (c) 2004 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: $Workfile: o_vlist.h $
*
* Description:
* ============
* Project definition of the MSO_VLIST, and MSO_VSCROLL_LIST object.
*
****************************************************************************************/
#ifndef _O_VLIST_H_
#define _O_VLIST_H_
/***************************************************************************************
* Include files
****************************************************************************************/
#include "GUI\Menu_system\ms_object.h"
#include "GUI\Menu_system\ms_container.h"
#include "GUI\Menu_system\osd_rendering.h"
/***************************************************************************************
* Public Named Constants
****************************************************************************************/
#define REFRESH_LIST_DISPLAY_NEXT_ITEM 0
#define REFRESH_LIST_DISPLAY_FIRST_ITEM INVALID_PARAM_VALUE
/***************************************************************************************
* Public Macros
****************************************************************************************/
// MSO_VLIST specific macros
#define MS_IS_FOCUS_ON_LASTITEM MS_IsGeneralPurpose1
#define MS_SET_FOCUS_ON_LASTITEM MS_SetGeneralPurpose1
#define MS_SET_FOCUS_ON_FIRSTITEM MS_ClearGeneralPurpose1
#define MS_ATTR_VLIST_OFFSET_FIRSTITEM MS_ATTR_GENERAL_PURPOSE_3
#define MS_IS_OFFSET_FIRSTITEM MS_IsGeneralPurpose3
#define MS_OFFSET_FIRSTITEM MS_SetGeneralPurpose3
#define MS_DONOT_OFFSET_FIRSTITEM MS_ClearGeneralPurpose3
#define MS_ATTR_VLIST_SCROLL_SINGLE_ITEM MS_ATTR_GENERAL_PURPOSE_4
#define MS_IS_VLIST_SCROLL_SINGLE_ITEM MS_IsGeneralPurpose4
#define MS_SET_VLIST_SCROLL_SINGLE_ITEM MS_SetGeneralPurpose4
#define MS_CLEAR_VLIST_SCROLL_SINGLE_ITEM MS_ClearGeneralPurpose4
// MSO_VSCROLL_LIST specific macros
#define MS_ATTR_VSLIST_DISPLAY_BG_BMP MS_ATTR_GENERAL_PURPOSE_1
#define MS_IS_VSLIST_DISPLAY_BG_BMP MS_IsGeneralPurpose1
#define MS_SET_VSLIST_DISPLAY_BG_BMP MS_SetGeneralPurpose1
#define MS_CLEAR_VSLIST_DISPLAY_BG_BMP MS_ClearGeneralPurpose1
#define MS_ATTR_VSLIST_SCROLL_ARROW MS_ATTR_GENERAL_PURPOSE_2
#define MS_IS_VSLIST_DISPLAY_SCROLL_ARROW MS_IsGeneralPurpose2
#define MS_SET_VSLIST_DISPLAY_SCROLL_ARROW MS_SetGeneralPurpose2
#define MS_CLEAR_VSLIST_DISPLAY_SCROLL_ARROW MS_ClearGeneralPurpose2
// Useful only when the MS_ATTR_VSLIST_SCROLL_ARROW attribute is set.
#define MS_ATTR_VSLIST_SCROLL_ARROW_ON_SIDE MS_ATTR_GENERAL_PURPOSE_3
#define MS_IS_VSLIST_DISPLAY_SCROLL_ARROW_ON_SIDE MS_IsGeneralPurpose3
#define MS_SET_VSLIST_DISPLAY_SCROLL_ARROW_ON_SIDE MS_SetGeneralPurpose3
#define MS_CLEAR_VSLIST_DISPLAY_SCROLL_ARROW_ON_SIDE MS_ClearGeneralPurpose3
/***************************************************************************************
* Public typdef definitions.
****************************************************************************************/
/***************************************************************************************
* Structure : MS_PARAM_VLIST
*
* Members : 1. mdwData = Additional data if any.
*
* 2. mwFirstDisplayItem = Index of the first visible list item.
*
* 3. mcNumVisibleItems = Maximum number of items that can be visible at any given time.
*
* 4. mcItemOffset = Offset in pixels between adjacent list items.
*
* 5. mwTotalItems = Total number of items in this list.
*
* Desc : Vertical list parameters. The number of list items displayed depends on the height/width
* of the container.
****************************************************************************************/
typedef struct ms_param_vlist {
UINT16 mwTotalItems;
UINT16 mwFirstDisplayItem;
UINT8 mcNumVisibleItems;
UINT8 mcItemOffset;
UINT32 mdwData;
}MS_PARAM_VLIST;
/***************************************************************************************
* Structure : MS_DESCRIPTOR_VLIST
*
* Members : 1. moDescriptor = The base of all descriptors.
*
* Desc : The Vertical list descriptor.
****************************************************************************************/
typedef MS_DESCRIPTOR_CONTAINER MS_DESCRIPTOR_VLIST;
/***************************************************************************************
* Structure : MS_DESCRIPTOR_VSCROLL_LIST
*
* Members : 1. moDescriptor = The base of all descriptors.
*
* 2. mpDescriptorVList = Descriptor of the MSO_VLIST child object.
*
* 3. mcXPadding = Horizontal separation between adjacent list items.
*
* 4. mcYPadding = Vertical separation between adjacent list items.
*
* 5. mwTextColor = Text color.
*
* 6. mpBgBmp = Background bitmap.
*
* 7. mpScrollbarBgBmp = Scrollbar background bitmap.
*
* 8. mpScrollbarBmp = Scrollbar bitmap.
*
* Desc : Vertical srcoll list descriptor.
****************************************************************************************/
typedef struct ms_descriptor_vscroll_list {
MS_DESCRIPTOR_CONTAINER moDescriptor;
MS_DESCRIPTOR_VLIST* mpDescriptorVList;
UINT8 mcXPadding;
UINT8 mcYPadding;
UINT16 mwTextColor;
CONST UINT8* mpBgBmp;
CONST UINT8* mpScrollbarBgBmp;
CONST UINT8* mpScrollbarBmp;
}MS_DESCRIPTOR_VSCROLL_LIST;
/***************************************************************************************
* Structure : MSO_VSCROLL_LIST
*
* Members : 1. moContainer = The base of all containers.
*
* 2. moParam = The vertical list parameters.
*
* Desc : The vertical list object.
****************************************************************************************/
typedef struct mso_vlist {
MSO_CONTAINER moContainer;
MS_PARAM_VLIST moParam;
}MSO_VLIST;
/***************************************************************************************
* Structure : MSO_VSCROLL_LIST
*
* Members : None.
*
* Desc : The vertical scroll list object.
****************************************************************************************/
typedef MSO_CONTAINER MSO_VSCROLL_LIST;
/***************************************************************************************
* 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.
****************************************************************************************/
extern MS_OP VListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 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.
****************************************************************************************/
extern MS_OP VScrollListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 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.
****************************************************************************************/
extern BOOL VListFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* 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.
****************************************************************************************/
extern BOOL VScrollListFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);
/***************************************************************************************
* MSO_VLIST Public functions
****************************************************************************************/
/***************************************************************************************
* Function : OVLIST_CreatAndAddItem
*
* In : pThis = Pointer to the MSO_VLIST object.
*
* pDescriptor = Pointer to a descriptor for the new object. The object to be created
* would be based on this descriptor.
*
* bEnd = The new item would be added at the end if TRUE.
*
* bSetFocus = Set focus to the created item if TRUE.
*
* Out : None.
*
* Return : Pointer to the added item.
*
* Desc : Creates and adds items to the MSO_VLIST.
****************************************************************************************/
extern MSO_OBJECT __NEAR* OVLIST_CreatAndAddItem(MSO_OBJECT __NEAR* pThis, MS_DESCRIPTOR* pDescriptor, BOOL bEnd, BOOL bSetFocus);
// Helper Macros
#define OVLIST_CreateAndPrependItem(_VListPtr_, _ItemDescriptorPtr_) OVLIST_CreatAndAddItem((MSO_OBJECT __NEAR*)_VListPtr_, \
(MS_DESCRIPTOR*)_ItemDescriptorPtr_, \
FALSE, FALSE);
#define OVLIST_CreateAndAppendItem(_VListPtr_, _ItemDescriptorPtr_) OVLIST_CreatAndAddItem((MSO_OBJECT __NEAR*)_VListPtr_, \
(MS_DESCRIPTOR*)_ItemDescriptorPtr_, \
TRUE, FALSE);
#endif // _O_VLIST_H_
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -