#define HAVE_EXPLICIT
#elif defined(__DIGITALMARS__)
#define HAVE_EXPLICIT
+ #elif defined(__WATCOMC__)
+ #define HAVE_EXPLICIT
#endif
#endif /* !HAVE_EXPLICIT */
#endif /* va_copy/!va_copy */
#endif /* wxVaCopy */
+#ifndef HAVE_VARIADIC_MACROS
+ #if wxCHECK_WATCOM_VERSION(1,2)
+ #define HAVE_VARIADIC_MACROS
+ #endif
+#endif /* HAVE_VARIADIC_MACROS */
+
/* ---------------------------------------------------------------------------- */
/* portable calling conventions 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
+#ifndef ATTRIBUTE_PRINTF
+# if defined(__GNUC__) && !wxUSE_UNICODE
+# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+# else
+# define ATTRIBUTE_PRINTF(m, n)
+# endif
+
+# 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 /* !defined(ATTRIBUTE_PRINTF) */
+
/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */
#if wxCHECK_GCC_VERSION(3, 1)
#define wxDEPRECATED(x) x
#endif
+/*
+ Special variant of the macro above which should be used for the functions
+ which are deprecated but called by wx itself: this often happens with
+ deprecated virtual functions which are called by the library.
+ */
+#ifdef WXBUILDING
+# define wxDEPRECATED_BUT_USED_INTERNALLY(x) x
+#else
+# define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x)
+#endif
+
/* everybody gets the assert and other debug macros */
#include "wx/debug.h"
#define wxFOR_ALL_COMPARISONS_3(m, x, y, z) \
m(==,x,y,z) m(!=,x,y,z) m(>=,x,y,z) m(<=,x,y,z) m(>,x,y,z) m(<,x,y,z)
+/*
+ This is only used with wxDEFINE_COMPARISON_REV: it passes both the normal
+ and the reversed comparison operators to the macro.
+ */
+#define wxFOR_ALL_COMPARISONS_3_REV(m, x, y, z) \
+ m(==,x,y,z,==) m(!=,x,y,z,!=) m(>=,x,y,z,<=) \
+ m(<=,x,y,z,>=) m(>,x,y,z,<) m(<,x,y,z,>)
+
#define wxDEFINE_COMPARISON(op, T1, T2, cmp) \
inline bool operator op(T1 x, T2 y) { return cmp(x, y, op); }
-#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp) \
- inline bool operator op(T2 y, T1 x) { return cmp(x, y, op); }
+#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp, oprev) \
+ inline bool operator op(T2 y, T1 x) { return cmp(x, y, oprev); }
/*
Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given
*/
#define wxDEFINE_ALL_COMPARISONS(T1, T2, cmp) \
wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp) \
- wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
+ wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
/* ---------------------------------------------------------------------------- */
/* macros to avoid compiler warnings */
|short | 16 16 16 16 16 |
|int | 32 64 32 32 16 |
|long | 64 64 32 32 32 |
- |long long | 64 |
+ |long long | 64 64 64 -- -- |
|void * | 64 64 64 32 32 |
+-----------+----------------------------+
#endif
#endif /* Win/!Win */
+/* also define C99-like sized MIN/MAX constants */
+#define wxINT8_MIN CHAR_MIN
+#define wxINT8_MAX CHAR_MAX
+
+#define wxINT16_MIN SHRT_MIN
+#define wxINT16_MAX SHRT_MAX
+
+#if SIZEOF_INT == 4
+ #define wxINT32_MIN INT_MIN
+ #define wxINT32_MAX INT_MAX
+#elif SIZEOF_LONG == 4
+ #define wxINT32_MIN LONG_MIN
+ #define wxINT32_MAX LONG_MAX
+#else
+ #error "Unknown 32 bit type"
+#endif
+
typedef wxUint32 wxDword;
+#ifdef LLONG_MAX
+ #define wxINT64_MAX LLONG_MAX
+ #define wxINT64_MIN LLONG_MIN
+#else
+ #define wxINT64_MAX wxLL(9223372036854775807)
+ #define wxINT64_MIN wxLL(-9223372036854775807-1)
+#endif
+
/*
Define an integral type big enough to contain all of long, size_t and void *.
*/
# endif
#endif /* wxUSE_WCHAR_T */
+/*
+ This constant should be used instead of NULL in vararg functions taking
+ wxChar* arguments: passing NULL (which is the same as 0, unless the compiler
+ defines it specially, e.g. like gcc does with its __null built-in) doesn't
+ work in this case as va_arg() wouldn't interpret the integer 0 correctly
+ when trying to convert it to a pointer on architectures where sizeof(int) is
+ strictly less than sizeof(void *).
+
+ Examples of places where this must be used include wxFileTypeInfo ctor.
+ */
+#define wxNullPtr ((void *)NULL)
+
/* ---------------------------------------------------------------------------- */
/* byte ordering related definition and macros */
/* ---------------------------------------------------------------------------- */
*/
#define wxST_SIZEGRIP 0x0010
-/*
- * wxStaticText flags
- */
-#define wxST_NO_AUTORESIZE 0x0001
-#define wxST_DOTS_MIDDLE 0x0002
-#define wxST_DOTS_END 0x0004
-
/*
* wxStaticBitmap flags
*/
#define wxNO 0x00000008
#define wxYES_NO (wxYES | wxNO)
#define wxCANCEL 0x00000010
+#define wxAPPLY 0x00000020
+#define wxCLOSE 0x00000040
#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
#define wxNO_DEFAULT 0x00000080
wxBG_STYLE_CUSTOM
};
+/*
+ * Key types used by (old style) lists and hashes.
+ */
+enum wxKeyType
+{
+ wxKEY_NONE,
+ wxKEY_INTEGER,
+ wxKEY_STRING
+};
+
/* ---------------------------------------------------------------------------- */
/* standard IDs */
/* ---------------------------------------------------------------------------- */
wxITEM_NORMAL,
wxITEM_CHECK,
wxITEM_RADIO,
+ wxITEM_DROPDOWN,
wxITEM_MAX
};
typedef struct _GtkSelectionData GtkSelectionData;
typedef struct _GtkTextBuffer GtkTextBuffer;
typedef struct _GtkRange GtkRange;
+typedef struct _GtkCellRenderer GtkCellRenderer;
typedef GtkWidget *WXWidget;