diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 821f695bac..89494b73ce 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -194,8 +194,12 @@ wxLayoutDirection wxAppBase::GetLayoutDirection() const // GUI-specific command line options handling // ---------------------------------------------------------------------------- +#ifdef __WXUNIVERSAL__ #define OPTION_THEME "theme" +#endif +#if defined(__WXDFB__) #define OPTION_MODE "mode" +#endif void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser) { diff --git a/src/common/cairo.cpp b/src/common/cairo.cpp index a8e75c506c..61c969feb9 100644 --- a/src/common/cairo.cpp +++ b/src/common/cairo.cpp @@ -224,15 +224,6 @@ (cairo_surface_t *surface), (surface), -1) \ wxCAIRO_PLATFORM_METHODS(m) - -#if wxUSE_PANGO -#define wxFOR_ALL_PANGO_CAIRO_VOIDMETHODS(m) \ - m( pango_cairo_update_layout, \ - (cairo_t *cr, PangoLayout *layout), (cr, layout) ) \ - m( pango_cairo_show_layout, \ - (cairo_t *cr, PangoLayout *layout), (cr, layout) ) -#endif - #define wxCAIRO_DECLARE_TYPE(rettype, name, args, argnames, defret) \ typedef rettype (*wxCAIRO_METHOD_TYPE(name)) args ; \ wxCAIRO_METHOD_TYPE(name) wxDL_METHOD_NAME(name); @@ -383,6 +374,7 @@ bool wxCairoInit() return wxCairo::Initialize(); } +#ifndef __WXGTK__ extern "C" { @@ -399,12 +391,12 @@ extern "C" // we currently link directly to Cairo on GTK since it is usually available there, // so don't use our cairo_xyz wrapper functions until the decision is made to // always load Cairo dynamically there. -#ifndef __WXGTK__ + wxFOR_ALL_CAIRO_VOIDMETHODS(wxIMPL_CAIRO_VOIDFUNC) wxFOR_ALL_CAIRO_METHODS(wxIMPL_CAIRO_FUNC) -#endif } // extern "C" +#endif // !__WXGTK__ //---------------------------------------------------------------------------- // wxCairoModule diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 66c97afdc2..16fb21469a 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -153,7 +153,6 @@ wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \ // seemed to eliminate the position change). #include "wx/dialog.h" -#define wxCC_GENERIC_TLW_IS_DIALOG #define wxComboCtrlGenericTLW wxDialog #if defined(__WXGTK20__) @@ -194,7 +193,6 @@ wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \ #else #include "wx/dialog.h" -#define wxCC_GENERIC_TLW_IS_DIALOG #define wxComboCtrlGenericTLW wxDialog #define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform) diff --git a/src/common/file.cpp b/src/common/file.cpp index 724da53382..6ef8e2dc60 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -126,10 +126,6 @@ #include "wx/msw/private.h" #endif -#ifndef MAX_PATH - #define MAX_PATH 512 -#endif - // ============================================================================ // implementation of wxFile // ============================================================================ diff --git a/src/common/imagiff.cpp b/src/common/imagiff.cpp index 196fe89938..6bf0aa92cf 100644 --- a/src/common/imagiff.cpp +++ b/src/common/imagiff.cpp @@ -241,7 +241,6 @@ bool wxIFFDecoder::CanRead() // Permission for use in wxWidgets has been gratefully given. typedef unsigned char byte; -#define IFFDEBUG 0 /************************************************************************* void decomprle(source, destination, source length, buffer size) diff --git a/src/common/quantize.cpp b/src/common/quantize.cpp index 618f4e26b6..9cba613091 100644 --- a/src/common/quantize.cpp +++ b/src/common/quantize.cpp @@ -61,7 +61,6 @@ #define RGB_GREEN 1 #define RGB_BLUE 2 #endif -#define RGB_PIXELSIZE 3 #define MAXJSAMPLE 255 #define CENTERJSAMPLE 128 diff --git a/src/common/string.cpp b/src/common/string.cpp index a2f18a8b49..6b3e8bacbc 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -48,18 +48,16 @@ #include #endif +#ifndef HAVE_STD_STRING_COMPARE // string handling functions used by wxString: #if wxUSE_UNICODE_UTF8 - #define wxStringMemcpy memcpy #define wxStringMemcmp memcmp - #define wxStringMemchr memchr #define wxStringStrlen strlen #else - #define wxStringMemcpy wxTmemcpy #define wxStringMemcmp wxTmemcmp - #define wxStringMemchr wxTmemchr #define wxStringStrlen wxStrlen #endif +#endif // define a function declared in wx/buffer.h here as we don't have buffer.cpp // and don't want to add it just because of this simple function diff --git a/src/common/stringimpl.cpp b/src/common/stringimpl.cpp index 3dad9eb3c0..8083aa5780 100644 --- a/src/common/stringimpl.cpp +++ b/src/common/stringimpl.cpp @@ -41,24 +41,6 @@ #include #include -// allocating extra space for each string consumes more memory but speeds up -// the concatenation operations (nLen is the current string's length) -// NB: EXTRA_ALLOC must be >= 0! -#define EXTRA_ALLOC (19 - nLen % 16) - - -// string handling functions used by wxString: -#if wxUSE_UNICODE_UTF8 - #define wxStringMemcpy memcpy - #define wxStringMemcmp memcmp - #define wxStringMemchr memchr -#else - #define wxStringMemcpy wxTmemcpy - #define wxStringMemcmp wxTmemcmp - #define wxStringMemchr wxTmemchr -#endif - - // --------------------------------------------------------------------------- // static class variables definition // --------------------------------------------------------------------------- @@ -82,6 +64,22 @@ const wxChar WXDLLIMPEXP_BASE *wxEmptyString = wxT(""); #else +// allocating extra space for each string consumes more memory but speeds up +// the concatenation operations (nLen is the current string's length) +// NB: EXTRA_ALLOC must be >= 0! +#define EXTRA_ALLOC (19 - nLen % 16) + +// string handling functions used by wxString: +#if wxUSE_UNICODE_UTF8 + #define wxStringMemcpy memcpy + #define wxStringMemcmp memcmp + #define wxStringMemchr memchr +#else + #define wxStringMemcpy wxTmemcpy + #define wxStringMemcmp wxTmemcmp + #define wxStringMemchr wxTmemchr +#endif + // for an empty string, GetStringData() will return this address: this // structure has the same layout as wxStringData and it's data() method will // return the empty string (dummy pointer) diff --git a/src/generic/choicbkg.cpp b/src/generic/choicbkg.cpp index e397cc0003..5ea3a62538 100644 --- a/src/generic/choicbkg.cpp +++ b/src/generic/choicbkg.cpp @@ -35,13 +35,6 @@ #include "wx/imaglist.h" -// ---------------------------------------------------------------------------- -// various wxWidgets macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) - // ---------------------------------------------------------------------------- // event table // ---------------------------------------------------------------------------- diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index 9d14f00991..76b15fc072 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -45,7 +45,6 @@ // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp #define TEXTCTRLXADJUST 0 -#define TEXTXADJUST 0 // how much is read-only text's x adjusted #define DEFAULT_DROPBUTTON_WIDTH 19 #elif defined(__WXMSW__) @@ -54,7 +53,6 @@ // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp #define TEXTCTRLXADJUST 2 -#define TEXTXADJUST 0 // how much is read-only text's x adjusted #define DEFAULT_DROPBUTTON_WIDTH 17 #elif defined(__WXGTK__) @@ -63,7 +61,6 @@ // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp #define TEXTCTRLXADJUST -1 -#define TEXTXADJUST 1 // how much is read-only text's x adjusted #define DEFAULT_DROPBUTTON_WIDTH 23 #elif defined(__WXMAC__) @@ -72,7 +69,6 @@ // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp #define TEXTCTRLXADJUST 0 -#define TEXTXADJUST 0 // how much is read-only text's x adjusted #define DEFAULT_DROPBUTTON_WIDTH 22 #else @@ -81,7 +77,6 @@ // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp #define TEXTCTRLXADJUST 0 -#define TEXTXADJUST 0 // how much is read-only text's x adjusted #define DEFAULT_DROPBUTTON_WIDTH 19 #endif diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 767bd09ec6..e43ec60cde 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -59,6 +59,8 @@ using namespace std; // wxGraphicsPath implementation //----------------------------------------------------------------------------- +#include +#ifdef __WXMSW__ // TODO remove this dependency (gdiplus needs the macros) #ifndef max @@ -69,8 +71,6 @@ using namespace std; #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif -#include -#ifdef __WXMSW__ #include // Notice that the order is important: cairo-win32.h includes windows.h which // pollutes the global name space with macros so include our own header which diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index b1cf580d12..c4fe5662b2 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -56,18 +56,6 @@ const char wxGridNameStr[] = "grid"; -#if defined(__WXMOTIF__) - #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) -#else - #define WXUNUSED_MOTIF(identifier) identifier -#endif - -#if defined(__WXGTK__) - #define WXUNUSED_GTK(identifier) WXUNUSED(identifier) -#else - #define WXUNUSED_GTK(identifier) identifier -#endif - // Required for wxIs... functions #include diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index c9584d1ff3..bcf8b642ce 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -35,13 +35,6 @@ #include "wx/statline.h" #include "wx/imaglist.h" -// ---------------------------------------------------------------------------- -// various wxWidgets macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) - // ---------------------------------------------------------------------------- // event table // ---------------------------------------------------------------------------- diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index a90856a3ee..600db2a3e4 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -70,8 +70,10 @@ #include "wx/time.h" +#ifdef __SMARTPHONE__ // the suffix we add to the button to show that the dialog can be expanded #define EXPAND_SUFFIX wxT(" >>") +#endif #define CAN_SAVE_FILES (wxUSE_FILE && wxUSE_FILEDLG) diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index ef724cbac3..36bcbdc343 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -31,13 +31,6 @@ #include "wx/generic/buttonbar.h" #endif -// ---------------------------------------------------------------------------- -// various wxWidgets macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) - // ---------------------------------------------------------------------------- // event table // ---------------------------------------------------------------------------- diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 9d44156b06..c0855fbc05 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1611,7 +1611,9 @@ wxVariant wxColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const // wxCursorProperty // ----------------------------------------------------------------------- +#if wxPG_CAN_DRAW_CURSOR #define wxPG_CURSOR_IMAGE_WIDTH 32 +#endif #define NUM_CURSORS 28 diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 61d858bb26..f805f504c7 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -80,8 +80,6 @@ #if defined(__WXMSW__) // tested - #define wxPG_NAT_BUTTON_BORDER_ANY 1 - #define wxPG_NAT_BUTTON_BORDER_X 1 #define wxPG_NAT_BUTTON_BORDER_Y 1 #define wxPG_CHECKMARK_XADJ 1 @@ -100,8 +98,6 @@ #define wxPG_CHECKMARK_HADJ (-2) #define wxPG_CHECKMARK_DEFLATE 3 - #define wxPG_NAT_BUTTON_BORDER_ANY 1 - #define wxPG_NAT_BUTTON_BORDER_X 1 #define wxPG_NAT_BUTTON_BORDER_Y 1 #define wxPG_TEXTCTRLYADJUST 0 @@ -114,8 +110,6 @@ #define wxPG_CHECKMARK_HADJ -6 #define wxPG_CHECKMARK_DEFLATE 0 - #define wxPG_NAT_BUTTON_BORDER_ANY 0 - #define wxPG_NAT_BUTTON_BORDER_X 0 #define wxPG_NAT_BUTTON_BORDER_Y 0 #define wxPG_TEXTCTRLYADJUST 0 @@ -128,8 +122,6 @@ #define wxPG_CHECKMARK_HADJ 0 #define wxPG_CHECKMARK_DEFLATE 0 - #define wxPG_NAT_BUTTON_BORDER_ANY 0 - #define wxPG_NAT_BUTTON_BORDER_X 0 #define wxPG_NAT_BUTTON_BORDER_Y 0 #define wxPG_TEXTCTRLYADJUST 0 diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index b85a8ed49b..b64764b206 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -56,9 +56,6 @@ #include -#define wxPG_CUSTOM_IMAGE_WIDTH 20 // for wxColourProperty etc. - - // ----------------------------------------------------------------------- // wxStringProperty // -----------------------------------------------------------------------