#ifndef _WX_DEFS_H_
#define _WX_DEFS_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "defs.h"
#endif
// compiler defects workarounds
// ----------------------------------------------------------------------------
-#if defined(__VISUALC__) && !defined(WIN32)
+#if defined(__VISUALC__) && !defined(WIN32) && !defined(__WXWINCE__)
// VC1.5 does not have LPTSTR type
#define LPTSTR LPSTR
#define LPCTSTR LPCSTR
// check for explicit keyword support
#ifndef HAVE_EXPLICIT
- // VC++ 6.0 has explicit (what about the earlier versions?)
#if defined(__VISUALC__) && (__VISUALC__ > 1200)
+ // VC++ 6.0 has explicit (what about the earlier versions?)
+ #define HAVE_EXPLICIT
+ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520)
+ // BC++ 4.52 doesn't support explicit, CBuilder 1 does
#define HAVE_EXPLICIT
- // Metrowerks CW6 or higher has explicit
#elif defined(__MWERKS__) && (__MWERKS__ >= 0x2400)
+ // Metrowerks CW6 or higher has explicit
#define HAVE_EXPLICIT
#endif
#endif // !HAVE_EXPLICIT
// ----------------------------------------------------------------------------
// stdcall is used for all functions called by Windows under Windows
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__WXWINE__)
#if defined(__GNUWIN32__)
#define wxSTDCALL __attribute__((stdcall))
#else
// Very common macros
// ----------------------------------------------------------------------------
+// Printf-like attribute definitions to obtain warnings with GNU C/C++
+#if defined(__GNUC__) && !wxUSE_UNICODE
+# ifndef ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
+# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
+# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
+# endif /* ATTRIBUTE_PRINTF */
+#else
+# ifndef ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF_1
+# define ATTRIBUTE_PRINTF_2
+# define ATTRIBUTE_PRINTF_3
+# define ATTRIBUTE_PRINTF_4
+# define ATTRIBUTE_PRINTF_5
+# endif /* ATTRIBUTE_PRINTF */
+#endif
+
// everybody gets the assert and other debug macros
#ifdef __cplusplus
#include "wx/debug.h"
typedef void (*wxFunction) (wxObject&, wxEvent&);
#endif
-// Printf-like attribute definitions to obtain warnings with GNU C/C++
-#if defined(__GNUC__) && !wxUSE_UNICODE
-# ifndef ATTRIBUTE_PRINTF
-# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
-# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
-# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
-# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
-# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
-# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
-# endif /* ATTRIBUTE_PRINTF */
-#else
-# ifndef ATTRIBUTE_PRINTF
-# define ATTRIBUTE_PRINTF
-# define ATTRIBUTE_PRINTF_1
-# define ATTRIBUTE_PRINTF_2
-# define ATTRIBUTE_PRINTF_3
-# define ATTRIBUTE_PRINTF_4
-# define ATTRIBUTE_PRINTF_5
-# endif /* ATTRIBUTE_PRINTF */
-#endif
-
// ----------------------------------------------------------------------------
// OS mnemonics -- Identify the running OS (useful for Windows)
// ----------------------------------------------------------------------------
* wxRadioButton style flag
*/
#define wxRB_GROUP 0x0004
+#define wxRB_SINGLE 0x0008
/*
* wxGauge flags
*/
#define wxTC_RIGHTJUSTIFY 0x0010
#define wxTC_FIXEDWIDTH 0x0020
-#define wxTC_OWNERDRAW 0x0040
+#define wxTC_TOP 0x0000 // default
+#define wxTC_LEFT 0x0020
+#define wxTC_RIGHT 0x0040
+#define wxTC_BOTTOM 0x0080
#define wxTC_MULTILINE wxNB_MULTILINE
+#define wxTC_OWNERDRAW 0x0200
// wxToolBar style flags
#define wxTB_HORIZONTAL wxHORIZONTAL // == 0x0004
// ----------------------------------------------------------------------------
// define this macro if font handling is done using the X font names
-#if defined(__WXGTK__) || defined(__X__)
+#if (defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__X__)
#define _WX_X_FONTLIKE
#endif
// macro to specify "All Files" on different platforms
#if defined(__WXMSW__) || defined(__WXPM__)
-# define wxALL_FILES_PATTERN "*.*"
+# define wxALL_FILES_PATTERN wxT("*.*")
# define wxALL_FILES gettext_noop("All files (*.*)|*.*")
#else
-# define wxALL_FILES_PATTERN "*"
+# define wxALL_FILES_PATTERN wxT("*")
# define wxALL_FILES gettext_noop("All files (*)|*")
#endif
#endif
#ifdef __WXGTK20__
+/* Input method thing */
+typedef struct _GtkIMMulticontext GtkIMMulticontext;
+#endif // __WXGTK20__
+
+#endif // __WXGTK__
+
+#if defined(__WXGTK20__) || (defined(__WXX11__) && wxUSE_UNICODE)
+#define wxUSE_PANGO 1
+#else
+#define wxUSE_PANGO 0
+#endif
+
+#if wxUSE_PANGO
/* Stand-ins for Pango types */
typedef struct _PangoContext PangoContext;
typedef struct _PangoLayout PangoLayout;
typedef struct _PangoFontDescription PangoFontDescription;
-#endif // GTK+ 2.0
-
-#endif // GTK
+#endif
#ifdef __WXMGL__
typedef struct window_t *WXWidget;