]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
Switched to DECLARE_NO_COPY_CLASS
[wxWidgets.git] / include / wx / defs.h
index 0bf00a50dd6141b1b7e49ae25c7fbede3065683d..7d367a5f6d353367ba4508d58148c007b1145c47 100644 (file)
@@ -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
         #if (__MWERKS__ >= 0x1000) && __option(bool)
             #define HAVE_BOOL
         #endif
+    #elif defined(__APPLE__) && defined(__APPLE_CC__)
+        // Apple bundled gcc supports bool
+        #define HAVE_BOOL
     #elif defined(__VISUALC__) && (__VISUALC__ == 1020)
         // in VC++ 4.2 the bool keyword is reserved (hence can't be typedefed)
         // but not implemented, so we must #define it
@@ -191,7 +194,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
@@ -275,6 +278,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
@@ -419,6 +427,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
@@ -430,7 +439,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
 };
 
 // ----------------------------------------------------------------------------
@@ -876,7 +886,7 @@ enum wxBorder
 #define wxICONIZE               0x4000
 #define wxMINIMIZE              wxICONIZE
 #define wxMAXIMIZE              0x2000
-// free value: 0x1000
+                                        // free flag value: 0x1000
 #define wxSYSTEM_MENU           0x0800
 #define wxMINIMIZE_BOX          0x0400
 #define wxMAXIMIZE_BOX          0x0200
@@ -891,14 +901,12 @@ enum wxBorder
 // deprecated versions defined for compatibility reasons
 #define wxRESIZE_BOX            wxMAXIMIZE_BOX
 #define wxTHICK_FRAME           wxRESIZE_BORDER
+#define wxFRAME_FLOAT_ON_PARENT wxFRAME_TOOL_WINDOW
 
 // obsolete styles, unused any more
-#define wxDIALOG_MODAL          0x0020
+#define wxDIALOG_MODAL          0x0020  // free flag value 0x0020
 #define wxDIALOG_MODELESS       0x0000
 
-// deprecated flag, don't use any more, defined for compatibility only
-#define wxFRAME_FLOAT_ON_PARENT 0
-
 /*
  * MDI parent frame style flags
  * Can overlap with some of the above.
@@ -915,7 +923,7 @@ enum wxBorder
    wxMINIMIZE_BOX | wxMAXIMIZE_BOX | \
    wxCAPTION | wxCLIP_CHILDREN)
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMGL__)
 #   define wxDEFAULT_DIALOG_STYLE  (wxSYSTEM_MENU | wxCAPTION)
 #else
 //  Under Unix, the dialogs don't have a system menu. Specifying wxSYSTEM_MENU
@@ -1122,12 +1130,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
@@ -1230,8 +1232,18 @@ enum wxBorder
 #define wxID_RETRY              5116
 #define wxID_IGNORE             5117
 
-// IDs used by generic file dialog (11 consecutive starting from this value)
+// System menu IDs (used by wxUniv):
+#define wxID_SYSTEM_MENU        5200
+#define wxID_CLOSE_FRAME        5201
+#define wxID_MOVE_FRAME         5202
+#define wxID_RESIZE_FRAME       5203
+#define wxID_MAXIMIZE_FRAME     5204
+#define wxID_ICONIZE_FRAME      5205
+#define wxID_RESTORE_FRAME      5206
+
+// IDs used by generic file dialog (13 consecutive starting from this value)
 #define wxID_FILEDLGG           5900
+
 #define wxID_HIGHEST            5999
 
 // ----------------------------------------------------------------------------
@@ -1646,7 +1658,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
@@ -1778,8 +1790,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
@@ -1837,18 +1856,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;
@@ -1865,6 +1888,7 @@ typedef unsigned long   Atom;  /* this might fail on a few architectures */
 #endif // Motif
 
 #ifdef __WXGTK__
+
 /* Stand-ins for GLIB types */
 typedef char           gchar;
 typedef signed char    gint8;
@@ -1875,23 +1899,28 @@ typedef void*          gpointer;
 typedef struct _GSList GSList;
 
 /* Stand-ins for GDK types */
-typedef gulong                  GdkAtom;
 typedef struct _GdkColor        GdkColor;
 typedef struct _GdkColormap     GdkColormap;
 typedef struct _GdkFont         GdkFont;
 typedef struct _GdkGC           GdkGC;
+typedef struct _GdkVisual       GdkVisual;
+
 #ifdef __WXGTK20__
+typedef struct _GdkAtom        *GdkAtom;
 typedef struct _GdkDrawable     GdkWindow;
 typedef struct _GdkDrawable     GdkBitmap;
 typedef struct _GdkDrawable     GdkPixmap;
-#else
+#else // GTK+ 1.2
+typedef gulong                  GdkAtom;
 typedef struct _GdkWindow       GdkWindow;
 typedef struct _GdkWindow       GdkBitmap;
 typedef struct _GdkWindow       GdkPixmap;
-#endif
+#endif // GTK+ 1.2/2.0
+
 typedef struct _GdkCursor       GdkCursor;
 typedef struct _GdkRegion       GdkRegion;
 typedef struct _GdkDragContext  GdkDragContext;
+
 #ifdef HAVE_XIM
 typedef struct _GdkIC           GdkIC;
 typedef struct _GdkICAttr       GdkICAttr;
@@ -1922,7 +1951,8 @@ typedef GtkWidget *WXWidget;
 typedef struct _PangoContext         PangoContext;
 typedef struct _PangoLayout          PangoLayout;
 typedef struct _PangoFontDescription PangoFontDescription;
-#endif
+#endif // GTK+ 2.0
+
 #endif // GTK
 
 #ifdef __WXMGL__