X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7bea7b91482dd41568e11fc9e91ce485db680ddd..0944fceb987def04dc89d03d58c35793d0ecdfed:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 1cc0b17d7b..b18f62f9d5 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -292,6 +292,13 @@ typedef int wxWindowID; #define wx_reinterpret_cast(t, x) ((t)(x)) #endif +/* + This one is a wx invention: like static cast but used when we intentionally + truncate from a larger to smaller type, static_cast<> can't be used for it + as it results in warnings when using some compilers (SGI mipspro for example) + */ +#define wx_truncate_cast(t, x) ((t)(x)) + /* for consistency with wxStatic/DynamicCast defined in wx/object.h */ #define wxConstCast(obj, className) wx_const_cast(className *, obj) @@ -573,7 +580,7 @@ typedef int wxWindowID; #define except(x) catch(...) #endif /* Metrowerks */ -#if defined(__WATCOMC__) +#if defined(__WATCOMC__) && (__WATCOMC__ < 1240) typedef short mode_t; #endif @@ -638,14 +645,7 @@ enum /* ---------------------------------------------------------------------------- */ /* the type for screen and DC coordinates */ - -#if wxUSE_COMPATIBLE_COORD_TYPES - /* to ensure compatibility with 2.0, we must use long */ - #define wxCoord long -#else /* !wxUSE_COMPATIBLE_COORD_TYPES */ - /* other platforms we support have at least 32bit int - quite enough */ - typedef int wxCoord; -#endif /* wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES */ +typedef int wxCoord; enum { wxDefaultCoord = -1 }; @@ -653,6 +653,10 @@ enum { wxDefaultCoord = -1 }; /* define fixed length types */ /* ---------------------------------------------------------------------------- */ +#if defined(__WXPALMOS__) || defined(__MINGW32__) + #include +#endif + /* chars are always one byte (by definition), shorts are always two (in */ /* practice) */ @@ -898,7 +902,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec _T("L") -#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__))) +#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__))) #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec _T("L") @@ -952,7 +956,6 @@ inline void *wxUIntToPtr(wxUIntPtr p) /* 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 */ #ifdef __MINGW32__ - #include #if defined(_SSIZE_T_) && !defined(HAVE_SSIZE_T) #define HAVE_SSIZE_T #endif @@ -960,6 +963,9 @@ inline void *wxUIntToPtr(wxUIntPtr p) #if defined(__PALMOS__) && !defined(HAVE_SSIZE_T) #define HAVE_SSIZE_T #endif +#if defined(__WATCOMC__) && __WATCOMC__ > 1230 + #define HAVE_SSIZE_T +#endif #ifndef HAVE_SSIZE_T #if SIZEOF_SIZE_T == 4 typedef wxInt32 ssize_t; @@ -1614,22 +1620,21 @@ enum wxBackgroundStyle /* standard IDs */ /* ---------------------------------------------------------------------------- */ -/* any id: means that we don't care about the id, whether when installing an */ -/* event handler or when creating a new window */ +/* Standard menu IDs */ enum { - wxID_ANY = -1 -}; + /* no id matches this one when compared to it */ + wxID_NONE = -3, -/* id for a separator line in the menu (invalid for normal item) */ -enum -{ - wxID_SEPARATOR = -2 -}; + /* id for a separator line in the menu (invalid for normal item) */ + wxID_SEPARATOR = -2, -/* Standard menu IDs */ -enum -{ + /* any id: means that we don't care about the id, whether when installing + * an event handler or when creating a new window */ + wxID_ANY = -1, + + + /* all predefined ids are between wxID_LOWEST and wxID_HIGHEST */ wxID_LOWEST = 4999, wxID_OPEN, @@ -1802,6 +1807,11 @@ enum wxHitTest /* Don't do parent client adjustments (for implementation only) */ #define wxSIZE_NO_ADJUSTMENTS 0x0008 +#if wxABI_VERSION >= 20602 +/* Change the window position even if it seems to be already correct */ +#define wxSIZE_FORCE 0x0010 +#endif // 2.6.2+ + /* ---------------------------------------------------------------------------- */ /* GDI descriptions */ /* ---------------------------------------------------------------------------- */ @@ -2452,6 +2462,7 @@ typedef WX_NSView WXWidget; /* wxWidgets BASE definition */ #if defined(__WXPALMOS__) +typedef void * WXHWND; typedef void * WXHANDLE; typedef void * WXHICON; typedef void * WXHFONT; @@ -2474,9 +2485,13 @@ typedef unsigned short WXWORD; typedef unsigned long WXCOLORREF; typedef struct tagMSG WXMSG; -typedef WinHandle WXWINHANDLE; +typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */ typedef WXWINHANDLE WXWidget; +typedef void * WXFORMPTR; +typedef void * WXEVENTPTR; +typedef void * WXRECTANGLEPTR; + #endif /* __WXPALMOS__ */ @@ -2665,6 +2680,7 @@ typedef void* WXRegion; typedef void* WXFont; typedef void* WXImage; typedef void* WXFontList; +typedef void* WXFontSet; typedef void* WXRendition; typedef void* WXRenderTable; typedef void* WXFontType; /* either a XmFontList or XmRenderTable */