INT32 UIFlowWndPhoto_OnKeyMenu(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiKeyAct; UINT32 uiSoundMask; uiKeyAct = paramArray[0]; switch(uiKeyAct) { case NVTEVT_KEY_PRESS: switch(gPhotoData.State) { case PHOTO_ST_VIEW: // enable shutter2 sound (shutter2 as OK key in menu) uiSoundMask = Input_GetKeySoundMask(KEY_PRESS); uiSoundMask |= FLGKEY_SHUTTER2; Input_SetKeySoundMask(KEY_PRESS, uiSoundMask); /* Force to lock FD/SD functions before opening Menu */ FlowPhoto_ForceLockFdSd(); Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL); // Set Tab menu to Photo menu TM_SetMenu(&gPhotoMenu); // Open common mix (Item + Option) menu Ux_OpenWindow((VControl *)(&MenuCommonItemCtrl), 0); gPhotoData.State = PHOTO_ST_MENU; break; } break; } return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiSoundMask,uiStatus; g_bUIFlowWndPlayNoImgWndOpened = FALSE; Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYINIT,0); //After playback ready, point to the last file // PB_OpenSpecFileBySeq(DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT), TRUE); PB_OpenSpecFileBySeq(AppPlay_GetData(PLAY_FILENUM), TRUE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 2, PB_SINGLE_CURR, 1); uiStatus = AppPlay_GetData(PLAY_PBSTATUS); if (uiStatus & PB_STA_NOIMAGE) //if(DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT)==0) { Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP); g_bUIFlowWndPlayNoImgWndOpened = TRUE; } else { g_PlbData.VideoPBSpeed=PLB_FWD_MOV_1x; g_PlbData.State = PLB_ST_FULL; UIFlowWndPlay_CheckStatus(); FlowPB_UpdateIcons(1); } // enable shutter2 sound uiSoundMask = Input_GetKeySoundMask(KEY_PRESS); uiSoundMask |= FLGKEY_SHUTTER2; Input_SetKeySoundMask(KEY_PRESS, uiSoundMask); // Set mask key Ux_FlushEventByRange(NVTEVT_KEY_EVT_START,NVTEVT_KEY_EVT_END); Input_SetKeyMask(KEY_PRESS, PLAY_KEY_PRESS_MASK); Input_SetKeyMask(KEY_RELEASE, PLAY_KEY_RELEASE_MASK); Input_SetKeyMask(KEY_CONTINUE, PLAY_KEY_CONTINUE_MASK); Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray); return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiSoundMask; switch(g_PlbData.State) { case PLB_ST_FULL: break; case PLB_ST_PLAY_MOV: case PLB_ST_PAUSE_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: g_PlbData.State = PLB_ST_FULL; g_PlbData.VideoPBSpeed = PLB_FWD_MOV_1x; UIFlowMoviePlay_SetSpeed(g_PlbData.VideoPBSpeed); g_uiUIFlowWndPlayCurrenDirection = MEDIAPLAY_DIR_FORWARD; Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PAUSE_PLAY_MOVIE, 0); Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_CLOSE_PLAY_MOVIE, 0); if (gphUIFlowMovPlay_Filehdl) { FileSys_CloseFile(gphUIFlowMovPlay_Filehdl); gphUIFlowMovPlay_Filehdl = NULL; } break; } // disable shutter2 sound uiSoundMask = Input_GetKeySoundMask(KEY_PRESS); uiSoundMask &= ~FLGKEY_SHUTTER2; Input_SetKeySoundMask(KEY_PRESS, uiSoundMask); //#NT#2012/10/23#Philex Lin - begin // enable auto power off/USB detect timer // enable sound key tone KeyScan_EnableMisc(TRUE); //#NT#2012/10/23#Philex Lin - end //g_PlbData.VideoPBSpeed=PLB_FWD_MOV_1x; Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray); return NVTEVT_CONSUME; }
INT32 UIFlowWndPhoto_OnChildClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiSoundMask; /* Set key mask to self-original state */ Ux_FlushEventByRange(NVTEVT_KEY_EVT_START,NVTEVT_KEY_EVT_END); Input_SetKeyMask(KEY_PRESS, g_uiMaskKeyPress); Input_SetKeyMask(KEY_RELEASE, g_uiMaskKeyRelease); Input_SetKeyMask(KEY_CONTINUE, g_uiMaskKeyContinue); switch (gPhotoData.State) { case PHOTO_ST_WARNING_MENU: if(paramNum > 0) { if(paramArray[0] == NVTRET_ENTER_MENU) { /* Force to lock FD/SD functions before opening Menu */ FlowPhoto_ForceLockFdSd(); /* Create Menu window */ gPhotoData.State = PHOTO_ST_MENU; TM_SetMenu(&gPhotoMenu); Ux_OpenWindow(&MenuCommonItemCtrl, 0); return NVTEVT_CONSUME; } } gPhotoData.State = PHOTO_ST_VIEW; break; case PHOTO_ST_MENU: // disable shutter2 sound uiSoundMask = Input_GetKeySoundMask(KEY_PRESS); uiSoundMask &= ~FLGKEY_SHUTTER2; Input_SetKeySoundMask(KEY_PRESS, uiSoundMask); gPhotoData.State = PHOTO_ST_VIEW; // set image ratio here UIFlowWndPhoto_OnExeSetImageRatio(); // unloce AE/AWB FlowPhoto_InitStartupFuncs(); /* Set to preview mode */ UI_Show(UI_SHOW_PREVIEW, TRUE); /* close quick view image */ UI_Show(UI_SHOW_QUICKVIEW, FALSE); /* Resume key after normal capture completed */ Input_SetKeyMask(KEY_PRESS, g_uiMaskKeyPress); /* Set FD/SD functions againg after exiting Menu */ FlowPhoto_SetFdSdProc(TRUE); /* Update window info */ FlowPhoto_UpdateIcons(TRUE); break; } Ux_DefaultEvent(pCtrl,NVTEVT_CHILD_CLOSE,paramNum,paramArray); return NVTEVT_CONSUME; }