X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d08d71a8441b5a8d20ab1f71cc76d5486e667543..d51305e81eb593bedd92cda864671e15209c268f:/include/wx/snglinst.h diff --git a/include/wx/snglinst.h b/include/wx/snglinst.h index 817e7d45fe..5c6f33fe1c 100644 --- a/include/wx/snglinst.h +++ b/include/wx/snglinst.h @@ -13,7 +13,7 @@ #ifndef _WX_SNGLINST_H_ #define _WX_SNGLINST_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "snglinst.h" #endif @@ -23,7 +23,7 @@ // wxSingleInstanceChecker // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxSingleInstanceChecker +class WXDLLIMPEXP_BASE wxSingleInstanceChecker { public: // default ctor, use Create() after it @@ -44,22 +44,13 @@ public: // path is optional and is ignored under Win32 and used as the directory to // create the lock file in under Unix (default is wxGetHomeDir()) // - // returns FALSE if initialization failed, it doesn't mean that another + // returns false if initialization failed, it doesn't mean that another // instance is running - use IsAnotherRunning() to check it bool Create(const wxString& name, const wxString& path = wxEmptyString); // is another copy of this program already running? bool IsAnotherRunning() const; - -#ifdef __WXMSW__ - // Activates Previous Instance if a window whose Title contains the search string is found - bool ActivatePrevInstance(const wxString & sSearch); - - // Activates Previous Instance and passes CommandLine to wxCommandLineEvent - // if a window with matching Title is found - bool PassCommandLineToPrevInstance(const wxString & sSearch, const wxString & sCmdLine); -#endif - + // dtor is not virtual, this class is not meant to be used polymorphically ~wxSingleInstanceChecker(); @@ -68,7 +59,9 @@ private: void Init() { m_impl = NULL; } // the implementation details (platform specific) - class WXDLLEXPORT wxSingleInstanceCheckerImpl *m_impl; + class WXDLLIMPEXP_BASE wxSingleInstanceCheckerImpl *m_impl; + + DECLARE_NO_COPY_CLASS(wxSingleInstanceChecker) }; #endif // wxUSE_SNGLINST_CHECKER