X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c9aec614392d77b41130b01ed1ed7a13d545eb2..7a5e53abb3f9ea13eba2880972306446e4e21e83:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 1a77bf608f..521ac22eac 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -30,10 +30,16 @@ /* Make sure the environment is set correctly */ # if defined(__WXMSW__) && defined(__X__) # error "Target can't be both X and Windows" -# elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ - !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__WXCOCOA__) && \ - !defined(__X__) && !defined(__WXMGL__) && !defined(__WXX11__) && \ - wxUSE_GUI +# elif !defined(__WXMOTIF__) && \ + !defined(__WXMSW__) && \ + !defined(__WXGTK__) && \ + !defined(__WXPM__) && \ + !defined(__WXMAC__) && \ + !defined(__WXCOCOA__) && \ + !defined(__X__) && \ + !defined(__WXMGL__) && \ + !defined(__WXX11__) && \ + wxUSE_GUI # ifdef __UNIX__ # error "No Target! You should use wx-config program for compilation flags!" # else /* !Unix */ @@ -97,7 +103,7 @@ #endif /* __BORLANDC__ */ /* ---------------------------------------------------------------------------- */ -/* wxWindows version and compatibility defines */ +/* wxWidgets version and compatibility defines */ /* ---------------------------------------------------------------------------- */ #include "wx/version.h" @@ -205,7 +211,7 @@ typedef short int WXTYPE; /* special care should be taken with this type under Windows where the real */ /* window id is unsigned, so we must always do the cast before comparing them */ -/* (or else they would be always different!). Usign wxGetWindowId() which does */ +/* (or else they would be always different!). Using wxGetWindowId() which does */ /* the cast itself is recommended. Note that this type can't be unsigned */ /* because wxID_ANY == -1 is a valid (and largely used) value for window id. */ typedef int wxWindowID; @@ -399,7 +405,9 @@ 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__ #include +#endif /* delete pointer if it is not NULL and NULL it afterwards */ /* (checking that it's !NULL before passing it to delete is just a */ @@ -548,7 +556,7 @@ enum }; /* ---------------------------------------------------------------------------- */ -/* standard wxWindows types */ +/* standard wxWidgets types */ /* ---------------------------------------------------------------------------- */ /* the type for screen and DC coordinates */ @@ -561,6 +569,7 @@ enum typedef int wxCoord; #endif /* wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES */ +enum { wxDefaultCoord = -1 }; /* ---------------------------------------------------------------------------- */ /* define fixed length types */ @@ -581,7 +590,7 @@ typedef wxUint8 wxByte; /* 16bit */ #ifdef SIZEOF_SHORT #if SIZEOF_SHORT != 2 - #error "wxWindows assumes sizeof(short) == 2, please fix the code" + #error "wxWidgets assumes sizeof(short) == 2, please fix the code" #endif #else #define SIZEOF_SHORT 2 @@ -671,7 +680,7 @@ typedef wxUint16 wxWord; typedef long wxInt32; typedef unsigned long wxUint32; #elif - /* wxWindows is not ready for 128bit systems yet... */ + /* wxWidgets is not ready for 128bit systems yet... */ #error "Unknown sizeof(int) value, what are you compiling for?" #endif #else /* !defined(SIZEOF_INT) */ @@ -717,7 +726,7 @@ typedef wxUint32 wxDword; #else /* This should never happen for the current architectures but if you're - using one where it does, please contact wx-dev@lists.wxwindows.org. + using one where it does, please contact wx-dev@lists.wxwidgets.org. */ #error "Pointers can't be stored inside integer types." #endif @@ -1030,7 +1039,11 @@ enum wxStretch wxTILE = 0xc000, // for compatibility only, default now, don't use explicitly any more - wxADJUST_MINSIZE = 0x0000 +#if WXWIN_COMPATIBILITY_2_4 + wxADJUST_MINSIZE = 0x00100000 +#else + wxADJUST_MINSIZE = 0 +#endif }; /* border flags: the values are chosen for backwards compatibility */ @@ -1976,7 +1989,7 @@ enum wxUpdateUI #endif /* --------------------------------------------------------------------------- */ -/* macros that enable wxWindows apps to be compiled in absence of the */ +/* macros that enable wxWidgets apps to be compiled in absence of the */ /* sytem headers, although some platform specific types are used in the */ /* platform specific (implementation) parts of the headers */ /* --------------------------------------------------------------------------- */ @@ -2069,8 +2082,8 @@ typedef struct klass *WX_##klass #warning "Objective-C types will not be checked by the compiler." /* NOTE: typedef struct objc_object *id; */ /* IOW, we're declaring these using the id type without using that name, */ -/* since "id" is used extensively not only within wxWindows itself, but */ -/* also in wxWindows application code. The following works fine when */ +/* since "id" is used extensively not only within wxWidgets itself, but */ +/* also in wxWidgets application code. The following works fine when */ /* compiling C(++) code, and works without typesafety for Obj-C(++) code */ #define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ typedef struct objc_object *WX_##klass @@ -2100,7 +2113,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage); DECLARE_WXCOCOA_OBJC_CLASS(NSThread); DECLARE_WXCOCOA_OBJC_CLASS(NSWindow); DECLARE_WXCOCOA_OBJC_CLASS(NSView); -typedef WX_NSView WXWidget; /* wxWindows BASE definition */ +typedef WX_NSView WXWidget; /* wxWidgets BASE definition */ #endif /* __WXCOCOA__ */ #ifdef __WXMSW__ @@ -2336,7 +2349,7 @@ typedef struct _GdkICAttr GdkICAttr; /* Stand-ins for GTK types */ typedef struct _GtkWidget GtkWidget; -typedef struct _GtkStyle GtkStyle; +typedef struct _GtkRcStyle GtkRcStyle; typedef struct _GtkAdjustment GtkAdjustment; typedef struct _GtkList GtkList; typedef struct _GtkToolbar GtkToolbar; @@ -2379,8 +2392,8 @@ typedef struct window_t *WXWidget; #endif /* MGL */ /* This is required because of clashing macros in windows.h, which may be */ -/* included before or after wxWindows classes, and therefore must be */ -/* disabled here before any significant wxWindows headers are included. */ +/* included before or after wxWidgets classes, and therefore must be */ +/* disabled here before any significant wxWidgets headers are included. */ #ifdef __WXMSW__ #ifdef GetClassInfo #undef GetClassInfo