]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/utils.h
Improved idle event processing.
[wxWidgets.git] / include / wx / utils.h
index 988754c1b68370a0c45efa98e7da91c595d03938..fa670285168444777c4f45a9efa18e5f4bfc903b 100644 (file)
 // 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
 
 #include "wx/object.h"
 #include "wx/list.h"
 #include "wx/filefn.h"
-#include "wx/arrstr.h"
+
+class WXDLLIMPEXP_BASE wxArrayString;
 
 // need this for wxGetDiskSpace() as we can't, unfortunately, forward declare
 // wxLongLong
@@ -62,11 +70,6 @@ class WXDLLIMPEXP_BASE wxPoint;
 WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
 #endif
 
-#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
 #define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
 
@@ -77,6 +80,11 @@ WXDLLIMPEXP_BASE bool StringMatch(const wxChar *one, const wxChar *two, bool sub
 // Sound the bell
 WXDLLIMPEXP_BASE void wxBell();
 
+#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) || defined(__X__) 
+       // Get the state of a key (true if pressed, false if not)
+       WXDLLIMPEXP_BASE bool wxGetKeyState(wxKeyCode key);
+#endif
+
 // Get OS description as a user-readable string
 WXDLLIMPEXP_BASE wxString wxGetOsDescription();
 
@@ -105,15 +113,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();