X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1cb41536a6106968b546cdba8d3d89805f802bc..b6d5d4548c2c8b984314650dcb96522fedc51d86:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index 0d51ae667b..d91baabc48 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -6,7 +6,7 @@ // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_UTILSH__ @@ -16,7 +16,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "utils.h" #endif @@ -57,16 +57,18 @@ class WXDLLEXPORT wxPoint; // ---------------------------------------------------------------------------- // Useful buffer (FIXME VZ: To be removed!!!) -// Now only needed in Mac and MSW ports -#if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXMGL__) +// Now only needed in MSW port +#if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXMGL__) && !defined(__WXMAC__) WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; #endif // Make a copy of this string using 'new' WXDLLEXPORT wxChar* copystring(const wxChar *s); +#if WXWIN_COMPATIBILITY_2 // Matches string one within string two regardless of case WXDLLEXPORT bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE); +#endif // A shorter way of using strcmp #define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0)) @@ -125,6 +127,9 @@ WXDLLEXPORT long wxGetCurrentId(); // Various conversions // ---------------------------------------------------------------------------- +// these functions are deprecated, use wxString methods instead! +#if WXWIN_COMPATIBILITY_2_4 + WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr; WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr; @@ -137,6 +142,8 @@ WXDLLEXPORT void StringToLong(const wxChar *s, long *number); WXDLLEXPORT wxChar* IntToString(int number); WXDLLEXPORT wxChar* LongToString(long number); +#endif // WXWIN_COMPATIBILITY_2_4 + // Convert 2-digit hex number to decimal WXDLLEXPORT int wxHexToDec(const wxString& buf); @@ -173,7 +180,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); @@ -368,7 +375,7 @@ WXDLLEXPORT bool wxYield(); WXDLLEXPORT bool wxYieldIfNeeded(); // Yield to other apps/messages and disable user input -WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL); +WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = FALSE); // Enable or disable input to all top level windows WXDLLEXPORT void wxEnableTopLevelWindows(bool enable = TRUE); @@ -490,7 +497,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;