remove unused macro definitions

and limit others to the configurations which use them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-04-04 16:44:30 +00:00
parent 010e897e48
commit 9b41d18b25
18 changed files with 31 additions and 92 deletions

View File

@@ -194,8 +194,12 @@ wxLayoutDirection wxAppBase::GetLayoutDirection() const
// GUI-specific command line options handling // GUI-specific command line options handling
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __WXUNIVERSAL__
#define OPTION_THEME "theme" #define OPTION_THEME "theme"
#endif
#if defined(__WXDFB__)
#define OPTION_MODE "mode" #define OPTION_MODE "mode"
#endif
void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser) void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
{ {

View File

@@ -224,15 +224,6 @@
(cairo_surface_t *surface), (surface), -1) \ (cairo_surface_t *surface), (surface), -1) \
wxCAIRO_PLATFORM_METHODS(m) 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) \ #define wxCAIRO_DECLARE_TYPE(rettype, name, args, argnames, defret) \
typedef rettype (*wxCAIRO_METHOD_TYPE(name)) args ; \ typedef rettype (*wxCAIRO_METHOD_TYPE(name)) args ; \
wxCAIRO_METHOD_TYPE(name) wxDL_METHOD_NAME(name); wxCAIRO_METHOD_TYPE(name) wxDL_METHOD_NAME(name);
@@ -383,6 +374,7 @@ bool wxCairoInit()
return wxCairo::Initialize(); return wxCairo::Initialize();
} }
#ifndef __WXGTK__
extern "C" extern "C"
{ {
@@ -399,12 +391,12 @@ extern "C"
// we currently link directly to Cairo on GTK since it is usually available there, // 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 // so don't use our cairo_xyz wrapper functions until the decision is made to
// always load Cairo dynamically there. // always load Cairo dynamically there.
#ifndef __WXGTK__
wxFOR_ALL_CAIRO_VOIDMETHODS(wxIMPL_CAIRO_VOIDFUNC) wxFOR_ALL_CAIRO_VOIDMETHODS(wxIMPL_CAIRO_VOIDFUNC)
wxFOR_ALL_CAIRO_METHODS(wxIMPL_CAIRO_FUNC) wxFOR_ALL_CAIRO_METHODS(wxIMPL_CAIRO_FUNC)
#endif
} // extern "C" } // extern "C"
#endif // !__WXGTK__
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// wxCairoModule // wxCairoModule

View File

@@ -153,7 +153,6 @@ wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \
// seemed to eliminate the position change). // seemed to eliminate the position change).
#include "wx/dialog.h" #include "wx/dialog.h"
#define wxCC_GENERIC_TLW_IS_DIALOG
#define wxComboCtrlGenericTLW wxDialog #define wxComboCtrlGenericTLW wxDialog
#if defined(__WXGTK20__) #if defined(__WXGTK20__)
@@ -194,7 +193,6 @@ wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \
#else #else
#include "wx/dialog.h" #include "wx/dialog.h"
#define wxCC_GENERIC_TLW_IS_DIALOG
#define wxComboCtrlGenericTLW wxDialog #define wxComboCtrlGenericTLW wxDialog
#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform) #define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform)

View File

@@ -126,10 +126,6 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
#ifndef MAX_PATH
#define MAX_PATH 512
#endif
// ============================================================================ // ============================================================================
// implementation of wxFile // implementation of wxFile
// ============================================================================ // ============================================================================

View File

@@ -241,7 +241,6 @@ bool wxIFFDecoder::CanRead()
// Permission for use in wxWidgets has been gratefully given. // Permission for use in wxWidgets has been gratefully given.
typedef unsigned char byte; typedef unsigned char byte;
#define IFFDEBUG 0
/************************************************************************* /*************************************************************************
void decomprle(source, destination, source length, buffer size) void decomprle(source, destination, source length, buffer size)

View File

@@ -61,7 +61,6 @@
#define RGB_GREEN 1 #define RGB_GREEN 1
#define RGB_BLUE 2 #define RGB_BLUE 2
#endif #endif
#define RGB_PIXELSIZE 3
#define MAXJSAMPLE 255 #define MAXJSAMPLE 255
#define CENTERJSAMPLE 128 #define CENTERJSAMPLE 128

View File

@@ -48,18 +48,16 @@
#include <sstream> #include <sstream>
#endif #endif
#ifndef HAVE_STD_STRING_COMPARE
// string handling functions used by wxString: // string handling functions used by wxString:
#if wxUSE_UNICODE_UTF8 #if wxUSE_UNICODE_UTF8
#define wxStringMemcpy memcpy
#define wxStringMemcmp memcmp #define wxStringMemcmp memcmp
#define wxStringMemchr memchr
#define wxStringStrlen strlen #define wxStringStrlen strlen
#else #else
#define wxStringMemcpy wxTmemcpy
#define wxStringMemcmp wxTmemcmp #define wxStringMemcmp wxTmemcmp
#define wxStringMemchr wxTmemchr
#define wxStringStrlen wxStrlen #define wxStringStrlen wxStrlen
#endif #endif
#endif
// define a function declared in wx/buffer.h here as we don't have buffer.cpp // 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 // and don't want to add it just because of this simple function

View File

@@ -41,24 +41,6 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
// 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 // static class variables definition
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -82,6 +64,22 @@ const wxChar WXDLLIMPEXP_BASE *wxEmptyString = wxT("");
#else #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 // for an empty string, GetStringData() will return this address: this
// structure has the same layout as wxStringData and it's data() method will // structure has the same layout as wxStringData and it's data() method will
// return the empty string (dummy pointer) // return the empty string (dummy pointer)

View File

@@ -35,13 +35,6 @@
#include "wx/imaglist.h" #include "wx/imaglist.h"
// ----------------------------------------------------------------------------
// various wxWidgets macros
// ----------------------------------------------------------------------------
// check that the page index is valid
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -45,7 +45,6 @@
// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
#define TEXTCTRLXADJUST 0 #define TEXTCTRLXADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19 #define DEFAULT_DROPBUTTON_WIDTH 19
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
@@ -54,7 +53,6 @@
// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
#define TEXTCTRLXADJUST 2 #define TEXTCTRLXADJUST 2
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 17 #define DEFAULT_DROPBUTTON_WIDTH 17
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
@@ -63,7 +61,6 @@
// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
#define TEXTCTRLXADJUST -1 #define TEXTCTRLXADJUST -1
#define TEXTXADJUST 1 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 23 #define DEFAULT_DROPBUTTON_WIDTH 23
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
@@ -72,7 +69,6 @@
// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
#define TEXTCTRLXADJUST 0 #define TEXTCTRLXADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 22 #define DEFAULT_DROPBUTTON_WIDTH 22
#else #else
@@ -81,7 +77,6 @@
// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp // meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
#define TEXTCTRLXADJUST 0 #define TEXTCTRLXADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19 #define DEFAULT_DROPBUTTON_WIDTH 19
#endif #endif

View File

@@ -59,6 +59,8 @@ using namespace std;
// wxGraphicsPath implementation // wxGraphicsPath implementation
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include <cairo.h>
#ifdef __WXMSW__
// TODO remove this dependency (gdiplus needs the macros) // TODO remove this dependency (gdiplus needs the macros)
#ifndef max #ifndef max
@@ -69,8 +71,6 @@ using namespace std;
#define min(a,b) (((a) < (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b))
#endif #endif
#include <cairo.h>
#ifdef __WXMSW__
#include <cairo-win32.h> #include <cairo-win32.h>
// Notice that the order is important: cairo-win32.h includes windows.h which // 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 // pollutes the global name space with macros so include our own header which

View File

@@ -56,18 +56,6 @@
const char wxGridNameStr[] = "grid"; 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 // Required for wxIs... functions
#include <ctype.h> #include <ctype.h>

View File

@@ -35,13 +35,6 @@
#include "wx/statline.h" #include "wx/statline.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
// ----------------------------------------------------------------------------
// various wxWidgets macros
// ----------------------------------------------------------------------------
// check that the page index is valid
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -70,8 +70,10 @@
#include "wx/time.h" #include "wx/time.h"
#ifdef __SMARTPHONE__
// the suffix we add to the button to show that the dialog can be expanded // the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX wxT(" >>") #define EXPAND_SUFFIX wxT(" >>")
#endif
#define CAN_SAVE_FILES (wxUSE_FILE && wxUSE_FILEDLG) #define CAN_SAVE_FILES (wxUSE_FILE && wxUSE_FILEDLG)

View File

@@ -31,13 +31,6 @@
#include "wx/generic/buttonbar.h" #include "wx/generic/buttonbar.h"
#endif #endif
// ----------------------------------------------------------------------------
// various wxWidgets macros
// ----------------------------------------------------------------------------
// check that the page index is valid
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1611,7 +1611,9 @@ wxVariant wxColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const
// wxCursorProperty // wxCursorProperty
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
#if wxPG_CAN_DRAW_CURSOR
#define wxPG_CURSOR_IMAGE_WIDTH 32 #define wxPG_CURSOR_IMAGE_WIDTH 32
#endif
#define NUM_CURSORS 28 #define NUM_CURSORS 28

View File

@@ -80,8 +80,6 @@
#if defined(__WXMSW__) #if defined(__WXMSW__)
// tested // tested
#define wxPG_NAT_BUTTON_BORDER_ANY 1
#define wxPG_NAT_BUTTON_BORDER_X 1
#define wxPG_NAT_BUTTON_BORDER_Y 1 #define wxPG_NAT_BUTTON_BORDER_Y 1
#define wxPG_CHECKMARK_XADJ 1 #define wxPG_CHECKMARK_XADJ 1
@@ -100,8 +98,6 @@
#define wxPG_CHECKMARK_HADJ (-2) #define wxPG_CHECKMARK_HADJ (-2)
#define wxPG_CHECKMARK_DEFLATE 3 #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_NAT_BUTTON_BORDER_Y 1
#define wxPG_TEXTCTRLYADJUST 0 #define wxPG_TEXTCTRLYADJUST 0
@@ -114,8 +110,6 @@
#define wxPG_CHECKMARK_HADJ -6 #define wxPG_CHECKMARK_HADJ -6
#define wxPG_CHECKMARK_DEFLATE 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_NAT_BUTTON_BORDER_Y 0
#define wxPG_TEXTCTRLYADJUST 0 #define wxPG_TEXTCTRLYADJUST 0
@@ -128,8 +122,6 @@
#define wxPG_CHECKMARK_HADJ 0 #define wxPG_CHECKMARK_HADJ 0
#define wxPG_CHECKMARK_DEFLATE 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_NAT_BUTTON_BORDER_Y 0
#define wxPG_TEXTCTRLYADJUST 0 #define wxPG_TEXTCTRLYADJUST 0

View File

@@ -56,9 +56,6 @@
#include <float.h> #include <float.h>
#define wxPG_CUSTOM_IMAGE_WIDTH 20 // for wxColourProperty etc.
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// wxStringProperty // wxStringProperty
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------