X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33a201363a194a38ee0f4e6b2c42b34b00d69731..bff4ec6360d28f3309e5199685950b43ab5e079a:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 439fd5ee5b..0f78049a5b 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -27,7 +27,7 @@ #error "Target can't be both X and Windows" #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__X__) && \ - !defined(__WXMGL__) && wxUSE_GUI + !defined(__WXMGL__) && !defined(__WXX11__) && wxUSE_GUI #ifdef __UNIX__ #error "No Target! You should use wx-config program for compilation flags!" #else // !Unix @@ -191,7 +191,7 @@ typedef int wxWindowID; // ---------------------------------------------------------------------------- // Every ride down a slippery slope begins with a single step.. - // + // // Yes, using nested classes is indeed against our coding standards in // general, but there are places where you can use them to advantage // without totally breaking ports that cannot use them. If you do, then @@ -235,16 +235,19 @@ typedef int wxWindowID; #define wxCALLBACK #endif // platform -// callling convention for the qsort(3) callback +// generic calling convention for the extern "C" functions #if defined(__VISUALC__) - #define wxCMPFUNC_CONV _cdecl + #define wxC_CALLING_CONV _cdecl #elif defined(__VISAGECPP__) - #define wxCMPFUNC_CONV _Optlink + #define wxC_CALLING_CONV _Optlink #else // !Visual C++ - #define wxCMPFUNC_CONV + #define wxC_CALLING_CONV #endif // compiler +// callling convention for the qsort(3) callback +#define wxCMPFUNC_CONV wxC_CALLING_CONV + // compatibility :-( #define CMPFUNC_CONV wxCMPFUNC_CONV @@ -272,6 +275,11 @@ typedef int wxWindowID; #define WXEXPORT _Export #define WXIMPORT _Export #endif +#elif defined(__WXMAC__) + #ifdef __MWERKS__ + #define WXEXPORT __declspec(export) + #define WXIMPORT __declspec(import) + #endif #endif // for other platforms/compilers we don't anything @@ -416,6 +424,7 @@ enum wxGEOS, // GEOS wxOS2_PM, // OS/2 Workplace wxWINDOWS, // Windows or WfW + wxMICROWINDOWS, // MicroWindows wxPENWINDOWS, // Windows for Pen Computing wxWINDOWS_NT, // Windows NT wxWIN32S, // Windows 32S API @@ -427,7 +436,8 @@ enum wxMGL_OS2, // MGL on OS/2 wxMGL_DOS, // MGL on MS-DOS wxWINDOWS_OS2, // Native OS/2 PM - wxUNIX // wxBase under Unix + wxUNIX, // wxBase under Unix + wxX11 // Plain X11 and Universal widgets }; // ---------------------------------------------------------------------------- @@ -861,6 +871,11 @@ enum wxBorder // parent is destroyed before the child #define wxWS_EX_TRANSIENT 0x00000004 +// Use this style to add a context-sensitive help to the window (currently for +// Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) +#define wxFRAME_EX_CONTEXTHELP 0x00000004 +#define wxDIALOG_EX_CONTEXTHELP 0x00000004 + /* * wxFrame/wxDialog style flags */ @@ -891,10 +906,6 @@ enum wxBorder // deprecated flag, don't use any more, defined for compatibility only #define wxFRAME_FLOAT_ON_PARENT 0 -// Context-sensitive help -#define wxFRAME_EX_CONTEXTHELP 0x00000004 -#define wxDIALOG_EX_CONTEXTHELP 0x00000004 - /* * MDI parent frame style flags * Can overlap with some of the above. @@ -911,7 +922,7 @@ enum wxBorder wxMINIMIZE_BOX | wxMAXIMIZE_BOX | \ wxCAPTION | wxCLIP_CHILDREN) -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXPM__) # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION) #else // Under Unix, the dialogs don't have a system menu. Specifying wxSYSTEM_MENU @@ -1118,12 +1129,6 @@ enum wxBorder // be modal. No progress will then be made at all. #define wxPD_REMAINING_TIME 0x0040 -/* - * wxHtmlWindow flags - */ -#define wxHW_SCROLLBAR_NEVER 0x0002 -#define wxHW_SCROLLBAR_AUTO 0x0004 - /* * extended dialog specifiers. these values are stored in a different * flag and thus do not overlap with other style flags. note that these @@ -1642,7 +1647,7 @@ typedef enum { #endif // macro to specify "All Files" on different platforms -#if defined(__WXMSW__) +#if defined(__WXMSW__) || defined(__WXPM__) # define wxALL_FILES_PATTERN "*.*" # define wxALL_FILES gettext_noop("All files (*.*)|*.*") #else @@ -1658,6 +1663,26 @@ typedef enum { #ifdef __WXMAC__ +typedef unsigned char WXCOLORREF[6]; +typedef void* WXHBITMAP; +typedef void* WXHMETAFILE ; +typedef void* WXHICON ; +typedef void* WXHCURSOR ; +typedef void* WXHRGN ; +typedef void* WXRECTPTR ; +typedef void* WXPOINTPTR ; +typedef void* WXHWND ; +typedef void* WXEVENTREF ; +typedef void* WXAPPLEEVENTREF ; +typedef void* WXHDC ; +typedef void* WXHMENU ; +typedef unsigned int WXUINT; +typedef unsigned long WXDWORD; +typedef unsigned short WXWORD; + +typedef void* WXWidget ; +typedef void* WXWindow ; +/* typedef WindowPtr WXHWND; typedef Handle WXHANDLE; typedef CIconHandle WXHICON; @@ -1670,16 +1695,11 @@ typedef CursHandle WXHCURSOR; typedef RgnHandle WXHRGN; //typedef unsigned long WXHACCEL; //typedef unsigned long WXHINSTANCE; -typedef GWorldPtr WXHBITMAP; //typedef unsigned long WXHIMAGELIST; //typedef unsigned long WXHGLOBAL; typedef GrafPtr WXHDC; -typedef unsigned int WXUINT; -typedef unsigned long WXDWORD; -typedef unsigned short WXWORD; //typedef unsigned int WXWPARAM; //typedef long WXLPARAM; -typedef RGBColor WXCOLORREF; //typedef void * WXRGNDATA; //typedef void * WXMSG; //typedef unsigned long WXHCONV; @@ -1691,7 +1711,7 @@ typedef int (*WXFARPROC)(); typedef WindowPtr WXWindow; typedef ControlHandle WXWidget; - +*/ #endif #if defined(__WXMSW__) || defined(__WXPM__) @@ -1759,8 +1779,15 @@ typedef int (__stdcall *WXFARPROC)(); #if defined(__WXPM__) +#ifdef __EMX__ +/* Need a well-known type for WXFARPROC + below. MPARAM is typedef'ed too late. */ +#define WXWPARAM void * +#define WXLPARAM void * +#else #define WXWPARAM MPARAM #define WXLPARAM MPARAM +#endif #define RECT RECTL #define LOGFONT FATTRS #define LOWORD SHORT1FROMMP @@ -1818,18 +1845,22 @@ typedef struct tagLOGPALETTE // VA 3.0 for some reason needs base data types when typedefing a proc proto??? typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*); #else +#ifdef __EMX__ +#define _System +#endif typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM); #endif #endif //__WXPM__ -#ifdef __WXMOTIF__ +#if defined(__WXMOTIF__) || defined(__WXX11__) /* Stand-ins for X/Xt/Motif types */ typedef void* WXWindow; typedef void* WXWidget; typedef void* WXAppContext; typedef void* WXColormap; +typedef void* WXColor; typedef void WXDisplay; typedef void WXEvent; typedef void* WXCursor; @@ -1861,6 +1892,7 @@ typedef struct _GdkColor GdkColor; typedef struct _GdkColormap GdkColormap; typedef struct _GdkFont GdkFont; typedef struct _GdkGC GdkGC; +typedef struct _GdkVisual GdkVisual; #ifdef __WXGTK20__ typedef struct _GdkDrawable GdkWindow; typedef struct _GdkDrawable GdkBitmap;