// "old" GNUWIN32 is the one without Norlander's headers: it lacks the standard
// Win32 headers and we define the used stuff ourselves for it in
// wx/msw/gnuwin32/extra.h
// "old" GNUWIN32 is the one without Norlander's headers: it lacks the standard
// Win32 headers and we define the used stuff ourselves for it in
// wx/msw/gnuwin32/extra.h
// ----------------------------------------------------------------------------
// portable calling conventions macros
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// portable calling conventions macros
// ----------------------------------------------------------------------------
-// wxCALLBACK should be used for the functions which are called back by
-// Windows (such as compare function for wxListCtrl)
-#if defined(__WIN32__)
- #if defined(__MINGW32__) || defined(__GNUWIN32__)
- #define wxCALLBACK __attribute__((stdcall))
+// stdcall is used for all functions called by Windows under Windows
+#ifdef __WINDOWS__
+ #if defined(__GNUWIN32__)
+ #define wxSTDCALL __attribute__((stdcall))
+#elif defined(__GNUC__)
+
+# ifdef WXMAKINGDLL
+# define WXDLLEXPORT __declspec( dllexport )
+# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
+# define WXDLLEXPORT_CTORFN
+# elif defined(WXUSINGDLL)
+# define WXDLLEXPORT __declspec( dllimport )
+# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type
+# define WXDLLEXPORT_CTORFN
+# else
+# define WXDLLEXPORT
+# define WXDLLEXPORT_DATA(type) type
+# define WXDLLEXPORT_CTORFN
+# endif
+
- inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i )
- {return (__lhbrx( &i , 0 ) ) ;}
- inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i )
- {return (__lhbrx( &i , 0 ) ) ;}
- inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i )
- {return (__lwbrx( &i , 0 ) ) ;}
- inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i )
- {return (__lwbrx( &i , 0 ) ) ;}
+ inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i )
+ {return (__lhbrx( &i , 0 ) ) ;}
+ inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i )
+ {return (__lhbrx( &i , 0 ) ) ;}
+ inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i )
+ {return (__lwbrx( &i , 0 ) ) ;}
+ inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i )
+ {return (__lwbrx( &i , 0 ) ) ;}
- #pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0)
- pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value)
- = { 0xE158 };
-
- #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0)
- pascal wxInt16 wxUINT16_SWAP_ALWAYS(wxInt16 value)
- = { 0xE158 };
-
- #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0)
- pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value)
- = { 0xE158, 0x4840, 0xE158 };
-
- #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0)
- pascal wxInt32 wxUINT32_SWAP_ALWAYS(wxInt32 value)
- = { 0xE158, 0x4840, 0xE158 };
+ #pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0)
+ pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value)
+ = { 0xE158 };
+
+ #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0)
+ pascal wxInt16 wxUINT16_SWAP_ALWAYS(wxInt16 value)
+ = { 0xE158 };
+
+ #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0)
+ pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value)
+ = { 0xE158, 0x4840, 0xE158 };
+
+ #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0)
+ pascal wxInt32 wxUINT32_SWAP_ALWAYS(wxInt32 value)
+ = { 0xE158, 0x4840, 0xE158 };
- // Override CTL3D or native 3D styles for children
+
+// Clip children when painting, which reduces flicker in e.g. frames and
+// splitter windows, but can't be used in a panel where a static box must be
+// 'transparent' (panel paints the background for it)
- // Clip children when painting, which reduces flicker in
- // e.g. frames and splitter windows, but can't be used in
- // a panel where a static box must be 'transparent' (panel
- // paints the background for it)
#define wxTAB_TRAVERSAL 0x00080000
// Add this style if the control wants to get all keyboard messages (under
#define wxTAB_TRAVERSAL 0x00080000
// Add this style if the control wants to get all keyboard messages (under
// don't invalidate the whole window (resulting in a PAINT event) when the
// window is resized (currently, makes sense for wxMSW only)
#define wxNO_FULL_REPAINT_ON_RESIZE 0x00010000
// don't invalidate the whole window (resulting in a PAINT event) when the
// window is resized (currently, makes sense for wxMSW only)
#define wxNO_FULL_REPAINT_ON_RESIZE 0x00010000
+
+/*
+ * Extra window style flags (use wxWS_EX prefix to make it clear that they
+ * should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle())
+ */
+
+// by default, TransferDataTo/FromWindow() only work on direct children of the
+// window (compatible behaviour), set this flag to make them recursively
+// descend into all subwindows
+#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
+
-#define wxTB_3DBUTTONS 0x8000
-#define wxTB_HORIZONTAL 0x0002
-#define wxTB_VERTICAL 0x0004
+#define wxTB_HORIZONTAL wxHORIZONTAL
+#define wxTB_VERTICAL wxVERTICAL
+#define wxTB_3DBUTTONS 0x0010
-#define wxPROCESS_ENTER 0x0004
-#define wxPASSWORD 0x0008
-#define wxTE_PROCESS_ENTER wxPROCESS_ENTER
-#define wxTE_PASSWORD wxPASSWORD
+// the flag bits 0x0001, 2, 4 and 8 are free but should be used only for the
+// things which don't make sense for a text control used by wxTextEntryDialog
+// because they would otherwise conflict with wxOK, wxCANCEL, wxCENTRE
#define wxTE_READONLY 0x0010
#define wxTE_MULTILINE 0x0020
#define wxTE_PROCESS_TAB 0x0040
#define wxTE_READONLY 0x0010
#define wxTE_MULTILINE 0x0020
#define wxTE_PROCESS_TAB 0x0040
#define wxPD_AUTO_HIDE 0x0004
#define wxPD_ELAPSED_TIME 0x0008
#define wxPD_ESTIMATED_TIME 0x0010
#define wxPD_AUTO_HIDE 0x0004
#define wxPD_ELAPSED_TIME 0x0008
#define wxPD_ESTIMATED_TIME 0x0010
+/*
+ * wxCalendarCtrl flags
+ */
+#define wxCAL_SUNDAY_FIRST 0x0000
+#define wxCAL_MONDAY_FIRST 0x0001
+#define wxCAL_SHOW_HOLIDAYS 0x0002
+#define wxCAL_NO_YEAR_CHANGE 0x0004
+#define wxCAL_NO_MONTH_CHANGE 0x000c // no month change => no year change
+
/*
* extended dialog specifiers. these values are stored in a different
* flag and thus do not overlap with other style flags. note that these
/*
* extended dialog specifiers. these values are stored in a different
* flag and thus do not overlap with other style flags. note that these
// Brush & Pen Stippling. Note that a stippled pen cannot be dashed!!
// Note also that stippling a Pen IS meaningfull, because a Line is
// Brush & Pen Stippling. Note that a stippled pen cannot be dashed!!
// Note also that stippling a Pen IS meaningfull, because a Line is
-typedef WindowPtr WXHWND;
-typedef Handle WXHANDLE;
-typedef CIconHandle WXHICON;
+typedef WindowPtr WXHWND;
+typedef Handle WXHANDLE;
+typedef CIconHandle WXHICON;
//typedef unsigned long WXHPEN;
//typedef unsigned long WXHBRUSH;
//typedef unsigned long WXHPALETTE;
//typedef unsigned long WXHPEN;
//typedef unsigned long WXHBRUSH;
//typedef unsigned long WXHPALETTE;
//typedef unsigned long WXHACCEL;
//typedef unsigned long WXHINSTANCE;
typedef GWorldPtr WXHBITMAP;
//typedef unsigned long WXHIMAGELIST;
//typedef unsigned long WXHGLOBAL;
//typedef unsigned long WXHACCEL;
//typedef unsigned long WXHINSTANCE;
typedef GWorldPtr WXHBITMAP;
//typedef unsigned long WXHIMAGELIST;
//typedef unsigned long WXHGLOBAL;
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
//typedef unsigned int WXWPARAM;
//typedef long WXLPARAM;
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
//typedef unsigned int WXWPARAM;
//typedef long WXLPARAM;
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
-typedef struct _GdkWindow GdkWindow;
-typedef struct _GdkWindow GdkBitmap;
-typedef struct _GdkWindow GdkPixmap;
+#ifdef __WXGTK13__
+ typedef struct _GdkDrawable GdkWindow;
+ typedef struct _GdkDrawable GdkBitmap;
+ typedef struct _GdkDrawable GdkPixmap;
+#else
+ typedef struct _GdkWindow GdkWindow;
+ typedef struct _GdkWindow GdkBitmap;
+ typedef struct _GdkWindow GdkPixmap;
+#endif
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkRegion GdkRegion;
typedef struct _GdkDragContext GdkDragContext;
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkRegion GdkRegion;
typedef struct _GdkDragContext GdkDragContext;
typedef struct _GtkNotebook GtkNotebook;
typedef struct _GtkNotebookPage GtkNotebookPage;
typedef struct _GtkAccelGroup GtkAccelGroup;
typedef struct _GtkNotebook GtkNotebook;
typedef struct _GtkNotebookPage GtkNotebookPage;
typedef struct _GtkAccelGroup GtkAccelGroup;