From 455f7c8205e5dc29d99026b158ae0a394dccc839 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 1 Jan 2008 20:38:33 +0000 Subject: [PATCH] do VMS-specific X symbols redefinitions only once in wx/platform.h instead of doing it in individual files git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/platform.h | 9 +++++++++ src/generic/scrlwing.cpp | 4 ---- src/motif/app.cpp | 5 ----- src/motif/bmpbuttn.cpp | 4 ---- src/motif/bmpmotif.cpp | 5 ----- src/motif/button.cpp | 4 ---- src/motif/checkbox.cpp | 4 ---- src/motif/choice.cpp | 5 ----- src/motif/dialog.cpp | 7 ------- src/motif/evtloop.cpp | 5 ----- src/motif/filedlg.cpp | 6 ------ src/motif/frame.cpp | 6 ------ src/motif/listbox.cpp | 5 ----- src/motif/mdi.cpp | 5 ----- src/motif/menu.cpp | 2 -- src/motif/msgdlg.cpp | 1 - src/motif/radiobox.cpp | 4 ---- src/motif/radiobut.cpp | 4 ---- src/motif/scrolbar.cpp | 1 - src/motif/statbox.cpp | 4 ---- src/motif/stattext.cpp | 4 ---- src/motif/textctrl.cpp | 4 ---- src/motif/toolbar.cpp | 4 ---- src/motif/toplevel.cpp | 4 ---- src/motif/utils.cpp | 4 ---- src/motif/window.cpp | 6 ------ src/x11/utilsx.cpp | 1 - 27 files changed, 9 insertions(+), 108 deletions(-) diff --git a/include/wx/platform.h b/include/wx/platform.h index 22b2469aaf..328f4bc194 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -640,6 +640,15 @@ # define wxVMS_USE_STD #endif +#ifdef __VMS +#define XtDisplay XTDISPLAY +#ifdef __WXMOTIF__ +#define XtParent XTPARENT +#define XtScreen XTSCREEN +#define XtWindow XTWINDOW +#endif +#endif + /* Choose which method we will use for updating menus * - in OnIdle, or when we receive a wxEVT_MENU_OPEN event. * Presently, only Windows and GTK+ support wxEVT_MENU_OPEN. diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 0476ed31dc..00dac29274 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -25,10 +25,6 @@ #pragma hdrstop #endif -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/scrolwin.h" #ifndef WX_PRECOMP diff --git a/src/motif/app.cpp b/src/motif/app.cpp index c987ef6334..6208995cd0 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -12,11 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtParent XTPARENT -#define XtDisplay XTDISPLAY -#endif - #include "wx/app.h" #ifndef WX_PRECOMP diff --git a/src/motif/bmpbuttn.cpp b/src/motif/bmpbuttn.cpp index 5e94188ba4..9ebada34b8 100644 --- a/src/motif/bmpbuttn.cpp +++ b/src/motif/bmpbuttn.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtScreen XTSCREEN -#endif - #include "wx/bmpbuttn.h" #ifdef __VMS__ diff --git a/src/motif/bmpmotif.cpp b/src/motif/bmpmotif.cpp index 155adc1cf4..525bc355a0 100644 --- a/src/motif/bmpmotif.cpp +++ b/src/motif/bmpmotif.cpp @@ -12,11 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtParent XTPARENT -#define XtDisplay XTDISPLAY -#endif - #include "wx/motif/bmpmotif.h" #ifndef WX_PRECOMP diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 99324c3f9c..7b85a01c74 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/button.h" #ifdef __VMS__ diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 42f44e24fc..e6fc7d7314 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/checkbox.h" #ifndef WX_PRECOMP diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 0405533162..4a05b6829d 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -14,11 +14,6 @@ #if wxUSE_CHOICE -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtParent XTPARENT -#endif - #include "wx/choice.h" #ifndef WX_PRECOMP diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 59b8baf077..ceb4ca922e 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -12,13 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW -#define XtParent XTPARENT -#define XtScreen XTSCREEN -#endif - #include "wx/dialog.h" #ifndef WX_PRECOMP diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 6886f5d3e1..367982dcb8 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -20,11 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtParent XTPARENT -#define XtDisplay XTDISPLAY -#endif - #ifndef WX_PRECOMP #include "wx/event.h" #include "wx/app.h" diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 889ee87e14..490f92fb23 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -12,12 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtParent XTPARENT -#define XtWindow XTWINDOW -#endif - #include "wx/filedlg.h" #ifndef WX_PRECOMP diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 87af9ad8ef..355b54f48a 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -20,12 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW -#define XtScreen XTSCREEN -#endif - #include "wx/frame.h" #ifndef WX_PRECOMP diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index f23c8b7611..4d59337023 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -24,11 +24,6 @@ #include "wx/arrstr.h" #endif -#ifdef __VMS -#define XtParent XTPARENT -#define XtDisplay XTDISPLAY -#endif - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/motif/mdi.cpp b/src/motif/mdi.cpp index 2f18487ea4..998bc5d107 100644 --- a/src/motif/mdi.cpp +++ b/src/motif/mdi.cpp @@ -12,11 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW -#endif - #include "wx/mdi.h" #ifndef WX_PRECOMP diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 68eee40b91..6eae7b96dd 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -33,8 +33,6 @@ #ifdef __VMS__ #pragma message disable nosimpint -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW #endif #include #include diff --git a/src/motif/msgdlg.cpp b/src/motif/msgdlg.cpp index df115f63e7..49b7fb8468 100644 --- a/src/motif/msgdlg.cpp +++ b/src/motif/msgdlg.cpp @@ -21,7 +21,6 @@ #include "wx/wxprec.h" #ifdef __VMS -#define XtDisplay XTDISPLAY #pragma message disable nosimpint #include "wx/vms_x_fix.h" #endif diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index 00bcec5189..00303033a4 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -14,10 +14,6 @@ #if wxUSE_RADIOBOX -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/radiobox.h" #ifndef WX_PRECOMP diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 4ac378762e..5c38eaf30d 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/radiobut.h" #ifndef WX_PRECOMP diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index d54a1f1d80..587be3ca89 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -16,7 +16,6 @@ #ifdef __VMS__ #pragma message disable nosimpint -#define XtDisplay XTDISPLAY #endif #include #include diff --git a/src/motif/statbox.cpp b/src/motif/statbox.cpp index 22deeec8c9..6fdcb4c5d2 100644 --- a/src/motif/statbox.cpp +++ b/src/motif/statbox.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/statbox.h" #ifndef WX_PRECOMP diff --git a/src/motif/stattext.cpp b/src/motif/stattext.cpp index 3526a2bf2d..5ddee74390 100644 --- a/src/motif/stattext.cpp +++ b/src/motif/stattext.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #if wxUSE_STATTEXT #include "wx/stattext.h" diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 7d9b41ed0b..666da47caa 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -20,10 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtParent XTPARENT -#endif - #include #include #include diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index cbb8223d82..b6cebddc1b 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -20,10 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/toolbar.h" #ifndef WX_PRECOMP diff --git a/src/motif/toplevel.cpp b/src/motif/toplevel.cpp index f21849c3d5..4f219ee426 100644 --- a/src/motif/toplevel.cpp +++ b/src/motif/toplevel.cpp @@ -29,10 +29,6 @@ #endif #ifdef __VMS__ -#define XtDisplay XTDISPLAY -#define XtParent XTPARENT -#define XtScreen XTSCREEN -#define XtWindow XTWINDOW #pragma message disable nosimpint #endif diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 595e14696a..2453e7bd0d 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -20,10 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/utils.h" #ifndef WX_PRECOMP diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 95000fe071..211dc3bf35 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -20,12 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW -#define XtScreen XTSCREEN -#endif - #ifndef WX_PRECOMP #include "wx/hash.h" #include "wx/log.h" diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index c01eeb8af8..9bc793e343 100644 --- a/src/x11/utilsx.cpp +++ b/src/x11/utilsx.cpp @@ -14,7 +14,6 @@ #ifdef __VMS #define XShapeQueryExtension XSHAPEQUERYEXTENSION -#define XtDisplay XTDISPLAY #endif #include "wx/x11/privx.h" -- 2.45.2