void DialogWindowHide (void) { if (!FBDialogWindow || !FBDialogWindow->isVisible || !FBDialogProfile) return; if (FBDialogWindow->Multiple) { if (FBDialogWindow->MultipleOSDSaveBox) { TAP_Osd_RestoreBox (FBDialogWindow->OSDRgn, 0, 0, GetOSDRegionWidth(FBDialogWindow->OSDRgn), GetOSDRegionHeight(FBDialogWindow->OSDRgn), FBDialogWindow->MultipleOSDSaveBox); TAP_MemFree (FBDialogWindow->MultipleOSDSaveBox); FBDialogWindow->MultipleOSDSaveBox = NULL; } FreeOSDRegion(FBDialogWindow->OSDRgn); // doesn't wipe out } else { DialogWindowAlpha(0); TAP_Osd_FillBox (FBDialogWindow->OSDRgn, 0, 0, FBDialogWindow->OSDWidth, FBDialogWindow->OSDHeight, 0); TAP_Osd_SetTransparency (FBDialogWindow->OSDRgn, 255); TAP_Osd_Delete (FBDialogWindow->OSDRgn); } FBDialogWindow->OSDRgn = 0; FBDialogWindow->isVisible = FALSE; if (FBDialogWindow->isNormalMode) TAP_EnterNormal(); }
void OSDMenuMessageBoxDestroyNoOSDUpdate(void) { TRACEENTER(); tOSDMapInfo *OSDMapInfo; if(MessageBoxOSDRgn) { TAP_Osd_Delete(MessageBoxOSDRgn); MessageBoxOSDRgn = 0; if(InfoBoxSaveArea) { if(MyOSDRgn) { OSDMapInfo = (tOSDMapInfo*) FIS_vOsdMap(); if(OSDMapInfo) TAP_Osd_RestoreBox(MyOSDRgn, InfoBoxSaveAreaX - OSDMapInfo[MyOSDRgn].x, InfoBoxSaveAreaY - OSDMapInfo[MyOSDRgn].y, _InfoBox_Gd.width, _InfoBox_Gd.height, InfoBoxSaveArea); } else if(OSDRgn) TAP_Osd_RestoreBox(OSDRgn, InfoBoxSaveAreaX, InfoBoxSaveAreaY, _InfoBox_Gd.width, _InfoBox_Gd.height, InfoBoxSaveArea); TAP_MemFree(InfoBoxSaveArea); InfoBoxSaveArea = NULL; MyOSDRgn = 0; } } OSDMenuFreeStdFonts(); TRACEEXIT(); }
void OptionsMenu_Close() { free(optionTextBuffer); optionTextBuffer = 0; TAP_Win_Delete( &window ); TAP_Osd_Delete( rgn ); rgn = 0; TAP_EnterNormal(); }
void GuideSortOrder_CreateGradients( void ){ word rgn; GuideSortOrder_MemFree(); if( Settings_GradientFactor > 0 ){ rgn = TAP_Osd_Create(0, 0, GuideSortOrder_Option_W, GuideSortOrder_Option_H, 0, OSD_Flag_MemRgn); // Main default item createGradient(rgn, GuideSortOrder_Option_W, GuideSortOrder_Option_H, Settings_GradientFactor, DISPLAY_ITEM); GuideSortOrder_ItemBase = TAP_Osd_SaveBox(rgn, 0, 0, GuideSortOrder_Option_W, GuideSortOrder_Option_H); createGradient(rgn, GuideSortOrder_Option_W, GuideSortOrder_Option_H, Settings_GradientFactor, DISPLAY_ITEMSELECTED); GuideSortOrder_ItemHigh = TAP_Osd_SaveBox(rgn, 0, 0, GuideSortOrder_Option_W, GuideSortOrder_Option_H); TAP_Osd_Delete(rgn); } }
Tapplication::~Tapplication() { TRACE("~Tapplication\n"); // do not clean up any outstanding pages // they may have references to the application, // which is no longer fully alive // DiscardTheApplication has done this TAP_Osd_Delete( screenRgn ); screenRgn = 0; delete m_pTaskManager; // Clear the global TAP object pointer tap = 0; TRACE("~Tapplication finished\n"); }
ListPage::~ListPage() { TRACE("Started destroying list page\n"); DiscardItems(); for (unsigned int i = 0; i<m_columnCount; i++) delete m_columnInfo[i]; TRACE("Deleted columns\n"); m_iPageCount--; if (m_iPageCount == 0) { if (m_osdRegionIndex != 0) TAP_Osd_Delete(m_osdRegionIndex); m_osdRegionIndex = 0; } TRACE("Finished destroying list page\n"); }
void ShowMessageWin (char* lpMessage, char* lpMessage1) { int rgn; // stores rgn-handle for osd dword w; // stores width of message-text rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, FALSE ); // create rgn-handle w = TAP_Osd_GetW( lpMessage, 0, FNT_Size_1926 ) + 10; // calculate width of message if (TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10>w) { w = TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10; // calculate width of message } if (w > 720) w = 720; // if message is to long TAP_Osd_FillBox(rgn, (720-w)/2-5, 265, w+10, 62, RGB(19,19,19) ); // draw background-box for border TAP_Osd_PutS(rgn, (720-w)/2, 270, (720+w)/2, lpMessage, // show message RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926, FALSE, ALIGN_CENTER); TAP_Osd_PutS(rgn, (720-w)/2, 270+26, (720+w)/2, lpMessage1, // show message RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926,FALSE, ALIGN_CENTER); TAP_Delay(200); // show it for 2 seconds TAP_Osd_Delete(rgn); // release rgn-handle }
//----------------------------------------------------------------------- // void CloseArchiveMoveWindow(void) { int index; appendToLogfile("CloseArchiveMoveWindow: Started.", INFO); moveWindowShowing = FALSE; TAP_Osd_RestoreBox(rgn, MOVE_WINDOW_X, MOVE_WINDOW_Y, MOVE_WINDOW_W, MOVE_WINDOW_H, moveWindowCopy); TAP_MemFree(moveWindowCopy); // Free memory allocated to storing old screen area. TAP_Osd_Delete(moveRgn); // Free memory allocated to virtual screen area. // Release any memory allocated to the "moveFiles" array. for ( index=1; index<=numberOfDestinationFolders ; index++) { if (moveFiles[index] != NULL) { TAP_MemFree(moveFiles[index]); // Free any previously allocated memory moveFiles[index] = NULL; // Set the pointer to NULL so that it's all cleared. } } appendToLogfile("CloseArchiveMoveWindow: Finished.", INFO); }
//--------------------------------------- ShowMessageWin -------------------------------- // void ShowMessageWin (char* lpMessage, char* lpMessage1, dword dwDelay) { dword rgn; // stores rgn-handle for osd dword w; // stores width of message-text rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, FALSE ); // create rgn-handle //rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, OSD_Flag_Plane2 ); // create rgn-handle w = TAP_Osd_GetW( lpMessage, 0, FNT_Size_1926 ) + 10; // calculate width of message if (TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10>w) w = TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10; // if second message is larger, calculate new width of message if (w > 720) w = 720; // if message is to long TAP_Osd_FillBox(rgn, (720-w)/2-5, 265, w+10, 62, RGB(19,19,19) ); // draw background-box for border TAP_Osd_PutS(rgn, (720-w)/2, 270, (720+w)/2, lpMessage, RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926, FALSE, ALIGN_CENTER); // show 1. message TAP_Osd_PutS(rgn, (720-w)/2, 270+26, (720+w)/2, lpMessage1, RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926, FALSE, ALIGN_CENTER); // show 2. message TAP_Delay(dwDelay); // show it for dwDelay /100 seconds TAP_Osd_Delete(rgn); // release rgn-handle }
Region::~Region() { if ( region ) TAP_Osd_Delete( region ); }
dword TAP_EventHandler( word event, dword param1, dword param2 ) { static int count = 0, err1, filelen; static byte flip = 0; int i, y; const int LINE_H = 21; const int STR_COUNT = 21; dword t1, t2; char strings[21][40] = { {"Test ajJsjjOjsj"}, {"qUIck tESt"}, {"ma"}, {"keяд"}, {"<< Nelonen >>"} , {"03:20 "}, {" leading SPACE"}, {"Test ajJsjjOjsj"}, {"qUIck tESt"}, {"ma"}, {"ke"}, {"<< Nelonen >>"} , {"03:20 "}, {" leading SPACE"}, {"Test ajJsjjOjsj"}, {"qUIck tESt"}, {"ma"}, {"ke"}, {"<< Nelonen >>"} , {"03:20 "}, {" leading SPACE"} }; char msg[64]; if( event == EVT_KEY ) { if ( param1 == RKEY_Exit) { TAP_Osd_SetTransparency(rgn, 0xFF - transparency_orig); Delete_Font(&font0); Delete_Font(&font1); Delete_Font(&font2); TAP_Osd_Delete( rgn ); #ifdef DLALLOC dlmalloc_exit(); #endif TAP_EnterNormal(); TAP_Exit(); return 0; } if ( param1 == RKEY_1) { TAP_ExitNormal(); TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue); t1 = TAP_GetTick(); y = 20; for (i = 0; i < STR_COUNT; i++, y+=LINE_H) { TAP_Osd_PutS_Font(rgn, 50, y, 199, strings[i], COLOR_Red, COLOR_White, &font0, ALIGN_LEFT); TAP_Osd_PutS_Font(rgn, 200, y, 349, strings[i], COLOR_Red, COLOR_White, &font1, ALIGN_LEFT); TAP_Osd_PutS_Font(rgn, 350, y, 499, strings[i], COLOR_Red, COLOR_White, &font2, ALIGN_LEFT); } t2 = TAP_GetTick() - t1; TAP_SPrint(msg, "Ticks: %d", t2); TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT); return 0; } if ( param1 == RKEY_2) { TAP_ExitNormal(); TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue); t1 = TAP_GetTick(); y = 20; for (i = 0; i < STR_COUNT; i++, y+=LINE_H) { TAP_Osd_PutS_FontL(rgn, 50, y, 199, strings[i], &font0, ALIGN_LEFT); TAP_Osd_PutS_FontL(rgn, 200, y, 349, strings[i], &font1, ALIGN_LEFT); TAP_Osd_PutS_FontL(rgn, 350, y, 499, strings[i], &font2, ALIGN_LEFT); } t2 = TAP_GetTick() - t1; TAP_SPrint(msg, "Ticks: %d", t2); TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT); return 0; } if ( param1 == RKEY_3) { TAP_ExitNormal(); TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue); t1 = TAP_GetTick(); y = 20; for (i = 0; i < STR_COUNT; i++, y+=LINE_H) { TAP_Osd_PutS_FontEx(rgn, 50, y, 199, 19, 2, strings[i], COLOR_Red, COLOR_White, &font0, ALIGN_LEFT); TAP_Osd_PutS_FontEx(rgn, 200, y, 349, 19, 2, strings[i], COLOR_Red, COLOR_White, &font1, ALIGN_LEFT); TAP_Osd_PutS_FontEx(rgn, 350, y, 499, 19, 2, strings[i], COLOR_Red, COLOR_White, &font2, ALIGN_LEFT); } t2 = TAP_GetTick() - t1; TAP_SPrint(msg, "Ticks: %d", t2); TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT); return 0; } if ( param1 == RKEY_4) { TAP_ExitNormal(); TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue); t1 = TAP_GetTick(); y = 20; for (i = 0; i < STR_COUNT; i++, y+=LINE_H) { TAP_Osd_PutS(rgn, 50, y, 199, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT); TAP_Osd_PutS(rgn, 200, y, 349, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT); TAP_Osd_PutS(rgn, 350, y, 499, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT); } t2 = TAP_GetTick() - t1; TAP_SPrint(msg, "Ticks: %d", t2); TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT); return 0; } } return param1;//event; }
// // Close the logfile. // void closeLogfile() { TAP_Osd_Delete( logRgn ); }
void ExitRoutine( void ) { schDispWindowClose(); TAP_Osd_Delete( rgn ); TAP_EnterNormal(); }