LRESULT TaskWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { if(msg == WM_USER && wParam == 4) { //Navigation bar text changed HWND newWindow = (HWND)lParam; if(newWindow != SDL_Window) { TCHAR str[32]; str[0] = 0; if(IsWindow(newWindow) && (IsSmartphoneDevice() || GetWindowText(newWindow, str, 32) > 0)) { //In the smartphone phone call alerts don't put text on the title bar //In Pocket PC must test valid window writeDebugInfo("WM_USER, 4"); Suspend(newWindow); } } } else if(msg == WM_USER+7) { HWND msgWindow = (HWND)wParam; if( msgWindow != SDL_Window && ((lParam & SHFS_SHOWTASKBAR) || (lParam & SHFS_SHOWSTARTICON) || (lParam & SHFS_SHOWSIPBUTTON)) ) { writeDebugInfo("WM_USER+7"); Suspend(msgWindow); } } /*else if(msg == WM_WINDOWPOSCHANGED) { LPWINDOWPOS lpwp = (LPWINDOWPOS)lParam; if(lpwp && lpwp->flags & SWP_SHOWWINDOW) { //Some application change the task bar visibility PostMessage(SDL_Window, WM_CANCELMODE , 0, 0); { FILE *arq = fopen("oi.txt", "a+"); if(arq) { fprintf(arq, "3\n"); fclose(arq); } } } }*/ return CallWindowProc(g_fnProcTask, hWnd, msg, wParam, lParam); }
void TextAutosizer::writeClusterDebugInfo(Cluster* cluster) { String explanation = ""; if (cluster->m_flags & SUPPRESSING) { explanation = "[suppressed]"; } else if (!(cluster->m_flags & (INDEPENDENT | WIDER_OR_NARROWER))) { explanation = "[inherited]"; } else if (cluster->m_supercluster) { explanation = "[supercluster]"; } else if (!clusterHasEnoughTextToAutosize(cluster)) { explanation = "[insufficient-text]"; } else { const LayoutBlock* widthProvider = clusterWidthProvider(cluster->m_root); if (cluster->m_hasTableAncestor && cluster->m_multiplier < multiplierFromBlock(widthProvider)) { explanation = "[table-ancestor-limited]"; } else { explanation = String::format("[from width %d of %s]", static_cast<int>(widthFromBlock(widthProvider)), widthProvider->debugName().utf8().data()); } } String pageInfo = ""; if (cluster->m_root->isLayoutView()) { pageInfo = String::format("; pageinfo: bm %f * (lw %d / fw %d)", m_pageInfo.m_baseMultiplier, m_pageInfo.m_layoutWidth, m_pageInfo.m_frameWidth); } float multiplier = cluster->m_flags & SUPPRESSING ? 1.0 : cluster->m_multiplier; writeDebugInfo(const_cast<LayoutBlock*>(cluster->m_root), AtomicString(String::format("cluster: %f %s%s", multiplier, explanation.utf8().data(), pageInfo.utf8().data()))); }
void RegisterIncomingCallNotification(HWND wnd) { HRESULT hr; tRegistryNotifyWindow lRegistryNotifyWindow = NULL; HINSTANCE hInstAygShell = NULL; hInstAygShell = LoadLibrary( _T( "AygShell.dll" ) ); if(hInstAygShell) { lRegistryNotifyWindow = GetProcAddress(hInstAygShell, _T( "RegistryNotifyWindow" ) ); if(lRegistryNotifyWindow) { hr = lRegistryNotifyWindow( SN_PHONEINCOMINGCALL_ROOT, //defined in snapi.h SN_PHONEINCOMINGCALL_PATH, SN_PHONEINCOMINGCALL_VALUE, wnd, //handle to our window to receive msg WM_USER+5123, //app defined message to send WM_USER+5124, //app defined value NULL, &hregNotifyPhone ); //Don’t forget to close this if(hregNotifyPhone && hr == S_OK) writeDebugInfo("Created RegistryNotifyWindow notification"); } //Load the AygShell when was necessary (the code freezes if hold the reference) FreeLibrary(hInstAygShell); } }
void GAPI_VideoQuit(_THIS) { writeDebugInfo("GAPI_VideoQuit"); /* Destroy the window and everything associated with it */ if ( SDL_Window ) { /* Delete the screen bitmap (also frees screen->pixels) */ if ( this->screen ) { #ifdef HAVE_OPENGL //maks if ( this->screen->flags & SDL_OPENGL ) { WIN_GL_ShutDown(this); } #endif if ( this->screen->flags & SDL_FULLSCREEN ) { SHFullScreen(SDL_Window, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON); bShowTaskBar = 1; } #ifndef NO_CHANGEDISPLAYSETTINGS if ( this->screen->flags & SDL_FULLSCREEN ) { ChangeDisplaySettings(NULL, 0); ShowWindow(SDL_Window, SW_HIDE); } #endif this->screen->pixels = NULL; } GAPI_QuitGamma(this); GAPI_DestroyWindow(this); FlushMessageQueue(); SDL_Window = NULL; CloseGAPI(); } if(gxHandle) { FreeLibrary(gxHandle); gxHandle = NULL; } //Make sure restore task bar SHFullScreen(GetForegroundWindow(), SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON); }
void CloseIncomingCallNotification() { tRegistryCloseNotification lRegistryCloseNotification = NULL; HINSTANCE hInstAygShell = NULL; if(hregNotifyPhone) { hInstAygShell = LoadLibrary( _T( "AygShell.dll" ) ); if(hInstAygShell) { lRegistryCloseNotification = GetProcAddress(hInstAygShell, _T( "RegistryCloseNotification" ) ); if(lRegistryCloseNotification) { lRegistryCloseNotification(hregNotifyPhone); hregNotifyPhone = NULL; writeDebugInfo("CloseIncomingCallNotification"); } FreeLibrary(hInstAygShell); } } }
int GAPI_ShowTaskBar() { if(!bShowTaskBar) { int topBorder, bottomBorder; RECT rc; //Take screen shot CreateBitMap(); //Need close the GAPI to give key control back to the system CloseGAPI(); //ShowWindow(SDL_Window, SW_HIDE); SHFullScreen(SDL_Window, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON); bShowTaskBar = 1; GetTopBottomBorder(&topBorder, &bottomBorder); SDL_WM_SetCaption(GetGameTitle(), NULL); SHDoneButton(SDL_Window, SHDB_HIDE); { //http://forum.soft32.com/pda/SHCreateMenuBar-resource-file-ftopict47431.html SHMENUBARINFO cbi; memset(&cbi, 0, sizeof(SHMENUBARINFO)); menuBar = NULL; cbi.cbSize = sizeof(SHMENUBARINFO); cbi.hwndParent = SDL_Window; cbi.hInstRes = SDL_Instance; cbi.nToolBarId = IDR_MENUBAR; //cbi.dwFlags = /*SHCMBF_EMPTYBAR |*/ SHCMBF_HIDESIPBUTTON | SHCMBF_HMENU; //Don't use this with the Smartphone menu if(SHCreateMenuBar(&cbi)) { menuBar = (HMENU)cbi.hwndMB; } } //http://msdn.microsoft.com/en-us/library/aa453694.aspx SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, FALSE); MoveWindow(SDL_Window, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE); //Show the game menu, but not the incoming call menu SetWindowPos(GetForegroundWindow(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE); //Show incoming call window SetWindowPos(SDL_Window, HWND_NOTOPMOST, /*0, 0, 1, 1*/sdlWindowSize.left, sdlWindowSize.top + topBorder, sdlWindowSize.right, sdlWindowSize.bottom - (topBorder + bottomBorder), SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_SHOWWINDOW); //Allow to show the incomming call window if(menuBar) writeDebugInfo("GAPI_ShowTaskBar Menu Ok"); else { char buf[64]; sprintf(buf, "GAPI_ShowTaskBar No Menu, Error: %ld", GetLastError()); writeDebugInfo(buf); } return 1; } return 0; }