Author: hbelusca Date: Mon Mar 6 00:13:43 2017 New Revision: 74115
URL: http://svn.reactos.org/svn/reactos?rev=74115&view=rev Log: [REACTOS-CLT2017]: Cherry-pick few trunk improvements/fixes: - [UXTHME] Implement drawing themed text with shadows, by Giannis (r74083) - [MKISOFS] Update mkisofs to schily-2017-02-16, by Colin (r74112)
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/ (props changed) branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/draw.c branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/nonclient.c branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/cdrecord/version.h branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/include/schily/schily.h branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/libschily/dirent.c branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/mkisofs/mkisofs.c
Propchange: branches/ReactOS-0.4.4-CLT2017/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Mar 6 00:13:43 2017 @@ -24,3 +24,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 +/trunk/reactos:74083,74112
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/draw.c URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/dl... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -1617,6 +1617,9 @@ return E_NOTIMPL; }
+typedef int (WINAPI * DRAWSHADOWTEXT)(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, + COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset); + /*********************************************************************** * DrawThemeText (UXTHEME.@) */ @@ -1630,34 +1633,89 @@ LOGFONTW logfont; COLORREF textColor; COLORREF oldTextColor; + COLORREF shadowColor; + POINT ptShadowOffset; int oldBkMode; RECT rt; - + int iShadowType; + TRACE("%d %d: stub\n", iPartId, iStateId); if(!hTheme) return E_HANDLE; - + hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont); - if(SUCCEEDED(hr)) { + if(SUCCEEDED(hr)) + { hFont = CreateFontIndirectW(&logfont); if(!hFont) - TRACE("Failed to create font\n"); - } + { + ERR("Failed to create font\n"); + } + } + CopyRect(&rt, pRect); if(hFont) oldFont = SelectObject(hdc, hFont); - + + oldBkMode = SetBkMode(hdc, TRANSPARENT); + if(dwTextFlags2 & DTT_GRAYED) textColor = GetSysColor(COLOR_GRAYTEXT); else { if(FAILED(GetThemeColor(hTheme, iPartId, iStateId, TMT_TEXTCOLOR, &textColor))) textColor = GetTextColor(hdc); } + + hr = GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_TEXTSHADOWTYPE, &iShadowType); + if (SUCCEEDED(hr)) + { + ERR("Got shadow type %d\n", iShadowType); + + hr = GetThemeColor(hTheme, iPartId, iStateId, TMT_TEXTSHADOWCOLOR, &shadowColor); + if (FAILED(hr)) + { + ERR("GetThemeColor failed\n"); + } + + hr = GetThemePosition(hTheme, iPartId, iStateId, TMT_TEXTSHADOWOFFSET, &ptShadowOffset); + if (FAILED(hr)) + { + ERR("GetThemePosition failed\n"); + } + + if (iShadowType == TST_SINGLE) + { + oldTextColor = SetTextColor(hdc, shadowColor); + OffsetRect(&rt, ptShadowOffset.x, ptShadowOffset.y); + DrawTextW(hdc, pszText, iCharCount, &rt, dwTextFlags); + OffsetRect(&rt, -ptShadowOffset.x, -ptShadowOffset.y); + SetTextColor(hdc, oldTextColor); + } + else if (iShadowType == TST_CONTINUOUS) + { + HANDLE hcomctl32 = GetModuleHandleW(L"comctl32.dll"); + DRAWSHADOWTEXT pDrawShadowText; + if (!hcomctl32) + { + hcomctl32 = LoadLibraryW(L"comctl32.dll"); + if (!hcomctl32) + ERR("Failed to load comctl32\n"); + } + + pDrawShadowText = (DRAWSHADOWTEXT)GetProcAddress(hcomctl32, "DrawShadowText"); + if (pDrawShadowText) + { + pDrawShadowText(hdc, pszText, iCharCount, &rt, dwTextFlags, textColor, shadowColor, ptShadowOffset.x, ptShadowOffset.y); + goto cleanup; + } + } + } + oldTextColor = SetTextColor(hdc, textColor); - oldBkMode = SetBkMode(hdc, TRANSPARENT); DrawTextW(hdc, pszText, iCharCount, &rt, dwTextFlags); + SetTextColor(hdc, oldTextColor); +cleanup: SetBkMode(hdc, oldBkMode); - SetTextColor(hdc, oldTextColor);
if(hFont) { SelectObject(hdc, oldFont);
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/nonclient.c URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/dl... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -136,7 +136,7 @@
oldTextColor = SetTextColor(hdc, textColor); oldBkMode = SetBkMode(hdc, TRANSPARENT); - DrawTextW(hdc, pszText, iCharCount, &rt, dwTextFlags); + DrawThemeText(hTheme, hdc, iPartId, iStateId, pszText, iCharCount, dwTextFlags, dwTextFlags, pRect); SetBkMode(hdc, oldBkMode); SetTextColor(hdc, oldTextColor);
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/cdrecord/version.h URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/sd... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/cdrecord/version.h [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/cdrecord/version.h [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -1,6 +1,6 @@ -/* @(#)version.h 1.92 16/01/26 Copyright 2007-2016 J. Schilling */ +/* @(#)version.h 1.93 16/12/15 Copyright 2007-2016 J. Schilling */
/* * The version for cdrtools programs */ -#define VERSION "3.02a06" +#define VERSION "3.02a07"
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/include/schily/schily.h URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/sd... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/include/schily/schily.h [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/include/schily/schily.h [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -1,4 +1,4 @@ -/* @(#)schily.h 1.121 16/11/04 Copyright 1985-2016 J. Schilling */ +/* @(#)schily.h 1.122 16/12/18 Copyright 1985-2016 J. Schilling */ /* * Definitions for libschily * @@ -543,7 +543,7 @@ #ifdef __never__ #undef error #define error js_error -#endif +#endif /* __never__ */ #undef dprintf #define dprintf js_dprintf #undef fprintf @@ -558,9 +558,9 @@ #ifndef HAVE_SNPRINTF #undef snprintf #define snprintf js_snprintf -#endif -#endif -#endif +#endif /* HAVE_SNPRINTF */ +#endif /* SCHILY_PRINT */ +#endif /* NO_SCHILY_PRINT */
#ifndef NO_SCHILY_GETLINE /* Define to disable *getline() redirect */ #undef getline
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/libschily/dirent.c URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/sd... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/libschily/dirent.c [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/libschily/dirent.c [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -1,11 +1,11 @@ -/* @(#)dirent.c 1.3 12/03/20 Copyright 2011 J. Schilling */ +/* @(#)dirent.c 1.4 17/02/02 Copyright 2011-2017 J. Schilling */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)dirent.c 1.3 12/03/20 Copyright 2011 J. Schilling"; + "@(#)dirent.c 1.4 17/02/02 Copyright 2011-2017 J. Schilling"; #endif /* - * Copyright (c) 2011 J. Schilling + * Copyright (c) 2011-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -14,6 +14,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -84,7 +86,8 @@ dp->dd_dirname[len] = '\'; len++; } - dp->dd_dirname[len] = '*'; + dp->dd_dirname[len++] = '*'; + dp->dd_dirname[len] = '\0'; dp->dd_handle = -1; dp->dd_state = 0;
Modified: branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/mkisofs/mkisofs.c URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-CLT2017/reactos/sd... ============================================================================== --- branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/mkisofs/mkisofs.c [iso-8859-1] (original) +++ branches/ReactOS-0.4.4-CLT2017/reactos/sdk/tools/mkisofs/schilytools/mkisofs/mkisofs.c [iso-8859-1] Mon Mar 6 00:13:43 2017 @@ -1,8 +1,8 @@ -/* @(#)mkisofs.c 1.288 16/12/13 joerg */ +/* @(#)mkisofs.c 1.289 17/01/05 joerg */ #include <schily/mconfig.h> #ifndef lint static UConst char sccsid[] = - "@(#)mkisofs.c 1.288 16/12/13 joerg"; + "@(#)mkisofs.c 1.289 17/01/05 joerg"; #endif /* * Program mkisofs.c - generate iso9660 filesystem based upon directory @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1997-2016 J. Schilling + * Copyright (c) 1997-2017 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -132,14 +132,13 @@ int all_files = 1; /* New default is to include all files */ BOOL Hflag = FALSE; /* Follow links on cmdline (-H) */ BOOL follow_links = FALSE; /* Follow all links (-L) */ -#if defined(IS_CYGWIN) || defined(__MINGW32__) || defined(_MSC_VER) +#if defined(__MINGW32__) || defined(_MSC_VER) /* - * Do not cache inodes on Cygwin by default - * See below in main(), cache for 64bit ino_t + * Never cache inodes on DOS or Win-DOS. */ int cache_inodes = 0; #else -int cache_inodes = 1; /* Cache inodes if OS has unique inodes */ +int cache_inodes = -1; /* Cache inodes if OS has unique inodes */ #endif int rationalize = 0; /* Need to call stat_fix() */ int rationalize_uid = 0; @@ -2088,14 +2087,6 @@ modification_date.l_usec = tv_begun.tv_usec; modification_date.l_gmtoff = -100;
-#if defined(IS_CYGWIN) - /* - * If we have 64 bit inode numbers, Cygwin should be able to work - * correctly on NTFS. - */ - if (sizeof (ino_t) >= 8) - cache_inodes = 1; -#endif cac--; cav++; c = getvargs(&cac, &cav, GA_NO_PROPS, flags); @@ -2119,7 +2110,7 @@ if (pversion) { printf(_("mkisofs %s (%s-%s-%s)\n\n\ Copyright (C) 1993-1997 %s\n\ -Copyright (C) 1997-2016 %s\n"), +Copyright (C) 1997-2017 %s\n"), version_string, HOST_CPU, HOST_VENDOR, HOST_OS, _("Eric Youngdale"), @@ -2212,6 +2203,25 @@ (Llong)strlen(biblio)); } } +#ifdef DUPLICATES_ONCE + /* + * If -duplicates-once was specified, do not implicitly enable + * -cache-inodes. + */ + if (cache_inodes < 0 && duplicates_once) + cache_inodes = 0; +#endif +#if defined(IS_CYGWIN) + /* + * If we have 64 bit inode numbers, Cygwin should be able to work + * correctly on NTFS, otherwise disable caching unless it has + * been enforced via -cache-inodes. + */ + if (cache_inodes < 0 && sizeof (ino_t) < 8) + cache_inodes = 0; +#endif + if (cache_inodes < 0) + cache_inodes = 1; #ifdef DUPLICATES_ONCE if (!cache_inodes && !duplicates_once) { #else