]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/log.h
Applied SetForegorund colour patch for GTK2.
[wxWidgets.git] / include / wx / log.h
index 8dda8c390a46485f1cc77c969d96514027e8dcfc..4f68880dd3952e95b1d3cdc6e97769b0fe65a487 100644 (file)
 
 #include "wx/defs.h"
 
-#if wxUSE_LOG
-
-#include "wx/string.h"
-#include "wx/arrstr.h"
-
-// ----------------------------------------------------------------------------
-// forward declarations
-// ----------------------------------------------------------------------------
-
-#if wxUSE_GUI
-    class WXDLLIMPEXP_CORE wxTextCtrl;
-    class WXDLLIMPEXP_CORE wxLogFrame;
-    class WXDLLIMPEXP_CORE wxFrame;
-#endif // wxUSE_GUI
-
 // ----------------------------------------------------------------------------
 // types
 // ----------------------------------------------------------------------------
 
+// NB: these types are needed even if wxUSE_LOG == 0
 typedef unsigned long wxTraceMask;
 typedef unsigned long wxLogLevel;
 
@@ -44,8 +30,13 @@ typedef unsigned long wxLogLevel;
 // headers
 // ----------------------------------------------------------------------------
 
+#if wxUSE_LOG
+
+#include "wx/string.h"
+#include "wx/arrstr.h"
+
 #ifndef __WXWINCE__
-#include <time.h>   // for time_t
+    #include <time.h>   // for time_t
 #endif
 
 #include "wx/dynarray.h"
@@ -58,6 +49,16 @@ typedef unsigned long wxLogLevel;
 #  endif
 #endif
 
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+    class WXDLLIMPEXP_CORE wxTextCtrl;
+    class WXDLLIMPEXP_CORE wxLogFrame;
+    class WXDLLIMPEXP_CORE wxFrame;
+#endif // wxUSE_GUI
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -556,9 +557,14 @@ wxSafeShowMessage(const wxString& title, const wxString& text);
     #define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode())
 
 #else   //!debug
-    #define wxLogApiError(api, rc) {}
-    #define wxLogLastError(api) {}
+    inline void wxLogApiError(const wxChar *, long) { }
+    inline void wxLogLastError(const wxChar *) { }
 #endif  //debug/!debug
 
+// wxCocoa has additiional trace masks
+#if defined(__WXCOCOA__)
+#include "wx/cocoa/log.h"
+#endif
+
 #endif  // _WX_LOG_H_