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_OnKeyMenu(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch(g_PlbData.State) { case PLB_ST_FULL: g_PlbData.State = PLB_ST_MENU; Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL); // Reset specific menu items SysSetFlag(FL_PROTECT, PROTECT_ONE); // Set Tab menu to Playback menu TM_SetMenu(&gPlaybackMenu); // Open common item menu Ux_OpenWindow(&MenuCommonItemCtrl, 0); break; } return NVTEVT_CONSUME; }
INT32 UIFlowWndMovie_OnChildClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch (gMovData.State) { case MOV_ST_WARNING_MENU: if(paramNum > 0) { if(paramArray[0] == NVTRET_ENTER_MENU) { /* Create Menu window */ gMovData.State = MOV_ST_MENU; TM_SetMenu(&gMovieMenu); Ux_OpenWindow(&MenuCommonItemCtrl, 0); return NVTEVT_CONSUME; } } gMovData.State = MOV_ST_VIEW; break; case MOV_ST_MENU: g_uiMaskKeyPress = MOVIE_KEY_PRESS_MASK; g_uiMaskKeyRelease = MOVIE_KEY_RELEASE_MASK; KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, g_uiMaskKeyPress); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, g_uiMaskKeyRelease); if (SysGetFlag(FL_MOVIE_MOTION_DET)==MOVIE_MOTIONDET_ON) { g_uiRecordIngMotionDet = TRUE; } else { g_uiRecordIngMotionDet = FALSE; } FlowMovie_UpdateIcons(TRUE); gMovData.State = MOV_ST_VIEW; break; } Ux_DefaultEvent(pCtrl,NVTEVT_CHILD_CLOSE,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; }
INT32 UIFlowWndMovie_OnKeyMenu(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiKeyAct; uiKeyAct = paramArray[0]; switch(uiKeyAct) { case NVTEVT_KEY_PRESS: switch(gMovData.State) { case MOV_ST_VIEW: case MOV_ST_VIEW|MOV_ST_ZOOM: KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_MASK_NULL); // Set Tab menu to Photo menu TM_SetMenu(&gMovieMenu); // Open common mix (Item + Option) menu Ux_OpenWindow((VControl *)(&MenuCommonItemCtrl), 0); gMovData.State = MOV_ST_MENU; break; case MOV_ST_REC: case MOV_ST_REC|MOV_ST_ZOOM: if (gbMoviFileLock == FALSE) { gbMoviFileLock = TRUE; //debug_err(("---SOS--FilesysSetFileLock --Cur-- : %d - %d---\r\n",SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID))); UxState_SetData(&UIFlowWndMovie_Status_LOCKCtrl,STATE_CURITEM,UIFlowWndMovie_Status_LOCK_ICON_LOCK); UxCtrl_SetShow(&UIFlowWndMovie_Status_LOCKCtrl, TRUE); } else { gbMoviFileLock = FALSE; //debug_err(("---SOS--FilesysSetFileLock --Cur-- : %d - %d---\r\n",SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID))); UxState_SetData(&UIFlowWndMovie_Status_LOCKCtrl,STATE_CURITEM,UIFlowWndMovie_Status_LOCK_ICON_LOCK); UxCtrl_SetShow(&UIFlowWndMovie_Status_LOCKCtrl, FALSE); } //case MOV_ST_REC: //case MOV_ST_REC|MOV_ST_ZOOM: //Ux_SendEvent(&UIMovieObjCtrl, NVTEVT_EXE_VIDEO_AUDIO, 1, !SysGetFlag(FL_MOVIE_AUDIO)); //FlowMovie_IconDrawMovieAudio(&UIFlowWndMovie_Status_MovieAudioCtrl); //break; } break; case FLGKEY_HOLD: switch(gMovData.State) { case MOV_ST_REC: case MOV_ST_REC|MOV_ST_ZOOM: if (gbMoviFileLock == FALSE) { gbMoviFileLock = TRUE; //debug_err(("---SOS--FilesysSetFileLock --Cur-- : %d - %d---\r\n",SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID))); UxState_SetData(&UIFlowWndMovie_Status_LOCKCtrl,STATE_CURITEM,UIFlowWndMovie_Status_LOCK_ICON_LOCK); UxCtrl_SetShow(&UIFlowWndMovie_Status_LOCKCtrl, TRUE); } else { gbMoviFileLock = FALSE; //debug_err(("---SOS--FilesysSetFileLock --Cur-- : %d - %d---\r\n",SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID))); UxState_SetData(&UIFlowWndMovie_Status_LOCKCtrl,STATE_CURITEM,UIFlowWndMovie_Status_LOCK_ICON_LOCK); UxCtrl_SetShow(&UIFlowWndMovie_Status_LOCKCtrl, FALSE); } break; } break; } Ux_DefaultEvent(pCtrl,NVTEVT_KEY_MENU,paramNum,paramArray); return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnChildClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { if(paramNum > 0) { //Return from thumbnail, magnify or delete mode and play current image again. switch(paramArray[0]) { case NVTRET_THUMBNAIL: case NVTRET_MAGNIFY: Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0); FlowPB_UpdateIcons(1); break; case NVTRET_DELETE: case NVTRET_DELETEALL: if(UIPlay_GetData(PLAY_FILENUM)==0) { if(!g_bUIFlowWndPlayNoImgWndOpened) { Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP); g_bUIFlowWndPlayNoImgWndOpened = TRUE; } } else { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0); FlowPB_UpdateIcons(1); } break; case NVTRET_ENTER_MENU: // Reset specific menu items SysSetFlag(FL_PROTECT, PROTECT_ONE); // Set Tab menu to Playback menu TM_SetMenu(&gPlaybackMenu); // Open common item menu Ux_OpenWindow(&MenuCommonItemCtrl, 0); g_bUIFlowWndPlayNoImgWndOpened = FALSE; break; } } else { if(UIPlay_GetData(PLAY_FILENUM)==0) { if(!g_bUIFlowWndPlayNoImgWndOpened) { Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP); g_bUIFlowWndPlayNoImgWndOpened = TRUE; } } else { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0); FlowPB_UpdateIcons(1); } } g_PlbData.State = PLB_ST_FULL; KeyScan_EnableAutoPoweroff(TRUE); KeyScan_EnableUSBDet(TRUE); KeyScan_EnableKeyTone(SysGetFlag(FL_BEEP)); // set mask key Ux_FlushEvent(); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, PLAY_KEY_PRESS_MASK); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, PLAY_KEY_RELEASE_MASK); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, PLAY_KEY_CONTINUE_MASK); Ux_DefaultEvent(pCtrl,NVTEVT_CHILD_CLOSE,paramNum,paramArray); return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnChildClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiStatus; //#NT#2012/12/27#Hideo Lin -begin //#NT#Fix close child window hang up as card removed if(Ux_IsForceCloseWindow()) { return NVTEVT_CONSUME; } //#NT#2012/12/27#Hideo Lin -end if(paramNum > 0) { //Return from thumbnail, magnify or delete mode and play current image again. switch(paramArray[0]) { case NVTRET_THUMBNAIL: case NVTRET_MAGNIFY: Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 2, PB_SINGLE_CURR, 1); FlowPB_UpdateIcons(1); UIFlowWndPlay_CheckStatus(); break; case NVTRET_DELETE: case NVTRET_DELETEALL: uiStatus = AppPlay_GetData(PLAY_PBSTATUS); if (uiStatus & PB_STA_NOIMAGE) //if(DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT)==0) { if(!g_bUIFlowWndPlayNoImgWndOpened) { Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP); g_bUIFlowWndPlayNoImgWndOpened = TRUE; } } else { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 2, PB_SINGLE_CURR, 1); FlowPB_UpdateIcons(1); UIFlowWndPlay_CheckStatus(); } break; case NVTRET_ENTER_MENU: // Reset specific menu items SysSetFlag(FL_PROTECT, PROTECT_ONE); // Set Tab menu to Playback menu TM_SetMenu(&gPlaybackMenu); // Open common item menu Ux_OpenWindow(&MenuCommonItemCtrl, 0); g_bUIFlowWndPlayNoImgWndOpened = FALSE; break; case NVTRET_WARNING: Ux_PostEvent(paramArray[1], 0); break; } } else { uiStatus = AppPlay_GetData(PLAY_PBSTATUS); if (uiStatus & PB_STA_NOIMAGE) //if(DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT)==0) { if(!g_bUIFlowWndPlayNoImgWndOpened) { Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP); g_bUIFlowWndPlayNoImgWndOpened = TRUE; } } else { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 2, PB_SINGLE_CURR, 1); FlowPB_UpdateIcons(1); UIFlowWndPlay_CheckStatus(); } } g_PlbData.State = PLB_ST_FULL; //#NT#2012/10/23#Philex Lin - begin // enable auto power off/USB detect timer // enable sound key tone flag KeyScan_EnableMisc(TRUE); //#NT#2012/10/23#Philex Lin - end // set mask key //Ux_FlushEvent(); 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_CHILD_CLOSE,paramNum,paramArray); return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnKeyMenu(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch(g_PlbData.State) { case PLB_ST_FULL: g_PlbData.State = PLB_ST_MENU; Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL); // Reset specific menu items SysSetFlag(FL_PROTECT, PROTECT_ONE); // Set Tab menu to Playback menu TM_SetMenu(&gPlaybackMenu); // Open common item menu Ux_OpenWindow(&MenuCommonItemCtrl, 0); break; #if(_MODEL_DSC_== _MODEL_DUAL_NAZHIDA_) case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: //#NT#2012/08/31#Calvin Chang#Porting Media Flow -begin 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); //#NT#2012/10/23#Philex Lin - begin // enable auto power off/USB detect timer // enable key tone flag KeyScan_EnableMisc(TRUE); //#NT#2012/10/23#Philex Lin - end // stop scan //if (SxTimer_GetFuncActive(SX_TIMER_DET_STRG_ID)==0) // SxTimer_SetFuncActive(SX_TIMER_DET_STRG_ID, TRUE); if (SxTimer_GetFuncActive(SX_TIMER_DET_SYSTEM_BUSY_ID)==0) SxTimer_SetFuncActive(SX_TIMER_DET_SYSTEM_BUSY_ID, TRUE); if (gphUIFlowMovPlay_Filehdl) { FileSys_CloseFile(gphUIFlowMovPlay_Filehdl); gphUIFlowMovPlay_Filehdl = NULL; } // Play 1st video frame image Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 1, PB_SINGLE_CURR); //#NT#2012/08/31#Calvin Chang -end g_PlbData.State = PLB_ST_MENU; Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL); // Reset specific menu items SysSetFlag(FL_PROTECT, PROTECT_ONE); // Set Tab menu to Playback menu TM_SetMenu(&gPlaybackMenu); // Open common item menu Ux_OpenWindow(&MenuCommonItemCtrl, 0); break; #endif } return NVTEVT_CONSUME; }