X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bddd7a8d8953cf4c09e56c13e1bfcc594ba0267e..553c5bcc3ab65e8b8a002dc6d5f51cba4f39292c:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index f393cbffb5..41577006b3 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -16,7 +16,14 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__) +// Some older compilers (such as EMX) cannot handle +// #pragma interface/implementation correctly, iff +// #pragma implementation is used in _two_ translation +// units (as created by e.g. event.cpp compiled for +// libwx_base and event.cpp compiled for libwx_gui_core). +// So we must not use those pragmas for those compilers in +// such files. #pragma interface "utils.h" #endif @@ -24,6 +31,8 @@ #include "wx/list.h" #include "wx/filefn.h" +class WXDLLIMPEXP_BASE wxArrayString; + // need this for wxGetDiskSpace() as we can't, unfortunately, forward declare // wxLongLong #include "wx/longlong.h" @@ -56,18 +65,9 @@ class WXDLLIMPEXP_BASE wxPoint; // String functions (deprecated, use wxString) // ---------------------------------------------------------------------------- -// Useful buffer (FIXME VZ: To be removed!!!) -// Now only needed in MSW port -#if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXMGL__) && !defined(__WXMAC__) -WXDLLIMPEXP_DATA_BASE(extern wxChar*) wxBuffer; -#endif - // Make a copy of this string using 'new' +#if WXWIN_COMPATIBILITY_2_4 WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s); - -#if WXWIN_COMPATIBILITY_2 -// Matches string one within string two regardless of case -WXDLLIMPEXP_BASE bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE); #endif // A shorter way of using strcmp @@ -97,6 +97,16 @@ WXDLLIMPEXP_BASE wxString wxGetDataDir(); #if wxUSE_GUI +#if defined(__WXMSW__) || defined(__WXMAC__) + // Get the state of a key (true if pressed, false if not) + // This is generally most useful getting the state of + // Caps Lock, Num Lock and Scroll Lock... + + // Note - There is a X11/GTK version which will be here + // soon + WXDLLEXPORT bool wxGetKeyState(wxKeyCode key); +#endif + // Don't synthesize KeyUp events holding down a key and producing // KeyDown events with autorepeat. On by default and always on // in wxMSW. @@ -108,15 +118,9 @@ WXDLLEXPORT bool wxSetDetectableAutoRepeat( bool flag ); // Generate a unique ID WXDLLEXPORT long wxNewId(); -#if !defined(NewId) && defined(WXWIN_COMPATIBILITY) - #define NewId wxNewId -#endif // Ensure subsequent IDs don't clash with this one WXDLLEXPORT void wxRegisterId(long id); -#if !defined(RegisterId) && defined(WXWIN_COMPATIBILITY) - #define RegisterId wxRegisterId -#endif // Return the current ID WXDLLEXPORT long wxGetCurrentId();