X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6ba47d9973bbb113257401b6eeb82b23da7acc4..10769d8c47c21fe0ec5034726791a5ad4cf19475:/include/wx/utils.h?ds=sidebyside diff --git a/include/wx/utils.h b/include/wx/utils.h index 73737d91dc..4b713c73a6 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -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(); @@ -381,6 +390,8 @@ public: private: wxWindowList *m_winDisabled; + + DECLARE_NO_COPY_CLASS(wxWindowDisabler) }; // ---------------------------------------------------------------------------- @@ -479,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;