⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiapp_action_sourcestatusmenu.c

📁 IT projecotr reference design.
💻 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 "guiStyle.h"
#include "guiApp_action.h"
#include "guiApp.h"
#include "osd.h"
#include "keypad.h"
#include "irRemote.h"
#include "irRemotePoint.h"


int08 guiApp_action_SourceStatusMenu_OnStart( int16 menuId, GUIMSG *msg )
{    
    guiApp_SetMenuPosition( menuId, GUI_BOTTOMRIGHT );
   
   /* override menu mode to allow user to use shortcut keys for this display-only menu */ 
   keypad_menuMode( FALSE );    
   rpmouse_setkeymode( FALSE );
   guiApp_SetMenuMode( FALSE );

    if( msg != NULL )
    {
        if( msg->type == GUIMSG_VALUE && msg->data != NULL )
        {
            switch ( *(GUI_SOURCEENUM *)(msg->data) )
            {
                case GUI_SOURCE_VGA:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 0 );
                    break;
                    
                case GUI_SOURCE_DVI:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 1 );
                    break;
                    
                case GUI_SOURCE_COMPONENT:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 2 );
                    break;
                    
                case GUI_SOURCE_COMPOSITE:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 3 );
                    break;
                
                case GUI_SOURCE_SVIDEO:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 4 );
                    break;
                
                case GUI_SOURCE_SEARCHING:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 0 );
                    break;
            
                case GUI_SOURCE_FOUND:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 1 );
                    break;

                case GUI_SOURCE_LOST:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 3 );
                    break;
            }
            guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, *(uint08 *)(msg->data) );
        }
    }

    return PASS;
}


/* implement item behavior, system interaction */
int08 guiApp_action_SourceStatusMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
    if( msg != NULL )
    {
        if( msg->type == GUIMSG_VALUE && msg->data != NULL )
        {
            switch ( *(GUI_SOURCEENUM *)(msg->data) )
            {
                case GUI_SOURCE_VGA:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 0 );
                    break;
                    
                case GUI_SOURCE_DVI:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 1 );
                    break;
                    
                case GUI_SOURCE_COMPONENT:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 2 );
                    break;
                    
                case GUI_SOURCE_COMPOSITE:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 3 );
                    break;
                
                case GUI_SOURCE_SVIDEO:
                    guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, 4 );
                    break;
                
                case GUI_SOURCE_SEARCHING:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 0 );
                    break;
            
                case GUI_SOURCE_FOUND:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 1 );
                    break;

                case GUI_SOURCE_LOST:
                    guiStyle_item_SetListIndex( ITEM_SEARCHINGITEM, 3 );
                    break;
            
                default:
                    return FAIL;
            }
            guiStyle_item_SetListIndex( ITEM_SOURCESTATUSITEM, *(uint08 *)(msg->data) );
        }
        else
        {
            return FAIL;
        }
    }

    return PASS;
}

int08 guiApp_action_SourceStatusMenu_Redraw( int16 menuId, GUIMSG *msg )
{
    guiApp_SetMenuPosition( menuId, GUI_BOTTOMRIGHT );
    
    return PASS;   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -