X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be52b34172dede7460990c54b9f7e2dad3a6f876..01cb1c26171efc494b94d77e4351362bb0eb2e7d:/include/wx/utils.h?ds=inline diff --git a/include/wx/utils.h b/include/wx/utils.h index 2b984a8d4c..076d32c6d7 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -16,7 +16,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "utils.h" #endif @@ -173,7 +173,7 @@ enum // If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the // process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on // failure and the PID of the launched process if ok. -WXDLLEXPORT long wxExecute(char **argv, int flags = wxEXEC_ASYNC, +WXDLLEXPORT long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); WXDLLEXPORT long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); @@ -226,7 +226,7 @@ enum wxShutdownFlags wxSHUTDOWN_REBOOT // shutdown and reboot }; -// Shutdown or reboot the PC +// Shutdown or reboot the PC WXDLLEXPORT bool wxShutdown(wxShutdownFlags wFlags); // send the given signal to the process (only NONE and KILL are supported under @@ -251,6 +251,9 @@ WXDLLEXPORT void wxSleep(int nSecs); // Sleep for a given amount of milliseconds WXDLLEXPORT void wxUsleep(unsigned long milliseconds); +// Get the process id of the current process +WXDLLEXPORT unsigned long wxGetProcessId(); + // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) WXDLLEXPORT long wxGetFreeMemory(); @@ -332,14 +335,6 @@ WXDLLEXPORT wxAcceleratorEntry *wxGetAccelFromString(const wxString& label); // Window search // ---------------------------------------------------------------------------- -// Find the window/widget with the given title or label. -// Pass a parent to begin the search from, or NULL to look through -// all windows. -WXDLLEXPORT wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL); - -// Find window by name, and if that fails, by label. -WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL); - // Returns menu item id or -1 if none. WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString); @@ -348,10 +343,24 @@ WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, con WXDLLEXPORT wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt); WXDLLEXPORT wxWindow* wxFindWindowAtPoint(const wxPoint& pt); +// NB: this function is obsolete, use wxWindow::FindWindowByLabel() instead +// +// Find the window/widget with the given title or label. +// Pass a parent to begin the search from, or NULL to look through +// all windows. +WXDLLEXPORT wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL); + +// NB: this function is obsolete, use wxWindow::FindWindowByName() instead +// +// Find window by name, and if that fails, by label. +WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL); + // ---------------------------------------------------------------------------- // Message/event queue helpers // ---------------------------------------------------------------------------- +// NB: these functions are obsolete, please use wxApp methods instead! + // Yield to other apps/messages WXDLLEXPORT bool wxYield(); @@ -375,14 +384,14 @@ WXDLLEXPORT void wxFlushEvents(); // ctor and enables them back in its dtor class WXDLLEXPORT wxWindowDisabler { - DECLARE_NO_COPY_CLASS(wxWindowDisabler) - public: wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)NULL); ~wxWindowDisabler(); private: wxWindowList *m_winDisabled; + + DECLARE_NO_COPY_CLASS(wxWindowDisabler) }; // ---------------------------------------------------------------------------- @@ -481,7 +490,7 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); // Format a message on the standard error (UNIX) or the debugging // stream (Windows) -WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...); +WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1; // Non-fatal error (continues) WXDLLEXPORT_DATA(extern const wxChar*) wxInternalErrorStr;