X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/623633eea9e42ac539aa68af2b20785dbdd16db2..f396e5a7ca14cd432fd7a7a60624bd9fe0ed7a83:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 1546679918..abe2500e52 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -204,6 +204,9 @@ #define false ((bool)0) #endif #define HAVE_BOOL + #elif defined(__WXPALMOS__) + /* Palm OS supports bool */ + #define HAVE_BOOL #endif /* compilers */ #endif /* HAVE_BOOL */ @@ -563,7 +566,7 @@ typedef int wxWindowID; /* NULL declaration: it must be defined as 0 for C++ programs (in particular, */ /* it must not be defined as "(void *)0" which is standard for C but completely */ /* breaks C++ code) */ -#ifndef __HANDHELDPC__ +#if !defined(__HANDHELDPC__) && !defined(__PALMOS__) #include #endif @@ -751,7 +754,9 @@ enum { wxDefaultCoord = -1 }; /* ---------------------------------------------------------------------------- */ #if defined(__WXPALMOS__) || defined(__MINGW32__) + #if !defined(__MWERKS__) #include + #endif #endif /* chars are always one byte (by definition), shorts are always two (in */ @@ -807,7 +812,9 @@ typedef wxUint16 wxWord; #define SIZEOF_LONG 4 #define SIZEOF_WCHAR_T 2 #define SIZEOF_SIZE_T 4 - #define wxSIZE_T_IS_UINT + #ifdef __WXPALMOS6__ + #define wxSIZE_T_IS_UINT + #endif #define SIZEOF_VOID_P 4 #define SIZEOF_SIZE_T 4 #elif defined(__WINDOWS__) @@ -1058,7 +1065,11 @@ inline void *wxUIntToPtr(wxUIntPtr p) #error "See the documentation on the 'longlong' pragma." #endif #elif defined(__WXPALMOS__) - #define wxLongLong_t int64_t + #if defined(__WXPALMOS6__) + #define wxLongLong_t int64_t + #else + #define wxLongLong_t long long + #endif /* __WXPALMOS6__ */ #define wxLongLongSuffix ll #define wxLongLongFmtSpec _T("ll") #elif defined(__VISAGECPP__) && __IBMCPP__ >= 400 @@ -1082,7 +1093,11 @@ inline void *wxUIntToPtr(wxUIntPtr p) #ifdef wxLongLong_t #ifdef __WXPALMOS__ + #if defined(__WXPALMOS6__) #define wxULongLong_t uint64_t + #else + #define wxULongLong_t unsigned long long + #endif /* __WXPALMOS6__ */ #else #define wxULongLong_t unsigned wxLongLong_t #endif @@ -1772,6 +1787,13 @@ enum wxKeyType /* Standard menu IDs */ enum { + /* + These ids delimit the range used by automatically-generated ids + (i.e. those used when wxID_ANY is specified during construction). + */ + wxID_AUTO_LOWEST = -32000, + wxID_AUTO_HIGHEST = -2000, + /* no id matches this one when compared to it */ wxID_NONE = -3, @@ -2493,11 +2515,8 @@ enum wxUpdateUI #define WX_OPAQUE_TYPE( name ) struct wxOpaque##name -typedef unsigned char WXCOLORREF[6]; -typedef void* WXCGIMAGEREF; typedef void* WXHBITMAP; typedef void* WXHCURSOR; -typedef void* WXHRGN; typedef void* WXRECTPTR; typedef void* WXPOINTPTR; typedef void* WXHWND; @@ -2505,20 +2524,21 @@ typedef void* WXEVENTREF; typedef void* WXEVENTHANDLERREF; typedef void* WXEVENTHANDLERCALLREF; typedef void* WXAPPLEEVENTREF; -typedef void* WXHDC; typedef void* WXHMENU; + typedef unsigned int WXUINT; typedef unsigned long WXDWORD; typedef unsigned short WXWORD; -typedef WX_OPAQUE_TYPE(CIconHandle ) * WXHICON ; typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ; typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ; typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ; typedef void* WXDisplay; -// a few native types +/* + * core frameworks + */ typedef const void * CFTypeRef; @@ -2527,13 +2547,34 @@ typedef struct __CFString * CFMutableStringRef; typedef struct __CFRunLoopSource * CFRunLoopSourceRef; +#define DECLARE_WXMAC_OPAQUE_CGREF( name ) typedef struct name* name##Ref; + +DECLARE_WXMAC_OPAQUE_CGREF( CGColor ) +DECLARE_WXMAC_OPAQUE_CGREF( CGImage ) +DECLARE_WXMAC_OPAQUE_CGREF( CGContext ) + +typedef CGColorRef WXCOLORREF; +typedef CGImageRef WXCGIMAGEREF; +typedef CGContextRef WXHDC; + +/* + * carbon + */ + +typedef const struct __HIShape * HIShapeRef; +typedef struct __HIShape * HIMutableShapeRef; + #define DECLARE_WXMAC_OPAQUE_REF( name ) typedef struct Opaque##name* name; -DECLARE_WXMAC_OPAQUE_REF( PasteboardRef ); +DECLARE_WXMAC_OPAQUE_REF( PasteboardRef ) +DECLARE_WXMAC_OPAQUE_REF( IconRef ) + +typedef IconRef WXHICON ; +typedef HIShapeRef WXHRGN; #endif -#if defined( __WXCOCOA__ ) || ( defined(__WXMAC__) && defined(__DARWIN__) ) +#if defined( __WXCOCOA__ ) || defined(__WXMAC__) /* Definitions of 32-bit/64-bit types * These are typedef'd exactly the same way in newer OS X headers so