summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-04-15 08:55:43 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-04-15 08:55:43 (GMT)
commit510d1dc62777e065bb5e646f96ffec7411f78d94 (patch)
treed5a37841f9abfdf61430753c2fc8cd591c74c17f /win/tkWinX.c
parent4faa4997f4fd9227d43916f5909320d075cfd6e0 (diff)
parent62c05cfac502ae7f00a33eb7f95d14458897a915 (diff)
downloadtk-510d1dc62777e065bb5e646f96ffec7411f78d94.zip
tk-510d1dc62777e065bb5e646f96ffec7411f78d94.tar.gz
tk-510d1dc62777e065bb5e646f96ffec7411f78d94.tar.bz2
merge trunk (because tip-496 does not target 8.6 but 8.7, whereas branch tip-496 was created off core-8-6-branch)
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r--win/tkWinX.c84
1 files changed, 7 insertions, 77 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index fca72c3..76d8958 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -13,16 +13,6 @@
#include "tkWinInt.h"
-/*
- * The w32api 1.1 package (included in Mingw 1.1) does not define _WIN32_IE by
- * default. Define it here to gain access to the InitCommonControlsEx API in
- * commctrl.h.
- */
-
-#ifndef _WIN32_IE
-#define _WIN32_IE 0x0550 /* IE 5.5 */
-#endif
-
#include <commctrl.h>
#ifdef _MSC_VER
# pragma comment (lib, "comctl32.lib")
@@ -61,7 +51,6 @@ static const char winScreenName[] = ":0"; /* Default name of windows display. */
static HINSTANCE tkInstance = NULL; /* Application instance handle. */
static int childClassInitialized; /* Registered child class? */
static WNDCLASS childClass; /* Window class for child windows. */
-static int tkPlatformId = 0; /* version of Windows platform */
static int tkWinTheme = 0; /* See TkWinGetPlatformTheme */
static Tcl_Encoding keyInputEncoding = NULL;
/* The current character encoding for
@@ -315,33 +304,26 @@ TkWinXCleanup(
/*
*----------------------------------------------------------------------
*
- * TkWinGetPlatformId --
+ * TkWinGetPlatformTheme --
*
- * Determines whether running under NT, 95, or Win32s, to allow runtime
- * conditional code. Win32s is no longer supported.
+ * Return the Windows drawing style we should be using.
*
* Results:
* The return value is one of:
- * VER_PLATFORM_WIN32s Win32s on Windows 3.1 (not supported)
- * VER_PLATFORM_WIN32_WINDOWS Win32 on Windows 95, 98, ME (not supported)
- * VER_PLATFORM_WIN32_NT Win32 on Windows XP, Vista, Windows 7, Windows 8
- * VER_PLATFORM_WIN32_CE Win32 on Windows CE
- *
- * Side effects:
- * None.
+ * TK_THEME_WIN_CLASSIC 95/98/NT or XP in classic mode
+ * TK_THEME_WIN_XP XP not in classic mode
*
*----------------------------------------------------------------------
*/
int
-TkWinGetPlatformId(void)
+TkWinGetPlatformTheme(void)
{
- if (tkPlatformId == 0) {
+ if (tkWinTheme == 0) {
OSVERSIONINFOW os;
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
GetVersionExW(&os);
- tkPlatformId = os.dwPlatformId;
/*
* Set tkWinTheme to be TK_THEME_WIN_XP or TK_THEME_WIN_CLASSIC. The
@@ -349,8 +331,7 @@ TkWinGetPlatformId(void)
* windows classic theme was selected.
*/
- if ((os.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
- (os.dwMajorVersion == 5 && os.dwMinorVersion == 1)) {
+ if ((os.dwMajorVersion == 5 && os.dwMinorVersion == 1)) {
HKEY hKey;
LPCTSTR szSubKey = TEXT("Control Panel\\Appearance");
LPCTSTR szCurrent = TEXT("Current");
@@ -374,33 +355,6 @@ TkWinGetPlatformId(void)
tkWinTheme = TK_THEME_WIN_CLASSIC;
}
}
- return tkPlatformId;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkWinGetPlatformTheme --
- *
- * Return the Windows drawing style we should be using.
- *
- * Results:
- * The return value is one of:
- * TK_THEME_WIN_CLASSIC 95/98/NT or XP in classic mode
- * TK_THEME_WIN_XP XP not in classic mode
- *
- * Side effects:
- * Could invoke TkWinGetPlatformId.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TkWinGetPlatformTheme(void)
-{
- if (tkPlatformId == 0) {
- TkWinGetPlatformId();
- }
return tkWinTheme;
}
@@ -1638,30 +1592,6 @@ HandleIMEComposition(
/*
*----------------------------------------------------------------------
*
- * Tk_FreeXId --
- *
- * This interface is not needed under Windows.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_FreeXId(
- Display *display,
- XID xid)
-{
- /* Do nothing */
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkWinResendEvent --
*
* This function converts an X event into a Windows event and invokes the