guiapp_action_confirmationscreencapturemenu.c

来自「IT projecotr reference design.」· C语言 代码 · 共 82 行

C
82
字号
/*****************************************************************************
**             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 "osd.h"
#include "pictcont.h"
#include "datapath.h"
#include "guiApp.h"

static int16 confirmscreencaptureIndex = ITEM_SCREENCAPTUREITEM;

int08 guiApp_action_ConfirmScreenCaptureMenu_OnStart( int16 menuId, GUIMSG *msg )
{
    guiApp_SetMenuPosition( menuId, GUI_CENTER );
    
    if( msg != NULL )
    {
        if( msg->type == GUIMSG_VALUE && msg->data != NULL )
        {
            confirmscreencaptureIndex =  *(int16 *)(msg->data);
        }
    }

    return PASS;
}

/* implement item behavior, system interaction */
int08 guiApp_action_ConfirmScreenCaptureMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{   
    if( msg == NULL )
        return FAIL;

    switch( itemId )
    {
        case ITEM_SCREENCAPTUREOKITEM:
            if( msg->type == GUIMSG_ASSERT )
            {
                switch( confirmscreencaptureIndex )
                {                        
                    case ITEM_SCREENCAPTUREITEM:
                        guiStyle_CloseMenu( menuId );
                        datapath_UserScreenCapture();                        

                        break;
                    
                    default:
                        break;
                }                
            }
            break;
         
        case ITEM_SCREENCAPTURECANCELITEM:
            if( msg->type == GUIMSG_ASSERT )
            {
                guiStyle_CloseMenu( menuId );
            }
            break;

        default:
            return FAIL;
    }        

    return PASS;
}

int08 guiApp_action_ConfirmScreenCaptureMenu_Redraw( int16 menuId, GUIMSG *msg )
{
    guiApp_SetMenuPosition( menuId, GUI_CENTER );

    return PASS;   
}

⌨️ 快捷键说明

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