From 1e26cbfcaf8e4311b2860fae57a1569c6c430464 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Oct 2022 18:33:33 +0200 Subject: [PATCH] Always set wxUSE_GRAPHICS_CONTEXT to 1 by default Don't bother with compiler and gcc version check, all compilers should provide GDI+ headers/libraries by now. --- build/cmake/setup.h.in | 6 ------ include/wx/android/setup.h | 21 ++------------------- include/wx/gtk/setup.h | 21 ++------------------- include/wx/motif/setup.h | 21 ++------------------- include/wx/msw/setup.h | 21 ++------------------- include/wx/osx/setup.h | 21 ++------------------- include/wx/setup_inc.h | 21 ++------------------- include/wx/univ/setup.h | 21 ++------------------- setup.h.in | 6 ------ 9 files changed, 14 insertions(+), 145 deletions(-) diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index dd44a0b70d..1a487555e8 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -346,13 +346,7 @@ #cmakedefine01 wxUSE_WEBVIEW_WEBKIT2 #endif - -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) #cmakedefine01 wxUSE_GRAPHICS_CONTEXT -#else -#cmakedefine01 wxUSE_GRAPHICS_CONTEXT -#endif #cmakedefine01 wxUSE_CAIRO diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 7b447f7609..9138445694 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -833,27 +833,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/gtk/setup.h b/include/wx/gtk/setup.h index 9ef3a57e0f..4504bd73b4 100644 --- a/include/wx/gtk/setup.h +++ b/include/wx/gtk/setup.h @@ -834,27 +834,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/motif/setup.h b/include/wx/motif/setup.h index 09cb0b2798..444a986aac 100644 --- a/include/wx/motif/setup.h +++ b/include/wx/motif/setup.h @@ -834,27 +834,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 09ec02e341..81e409e428 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -834,27 +834,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/osx/setup.h b/include/wx/osx/setup.h index 007582d5ed..50b6985912 100644 --- a/include/wx/osx/setup.h +++ b/include/wx/osx/setup.h @@ -840,27 +840,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 2cc691c41d..495af5ed8e 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -830,27 +830,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index 0aded0bd80..9159c93c6d 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -833,27 +833,10 @@ // Enable wxGraphicsContext and related classes for a modern 2D drawing API. // -// Default is 1 except if you're using a compiler without support for GDI+ -// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are -// known to have them). For other compilers (e.g. older mingw32) you may need -// to install the headers (and just the headers) yourself. If you do, change -// the setting below manually. +// Default is 1. // -// Recommended setting: 1 if supported by the compilation environment - -// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION() -// here as this file is included from wx/platform.h before they're defined. -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) +// Recommended setting: 1, setting it to 0 disables a lot of functionality. #define wxUSE_GRAPHICS_CONTEXT 1 -#else -// Disable support for other Windows compilers, enable it if your compiler -// comes with new enough SDK or you installed the headers manually. -// -// Notice that this will be set by configure under non-Windows platforms -// anyhow so the value there is not important. -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif // Enable wxGraphicsContext implementation using Cairo library. // diff --git a/setup.h.in b/setup.h.in index 365c3c7d3b..091ecf8b79 100644 --- a/setup.h.in +++ b/setup.h.in @@ -346,13 +346,7 @@ #define wxUSE_WEBVIEW_WEBKIT2 0 #endif - -#if defined(_MSC_VER) || \ - (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8)) #define wxUSE_GRAPHICS_CONTEXT 0 -#else -#define wxUSE_GRAPHICS_CONTEXT 0 -#endif #define wxUSE_CAIRO 0