📄 guistyle_menu_generic.c
字号:
/*****************************************************************************
** TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
** (c) Copyright, Texas Instruments Incorporated, 2006.
** All Rights Reserved.
**
** Property of Texas Instruments Incorporated. Restricted Rights -
** Use, duplication, or disclosure is subject to restrictions set
** forth in TI's program license agreement and associated documentation.
******************************************************************************/
#include "common.h"
#include "osd.h"
#include "guiStyle.h"
#include "guiStyle_sub.h"
/* This function initializes the menu according to the menu style */
int08 guiStyle_menu_Generic_OnStart( GUI_OPEN_MENU *menu, GUIMSG *msg )
{
if( menu == NULL )
return FAIL;
if( menu->itemId == OSD_ERR_ID_INVALID )
{
/* set the focus on the first item */
menu->itemId = OSD_GetFirstMenuItemID( menu->menuId );
}
/* call any menu specific initialization */
gui_AppAction_OnStart( menu->menuId, msg );
return PASS;
}
/* This function performs any necessary cleanup when the menu closes */
int08 guiStyle_menu_Generic_OnClose( GUI_OPEN_MENU *menu )
{
if( menu == NULL )
return FAIL;
/* call any menu specific initialization */
gui_AppAction_OnClose( menu->menuId );
return PASS;
}
/* This function takes the menu's current state (selected item, etc) and refreshes the
* OSD item display */
int08 guiStyle_menu_Generic_Redraw( GUI_OPEN_MENU *menu )
{
if( menu == NULL )
return FAIL;
/* call any menu specific initialization */
gui_AppAction_Redraw( menu->menuId, NULL );
return PASS;
}
/* send incoming messages directly to action module, skipping item style */
int08 guiStyle_menu_Generic_GuiMsg( GUI_OPEN_MENU *menu, GUIMSG *msg )
{
if( msg == NULL || menu == NULL )
return FAIL;
switch( msg->type )
{
case GUIMSG_LEFT:
case GUIMSG_DOWN:
case GUIMSG_RIGHT:
case GUIMSG_UP:
case GUIMSG_SELECT:
case GUIMSG_STRING:
case GUIMSG_VALUE:
// pass the message as is
break;
default:
break;
}
guiStyle_item_GuiMsg( menu, msg );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -