diff options
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/Window.cpp')
-rw-r--r-- | src/libs/7zip/unix/CPP/Windows/Window.cpp | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/Window.cpp b/src/libs/7zip/unix/CPP/Windows/Window.cpp deleted file mode 100644 index e92228c70..000000000 --- a/src/libs/7zip/unix/CPP/Windows/Window.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// Windows/Window.cpp - -#include "StdAfx.h" - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -// for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWidgets headers) -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#undef _WIN32 - -#ifndef _UNICODE -#include "Common/StringConvert.h" -#endif -#include "Windows/Window.h" - -void verify_main_thread(void); - -class LockGUI -{ - bool _IsMain; - public: - LockGUI() { - verify_main_thread(); - - _IsMain = wxThread::IsMain(); - if (!_IsMain) { - printf("LockGUI-Windows\n"); - abort(); // FIXME wxMutexGuiEnter(); - } - } - ~LockGUI() { if (!_IsMain) wxMutexGuiLeave(); } -}; - -namespace NWindows { - -HWND GetDlgItem(HWND dialogWindow, int ControlID) -{ - LockGUI lock; - if (dialogWindow) return dialogWindow->FindWindow(ControlID); - return 0; -} - -void MySetWindowText(HWND wnd, LPCWSTR s) -{ - if (wnd == 0) return; - - LockGUI lock; - - wxString str = s; - /* - int id = wnd->GetId(); - if ( (id != wxID_OK) && (id != wxID_CANCEL) && (id != wxID_HELP) && (id != wxID_YES) && (id != wxID_NO)) - */ - { - wnd->SetLabel(str); - } -} - - bool CWindow::GetText(CSysString &s) - { - wxString str; - { - LockGUI lock; - str = _window->GetLabel(); - } - s = str; - return true; - } - - bool CWindow::IsEnabled() - { - LockGUI lock; - return _window->IsEnabled(); - } -} - -////////////////////////////////// Windows Compatibility -#include <sys/resource.h> - -void Sleep(unsigned millisec) -{ - wxMilliSleep(millisec); -} - -t_processID GetCurrentProcess(void) { - return getpid(); -} - -void SetPriorityClass(t_processID pid , int priority) { - setpriority(PRIO_PROCESS,pid,priority); -} - |