!defined(__WXPALMOS__)&& \
!defined(__WXGTK__) && \
!defined(__WXPM__) && \
- !defined(__WXMAC__) && \
+ !defined(__WXOSX_CARBON__) && \
+ !defined(__WXOSX_COCOA__) && \
+ !defined(__WXOSX_IPHONE__) && \
!defined(__WXCOCOA__) && \
!defined(__X__) && \
!defined(__WXMGL__) && \
#define wxDEPRECATED(x) x
#endif
+/*
+ explicitly specifying inline allows gcc < 3.4 to
+ handle the deprecation attribute even in the constructor.
+ doesn't seem to work on Apple's gcc 4.0.1 unless using -O0
+*/
+#if defined( __DARWIN__ ) && !defined(__WXDEBUG__)
+ #define wxDEPRECATED_CONSTRUCTOR(x) x
+#else
+ #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
+#endif
+
/*
Macro which marks the function as being deprecated but also defines it
inline.
ptr = NULL;
}
}
+
+ // trivial implementation of std::swap() for primitive types
+ template <typename T>
+ inline void wxSwap(T& first, T& second)
+ {
+ T tmp(first);
+ first = second;
+ second = tmp;
+ }
#endif /*__cplusplus*/
/* size of statically declared array */
#endif
-/* Make sure ssize_t is defined (a signed type the same size as size_t) */
-/* HAVE_SSIZE_T should be defined for compiliers that already have it */
+/* Make sure ssize_t is defined (a signed type the same size as size_t). */
+/* (HAVE_SSIZE_T is not already defined by configure) */
+#ifndef HAVE_SSIZE_T
#ifdef __MINGW32__
- #if defined(_SSIZE_T_) && !defined(HAVE_SSIZE_T)
+ #if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED)
#define HAVE_SSIZE_T
#endif
-#endif
-#if defined(__PALMOS__) && !defined(HAVE_SSIZE_T)
+#elif defined(__PALMOS__)
#define HAVE_SSIZE_T
-#endif
-#if wxCHECK_WATCOM_VERSION(1,4)
+#elif wxCHECK_WATCOM_VERSION(1,4)
#define HAVE_SSIZE_T
#endif
+#endif /* !HAVE_SSIZE_T */
+
+/* If we really don't have ssize_t, provide our own version. */
#ifdef HAVE_SSIZE_T
#ifdef __UNIX__
#include <sys/types.h>
enum wxSizerFlagBits
{
/* for compatibility only, default now, don't use explicitly any more */
-#if WXWIN_COMPATIBILITY_2_6
+#if WXWIN_COMPATIBILITY_2_8
wxADJUST_MINSIZE = 0,
#endif
wxFIXED_MINSIZE = 0x8000,
#define wxAPPLY 0x00000020
#define wxCLOSE 0x00000040
-#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
-#define wxNO_DEFAULT 0x00000080
+#define wxOK_DEFAULT 0x00000000 /* has no effect (default) */
+#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
+#define wxNO_DEFAULT 0x00000080 /* only valid with wxYES_NO */
+#define wxCANCEL_DEFAULT 0x80000000 /* only valid with wxCANCEL */
#define wxICON_EXCLAMATION 0x00000100
#define wxICON_HAND 0x00000200
wxUPDATE_UI_FROMIDLE = 0x0002 /* Invoked from On(Internal)Idle */
};
+
+/* ---------------------------------------------------------------------------- */
+/* wxList types */
+/* ---------------------------------------------------------------------------- */
+
+/* type of compare function for list sort operation (as in 'qsort'): it should
+ return a negative value, 0 or positive value if the first element is less
+ than, equal or greater than the second */
+
+typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2);
+
+/* wxList iterator function */
+typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
+
+
/* ---------------------------------------------------------------------------- */
/* miscellaneous */
/* ---------------------------------------------------------------------------- */
typedef void* WXEVENTHANDLERREF;
typedef void* WXEVENTHANDLERCALLREF;
typedef void* WXAPPLEEVENTREF;
-typedef void* WXHMENU;
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
#if wxOSX_USE_CARBON
typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
+typedef struct __AGLPixelFormatRec *WXGLPixelFormat;
+typedef struct __AGLContextRec *WXGLContext;
#endif
typedef void* WXDisplay;
DECLARE_WXMAC_OPAQUE_REF( PasteboardRef )
DECLARE_WXMAC_OPAQUE_REF( IconRef )
+DECLARE_WXMAC_OPAQUE_REF( MenuRef )
typedef IconRef WXHICON ;
typedef HIShapeRef WXHRGN;
+#if wxOSX_USE_CARBON
+typedef MenuRef WXHMENU;
+#endif
#endif
DECLARE_WXCOCOA_OBJC_CLASS(NSThread);
DECLARE_WXCOCOA_OBJC_CLASS(NSWindow);
DECLARE_WXCOCOA_OBJC_CLASS(NSView);
+DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLContext);
+DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLPixelFormat);
#ifndef __WXMAC__
typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
#endif
typedef WX_NSWindow WXWindow;
typedef WX_NSView WXWidget;
+typedef WX_NSMenu WXHMENU;
+typedef WX_NSOpenGLPixelFormat WXGLPixelFormat;
+typedef WX_NSOpenGLContext WXGLContext;
#elif wxOSX_USE_IPHONE