diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-07-17 07:02:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-07-17 07:02:17 (GMT) |
commit | 322815d9cb62dbfd4ebf1fbed27c07ff30b01079 (patch) | |
tree | 360034f9f94b034778e16da0e74204e097f4ada9 /win | |
parent | 7ac7933d135d021289b5a41697c7cf73f9e68ac2 (diff) | |
download | tk-322815d9cb62dbfd4ebf1fbed27c07ff30b01079.zip tk-322815d9cb62dbfd4ebf1fbed27c07ff30b01079.tar.gz tk-322815d9cb62dbfd4ebf1fbed27c07ff30b01079.tar.bz2 |
Eliminate some more unneeded HAVE_* macro's
Diffstat (limited to 'win')
-rwxr-xr-x | win/configure | 25 | ||||
-rw-r--r-- | win/configure.ac | 11 | ||||
-rw-r--r-- | win/makefile.vc | 6 | ||||
-rw-r--r-- | win/ttkWinXPTheme.c | 14 |
4 files changed, 1 insertions, 55 deletions
diff --git a/win/configure b/win/configure index 71d535e..3c6b333 100755 --- a/win/configure +++ b/win/configure @@ -5153,31 +5153,6 @@ fi #-------------------------------------------------------------------- -# Windows XP theme engine header for Ttk -#-------------------------------------------------------------------- - -ac_fn_c_check_header_compile "$LINENO" "uxtheme.h" "ac_cv_header_uxtheme_h" "#include <windows.h> -" -if test "x$ac_cv_header_uxtheme_h" = xyes -then : - printf "%s\n" "#define HAVE_UXTHEME_H 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: xpnative theme will be unavailable" >&5 -printf "%s\n" "$as_me: xpnative theme will be unavailable" >&6;} -fi - -ac_fn_c_check_header_compile "$LINENO" "vssym32.h" "ac_cv_header_vssym32_h" "#include <windows.h> -#include <uxtheme.h> -" -if test "x$ac_cv_header_vssym32_h" = xyes -then : - printf "%s\n" "#define HAVE_VSSYM32_H 1" >>confdefs.h - -fi - - -#-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. diff --git a/win/configure.ac b/win/configure.ac index ae5a1e3..62f057e 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -152,17 +152,6 @@ AC_CHECK_TYPE([uintptr_t], [ ]) #-------------------------------------------------------------------- -# Windows XP theme engine header for Ttk -#-------------------------------------------------------------------- - -AC_CHECK_HEADER([uxtheme.h], [AC_DEFINE(HAVE_UXTHEME_H)], - [AC_MSG_NOTICE([xpnative theme will be unavailable])], - [#include <windows.h>]) -AC_CHECK_HEADER([vssym32.h], [AC_DEFINE(HAVE_VSSYM32_H)], [], - [#include <windows.h> -#include <uxtheme.h>]) - -#-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. diff --git a/win/makefile.vc b/win/makefile.vc index 0fecad6..fb28a91 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -109,15 +109,12 @@ USING_PRE87_TCL = 1 # Extra makefile options processing for non-standard OPTS values ...
!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
-HAVE_UXTHEME_H = 1
TTK_SQUARE_WIDGET = 0
TK_EMBED_SCRIPTS = $(STATIC_BUILD)
!else
!if [nmakehlp -f $(OPTS) "noxp"]
!message *** Exclude support for XP theme
-HAVE_UXTHEME_H = 0
!else
-HAVE_UXTHEME_H = 1
!endif
!if [nmakehlp -f "$(OPTS)" "square"]
!message *** Include ttk square demo widget
@@ -348,9 +345,6 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)" CONFIG_DEFS =/DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
/DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=3 \
-!if $(HAVE_UXTHEME_H)
- /DHAVE_UXTHEME_H=1 \
-!endif
!if $(TTK_SQUARE_WIDGET)
/DTTK_SQUARE_WIDGET=1 \
!endif
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 708ab7a..1ad3bfc 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -16,19 +16,9 @@ */ #include "tkWinInt.h" -#ifndef HAVE_UXTHEME_H -/* Stub for platforms that lack the XP theme API headers: */ -int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) { return TCL_OK; } -#else - #include <windows.h> #include <uxtheme.h> -#if defined(HAVE_VSSYM32_H) || _MSC_VER > 1500 -# include <vssym32.h> -#else -# include <tmschema.h> -#endif - +#include <vssym32.h> #include "ttk/ttkTheme.h" typedef HTHEME (STDAPICALLTYPE OpenThemeDataProc)(HWND hwnd, @@ -1360,5 +1350,3 @@ MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) return TCL_OK; } - -#endif /* HAVE_UXTHEME_H */ |