ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2019
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
36 participants
281 discussions
Start a n
N
ew thread
[reactos] 01/01: [NETSTAT] '-p UDP' depends on '-a'
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af0d1d2f98749ed382ab7…
commit af0d1d2f98749ed382ab7e718b91a9f11fd8a073 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sat Jun 29 15:14:39 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Fri Aug 16 14:46:45 2019 +0200 [NETSTAT] '-p UDP' depends on '-a' --- base/applications/network/netstat/netstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/applications/network/netstat/netstat.c b/base/applications/network/netstat/netstat.c index 6dcc174215d..97a843b143d 100644 --- a/base/applications/network/netstat/netstat.c +++ b/base/applications/network/netstat/netstat.c @@ -212,7 +212,7 @@ BOOL DisplayOutput(VOID) ShowUdpStatistics(); ConResPuts(StdOut, IDS_ACTIVE_CONNECT); DisplayTableHeader(); - return ShowUdpTable(); + return (bDoShowAllCons ? ShowUdpTable() : TRUE); default: break; }
5 years, 4 months
1
0
0
0
[reactos] 01/01: [NTFS] Correctly find attributes stored in another file record in MFT (and referenced in data stream)
by Sylvain Deverre
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d3df0da50b99f8f86844…
commit 4d3df0da50b99f8f868449d262b88ffe2ac1d789 Author: Sylvain Deverre <deverre.sylv(a)gmail.com> AuthorDate: Thu Aug 8 22:09:13 2019 +0200 Commit: Colin Finck <colin(a)reactos.org> CommitDate: Fri Aug 16 11:08:29 2019 +0200 [NTFS] Correctly find attributes stored in another file record in MFT (and referenced in data stream) --- drivers/filesystems/ntfs/attrib.c | 93 ++++++++++++++++++++++++++++----------- drivers/filesystems/ntfs/mft.c | 56 +++++++++++++++++++++++ drivers/filesystems/ntfs/ntfs.h | 25 ++++++++++- 3 files changed, 147 insertions(+), 27 deletions(-) diff --git a/drivers/filesystems/ntfs/attrib.c b/drivers/filesystems/ntfs/attrib.c index 1a04b763a2a..006465ce975 100644 --- a/drivers/filesystems/ntfs/attrib.c +++ b/drivers/filesystems/ntfs/attrib.c @@ -1258,7 +1258,74 @@ InternalReadNonResidentAttributes(PFIND_ATTR_CONTXT Context) } ReleaseAttributeContext(ListContext); - Context->NonResidentEnd = (PNTFS_ATTR_RECORD)((PCHAR)Context->NonResidentStart + ListSize); + Context->NonResidentEnd = (PNTFS_ATTRIBUTE_LIST_ITEM)((PCHAR)Context->NonResidentStart + ListSize); + return STATUS_SUCCESS; +} + +static +PNTFS_ATTRIBUTE_LIST_ITEM +InternalGetNextAttributeListItem(PFIND_ATTR_CONTXT Context) +{ + PNTFS_ATTRIBUTE_LIST_ITEM NextItem; + + if (Context->NonResidentCur == (PVOID)-1) + { + return NULL; + } + + if (Context->NonResidentCur == NULL || Context->NonResidentCur->Type == AttributeEnd) + { + Context->NonResidentCur = (PVOID)-1; + return NULL; + } + + if (Context->NonResidentCur->Length == 0) + { + DPRINT1("Broken length list entry length !"); + Context->NonResidentCur = (PVOID)-1; + return NULL; + } + + NextItem = (PNTFS_ATTRIBUTE_LIST_ITEM)((PCHAR)Context->NonResidentCur + Context->NonResidentCur->Length); + if (NextItem->Length == 0 || NextItem->Type == AttributeEnd) + { + Context->NonResidentCur = (PVOID)-1; + return NULL; + } + + if (NextItem < Context->NonResidentStart || NextItem > Context->NonResidentEnd) + { + Context->NonResidentCur = (PVOID)-1; + return NULL; + } + + Context->NonResidentCur = NextItem; + return NextItem; +} + +NTSTATUS +FindFirstAttributeListItem(PFIND_ATTR_CONTXT Context, + PNTFS_ATTRIBUTE_LIST_ITEM *Item) +{ + if (Context->NonResidentStart == NULL || Context->NonResidentStart->Type == AttributeEnd) + { + return STATUS_UNSUCCESSFUL; + } + + Context->NonResidentCur = Context->NonResidentStart; + *Item = Context->NonResidentCur; + return STATUS_SUCCESS; +} + +NTSTATUS +FindNextAttributeListItem(PFIND_ATTR_CONTXT Context, + PNTFS_ATTRIBUTE_LIST_ITEM *Item) +{ + *Item = InternalGetNextAttributeListItem(Context); + if (*Item == NULL) + { + return STATUS_UNSUCCESSFUL; + } return STATUS_SUCCESS; } @@ -1308,30 +1375,6 @@ InternalGetNextAttribute(PFIND_ATTR_CONTXT Context) return NULL; } - if (Context->CurrAttr < Context->NonResidentStart || - Context->CurrAttr >= Context->NonResidentEnd) - { - Context->CurrAttr = Context->NonResidentStart; - } - else if (Context->CurrAttr->Length != 0) - { - NextAttribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)Context->CurrAttr + Context->CurrAttr->Length); - Context->Offset += ((ULONG_PTR)NextAttribute - (ULONG_PTR)Context->CurrAttr); - Context->CurrAttr = NextAttribute; - } - else - { - DPRINT1("Broken length!\n"); - Context->CurrAttr = (PVOID)-1; - return NULL; - } - - if (Context->CurrAttr < Context->NonResidentEnd && - Context->CurrAttr->Type != AttributeEnd) - { - return Context->CurrAttr; - } - Context->CurrAttr = (PVOID)-1; return NULL; } diff --git a/drivers/filesystems/ntfs/mft.c b/drivers/filesystems/ntfs/mft.c index f03074cdfda..e1411f0ac96 100644 --- a/drivers/filesystems/ntfs/mft.c +++ b/drivers/filesystems/ntfs/mft.c @@ -140,6 +140,7 @@ FindAttribute(PDEVICE_EXTENSION Vcb, NTSTATUS Status; FIND_ATTR_CONTXT Context; PNTFS_ATTR_RECORD Attribute; + PNTFS_ATTRIBUTE_LIST_ITEM AttrListItem; DPRINT("FindAttribute(%p, %p, 0x%x, %S, %lu, %p, %p)\n", Vcb, MftRecord, Type, Name, NameLength, AttrCtx, Offset); @@ -184,6 +185,61 @@ FindAttribute(PDEVICE_EXTENSION Vcb, Status = FindNextAttribute(&Context, &Attribute); } + /* No attribute found, check if it is referenced in another file record */ + Status = FindFirstAttributeListItem(&Context, &AttrListItem); + while (NT_SUCCESS(Status)) + { + if (AttrListItem->Type == Type && AttrListItem->NameLength == NameLength) + { + if (NameLength != 0) + { + PWCHAR AttrName; + + AttrName = (PWCHAR)((PCHAR)AttrListItem + AttrListItem->NameOffset); + DPRINT("%.*S, %.*S\n", AttrListItem->NameLength, AttrName, NameLength, Name); + if (RtlCompareMemory(AttrName, Name, NameLength * sizeof(WCHAR)) == (NameLength * sizeof(WCHAR))) + { + Found = TRUE; + } + } + else + { + Found = TRUE; + } + + if (Found == TRUE) + { + /* Get the MFT Index of attribute */ + ULONGLONG MftIndex; + PFILE_RECORD_HEADER RemoteHdr; + + MftIndex = AttrListItem->MFTIndex & NTFS_MFT_MASK; + RemoteHdr = ExAllocateFromNPagedLookasideList(&Vcb->FileRecLookasideList); + + if (RemoteHdr == NULL) + { + FindCloseAttribute(&Context); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Check we are not reading ourselves */ + if (MftRecord->MFTRecordNumber == MftIndex) + { + DPRINT1("Attribute list references missing attribute to this file entry !"); + ExFreeToNPagedLookasideList(&Vcb->FileRecLookasideList, RemoteHdr); + FindCloseAttribute(&Context); + return STATUS_OBJECT_NAME_NOT_FOUND; + } + /* Read the new file record */ + ReadFileRecord(Vcb, MftIndex, RemoteHdr); + Status = FindAttribute(Vcb, RemoteHdr, Type, Name, NameLength, AttrCtx, Offset); + ExFreeToNPagedLookasideList(&Vcb->FileRecLookasideList, RemoteHdr); + FindCloseAttribute(&Context); + return Status; + } + } + Status = FindNextAttributeListItem(&Context, &AttrListItem); + } FindCloseAttribute(&Context); return STATUS_OBJECT_NAME_NOT_FOUND; } diff --git a/drivers/filesystems/ntfs/ntfs.h b/drivers/filesystems/ntfs/ntfs.h index c50a077e1c1..aa85b810883 100644 --- a/drivers/filesystems/ntfs/ntfs.h +++ b/drivers/filesystems/ntfs/ntfs.h @@ -300,6 +300,17 @@ typedef struct }; } NTFS_ATTR_RECORD, *PNTFS_ATTR_RECORD; +typedef struct +{ + ULONG Type; + USHORT Length; + UCHAR NameLength; + UCHAR NameOffset; + ULONGLONG StartingVCN; + ULONGLONG MFTIndex; + USHORT Instance; +} NTFS_ATTRIBUTE_LIST_ITEM, *PNTFS_ATTRIBUTE_LIST_ITEM; + // The beginning and length of an attribute record are always aligned to an 8-byte boundary, // relative to the beginning of the file record. #define ATTR_RECORD_ALIGNMENT 8 @@ -486,6 +497,7 @@ typedef struct _NTFS_ATTR_CONTEXT ULONGLONG CacheRunCurrentOffset; LARGE_MCB DataRunsMCB; ULONGLONG FileMFTIndex; + ULONGLONG FileOwnerMFTIndex; /* If attribute list attribute, reference the original file */ PNTFS_ATTR_RECORD pRecord; } NTFS_ATTR_CONTEXT, *PNTFS_ATTR_CONTEXT; @@ -534,8 +546,9 @@ typedef struct _FIND_ATTR_CONTXT PNTFS_ATTR_RECORD FirstAttr; PNTFS_ATTR_RECORD CurrAttr; PNTFS_ATTR_RECORD LastAttr; - PNTFS_ATTR_RECORD NonResidentStart; - PNTFS_ATTR_RECORD NonResidentEnd; + PNTFS_ATTRIBUTE_LIST_ITEM NonResidentStart; + PNTFS_ATTRIBUTE_LIST_ITEM NonResidentEnd; + PNTFS_ATTRIBUTE_LIST_ITEM NonResidentCur; ULONG Offset; } FIND_ATTR_CONTXT, *PFIND_ATTR_CONTXT; @@ -659,6 +672,14 @@ PFILENAME_ATTRIBUTE GetBestFileNameFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord); +NTSTATUS +FindFirstAttributeListItem(PFIND_ATTR_CONTXT Context, + PNTFS_ATTRIBUTE_LIST_ITEM *Item); + +NTSTATUS +FindNextAttributeListItem(PFIND_ATTR_CONTXT Context, + PNTFS_ATTRIBUTE_LIST_ITEM *Item); + NTSTATUS FindFirstAttribute(PFIND_ATTR_CONTXT Context, PDEVICE_EXTENSION Vcb,
5 years, 4 months
1
0
0
0
[reactos] 01/01: Revert "[WININET_APITEST] Add Download testcase (#1832)" (#1839)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86b8aeb3f2b42ef4f23d7…
commit 86b8aeb3f2b42ef4f23d7eecd2269e246ebde955 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Aug 16 17:01:03 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Aug 16 17:01:03 2019 +0900 Revert "[WININET_APITEST] Add Download testcase (#1832)" (#1839) This reverts commit 7464241adabfbdfec5a058697632a8d3938479fb. --- modules/rostests/apitests/wininet/CMakeLists.txt | 4 +- modules/rostests/apitests/wininet/Download.c | 83 ------------------------ modules/rostests/apitests/wininet/testlist.c | 2 - 3 files changed, 2 insertions(+), 87 deletions(-) diff --git a/modules/rostests/apitests/wininet/CMakeLists.txt b/modules/rostests/apitests/wininet/CMakeLists.txt index 45baa402dda..fb18c91ac17 100644 --- a/modules/rostests/apitests/wininet/CMakeLists.txt +++ b/modules/rostests/apitests/wininet/CMakeLists.txt @@ -1,7 +1,7 @@ -add_executable(wininet_apitest Download.c InternetOpen.c testlist.c) +add_executable(wininet_apitest InternetOpen.c testlist.c) target_link_libraries(wininet_apitest wine) set_module_type(wininet_apitest win32cui) #add_delay_importlibs(wininet_apitest wininet) -add_importlibs(wininet_apitest wininet msvcrt kernel32 ntdll) +add_importlibs(wininet_apitest msvcrt kernel32 ntdll) add_rostests_file(TARGET wininet_apitest) diff --git a/modules/rostests/apitests/wininet/Download.c b/modules/rostests/apitests/wininet/Download.c deleted file mode 100644 index 307f532f065..00000000000 --- a/modules/rostests/apitests/wininet/Download.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * PROJECT: ReactOS API Tests - * LICENSE: LGPL-2.1+ (
https://spdx.org/licenses/LGPL-2.1+
) - * PURPOSE: wininet Download testcase - * COPYRIGHT: Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) - */ -#include <apitest.h> -#include <stdio.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#include <windef.h> -#include <wininet.h> - -#define FILENAME "download-testdata.txt" -#define TESTDATA "This is a test data.\r\n" - -static void DoDownload1(const char *url, const char *filename) -{ - HANDLE hFile; - HINTERNET hInternet, hConnect; - static const char s_header[] = "Accept: */" "*\r\n\r\n"; - BYTE buffer[256]; - DWORD cbRead; - BOOL ret; - - hFile = CreateFileA(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hFile != INVALID_HANDLE_VALUE, "hFile was INVALID_HANDLE_VALUE.\n"); - - hInternet = InternetOpenA(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); - ok(hInternet != NULL, "hInternet was NULL.\n"); - - hConnect = InternetOpenUrlA(hInternet, url, s_header, lstrlenA(s_header), - INTERNET_FLAG_DONT_CACHE, 0); - ok(hConnect != NULL, "hConnect was NULL.\n"); - - for (;;) - { - Sleep(100); - - ret = InternetReadFile(hConnect, buffer, ARRAYSIZE(buffer), &cbRead); - if (!ret || !cbRead) - break; - - if (!WriteFile(hFile, buffer, cbRead, &cbRead, NULL)) - { - ok(0, "WriteFile returns FALSE.\n"); - break; - } - } - - ok_int(InternetCloseHandle(hConnect), TRUE); - ok_int(InternetCloseHandle(hInternet), TRUE); - CloseHandle(hFile); -} - -static void DoDownload2(const char *url, const char *filename) -{ - FILE *fp; - char buf[256]; - DoDownload1(url, filename); - ok_int(GetFileAttributesA(FILENAME) != INVALID_FILE_ATTRIBUTES, TRUE); - fp = fopen(FILENAME, "rb"); - ok(fp != NULL, "fp was NULL.\n"); - ok(fgets(buf, ARRAYSIZE(buf), fp) != NULL, "fgets failed.\n"); - ok_str(buf, TESTDATA); - fclose(fp); - DeleteFileA(FILENAME); -} - -START_TEST(Download) -{ - //
https://tinyurl.com/y4cpy2fu
- // --> - //
https://raw.githubusercontent.com/katahiromz/downloads/master/download-test…
- DoDownload2("
https://tinyurl.com/y4cpy2fu
", FILENAME); - - DoDownload2( - "
https://raw.githubusercontent.com/katahiromz/downloads/master/download-test…
", - FILENAME); -} diff --git a/modules/rostests/apitests/wininet/testlist.c b/modules/rostests/apitests/wininet/testlist.c index 801c8c4d42e..16c84d6f87f 100644 --- a/modules/rostests/apitests/wininet/testlist.c +++ b/modules/rostests/apitests/wininet/testlist.c @@ -3,12 +3,10 @@ #define STANDALONE #include <apitest.h> -extern void func_Download(void); extern void func_InternetOpen(void); const struct test winetest_testlist[] = { - { "Download", func_Download }, { "InternetOpen", func_InternetOpen }, { 0, 0 }
5 years, 4 months
1
0
0
0
[reactos] 01/01: [ROSAPPS][NETREG] Fix build
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2c5b3e3265993372282ca…
commit 2c5b3e3265993372282cafdc1f14a6a0319aa985 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Aug 16 16:57:40 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Aug 16 16:57:40 2019 +0900 [ROSAPPS][NETREG] Fix build --- modules/rosapps/applications/net/netreg/netreg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rosapps/applications/net/netreg/netreg.cpp b/modules/rosapps/applications/net/netreg/netreg.cpp index de836c972b1..f7f5105761e 100644 --- a/modules/rosapps/applications/net/netreg/netreg.cpp +++ b/modules/rosapps/applications/net/netreg/netreg.cpp @@ -417,7 +417,7 @@ SOCKET make_listening_socket( int port ) { fprintf( stderr, "Creating the listener\n" ); SOCKET l = socket( PF_INET, SOCK_STREAM, 0 ); - fprintf( stderr, "Socket %I64x\n", l ); + fprintf( stderr, "Socket %x\n", l ); if( l == INVALID_SOCKET ) return l; if( bind( l, (struct sockaddr *)&sa, sizeof( sa ) ) < 0 ) {
5 years, 4 months
1
0
0
0
[reactos] 01/01: Update Headers for Printing and Other
by James Tabor
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d48345a0ee1804cedb80a…
commit d48345a0ee1804cedb80a817721a57ded39efd85 Author: James Tabor <james.tabor(a)reactos.org> AuthorDate: Thu Aug 15 21:39:26 2019 -0500 Commit: James Tabor <james.tabor(a)reactos.org> CommitDate: Thu Aug 15 21:39:26 2019 -0500 Update Headers for Printing and Other Add missing flags and function types. Fix typos. --- sdk/include/psdk/wingdi.h | 7 +++++++ win32ss/gdi/eng/surface.h | 2 +- win32ss/include/ntgdihdl.h | 3 +++ win32ss/include/ntgdityp.h | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/include/psdk/wingdi.h b/sdk/include/psdk/wingdi.h index 537837813c6..bcaeb6c0e1b 100644 --- a/sdk/include/psdk/wingdi.h +++ b/sdk/include/psdk/wingdi.h @@ -1034,6 +1034,7 @@ extern "C" { #define SETALLJUSTVALUES 771 #define SETCHARSET 772 #define STRETCHBLT 2048 +#define METAFILE_DRIVER 2049 #define GETSETSCREENPARAMS 3072 #define QUERYDIBSUPPORT 3073 #define BEGIN_PATH 4096 @@ -1056,6 +1057,12 @@ extern "C" { #define CLOSECHANNEL 4112 #define POSTSCRIPT_PASSTHROUGH 4115 #define ENCAPSULATED_POSTSCRIPT 4116 +#define POSTSCRIPT_IDENTIFY 4117 +#define POSTSCRIPT_INJECTION 4118 +#define CHECKJPEGFORMAT 4119 +#define CHECKPNGFORMAT 4120 +#define GET_PS_FEATURESETTING 4121 +#define SPCLPASSTHROUGH2 4568 #define QDI_SETDIBITS 1 #define QDI_GETDIBITS 2 #define QDI_DIBTOSCREEN 4 diff --git a/win32ss/gdi/eng/surface.h b/win32ss/gdi/eng/surface.h index ee05847e99c..e65ff12a9e3 100644 --- a/win32ss/gdi/eng/surface.h +++ b/win32ss/gdi/eng/surface.h @@ -9,7 +9,7 @@ typedef struct _SURFACE //XDCOBJ * pdcoAA; FLONG flags; struct _PALETTE * const ppal; // Use SURFACE_vSetPalette to assign a palette - //UINT unk_050; + struct _EWNDOBJ *pWinObj; union { diff --git a/win32ss/include/ntgdihdl.h b/win32ss/include/ntgdihdl.h index 1cbb8545d45..1c0c230823b 100644 --- a/win32ss/include/ntgdihdl.h +++ b/win32ss/include/ntgdihdl.h @@ -173,11 +173,14 @@ #define LDC_INIT_DOCUMENT 0x00000040 #define LDC_INIT_PAGE 0x00000080 #define LDC_STARTPAGE 0x00000100 +#define LDC_NEXTBAND 0x00000200 #define LDC_CLOCKWISE 0x00002000 #define LDC_KILL_DOCUMENT 0x00010000 #define LDC_META_PRINT 0x00020000 #define LDC_DIRECT 0x00040000 #define LDC_RESET_BANDING 0x00080000 +#define LDC_RESETDC 0x00200000 +#define LDC_UFIMAP 0x00400000 #define LDC_INFODC 0x01000000 /* If CreateIC was passed. */ #define LDC_DEVCAPS 0x02000000 #define LDC_ATENDPAGE 0x10000000 diff --git a/win32ss/include/ntgdityp.h b/win32ss/include/ntgdityp.h index 3cce9e8afe0..748e4041034 100644 --- a/win32ss/include/ntgdityp.h +++ b/win32ss/include/ntgdityp.h @@ -572,7 +572,7 @@ typedef struct _DRIVER_FUNCTIONS PFN_DrvDisableSurface DisableSurface; PFN_DrvAssertMode AssertMode; PFN_DrvOffset Offset; - PFN_DrvResetDevice ResetPDEV; + PFN_DrvResetPDEV ResetPDEV; PFN_DrvDisableDriver DisableDriver; PVOID Unknown1; PFN_DrvCreateDeviceBitmap CreateDeviceBitmap;
5 years, 4 months
1
0
0
0
[reactos] 02/02: [COMCTL32] Saturated images: Take mask-images in account.
by Andreas Maier
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4093681ad0f66fda0a9a6…
commit 4093681ad0f66fda0a9a6d65a6a6af8fed1941b4 Author: Andreas Maier <staubim(a)quantentunnel.de> AuthorDate: Sat Jun 1 19:09:44 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Aug 15 21:11:45 2019 +0200 [COMCTL32] Saturated images: Take mask-images in account. This fixes CORE-14209 - Some icons not drawn in IDA Free --- dll/win32/comctl32/imagelist.c | 58 +++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/dll/win32/comctl32/imagelist.c b/dll/win32/comctl32/imagelist.c index c7c780bbee3..4b4b0647642 100644 --- a/dll/win32/comctl32/imagelist.c +++ b/dll/win32/comctl32/imagelist.c @@ -1281,7 +1281,7 @@ ImageList_DrawEx (HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, } #ifdef __REACTOS__ -static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC dest_dc, int dest_x, int dest_y, +static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC srce_dcMask, HDC dest_dc, int dest_x, int dest_y, #else static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, #endif @@ -1316,7 +1316,7 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des #endif SelectObject( hdc, bmp ); #ifdef __REACTOS__ - if (!BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY )) + if (!BitBlt(hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY)) { TRACE("BitBlt failed\n"); goto done; @@ -1375,7 +1375,7 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des info->bmiColors[1].rgbGreen = 0xff; info->bmiColors[1].rgbBlue = 0xff; info->bmiColors[1].rgbReserved = 0; - if (!(mask = CreateDIBSection( himl->hdcMask, info, DIB_RGB_COLORS, &mask_bits, 0, 0 ))) + if (!(mask = CreateDIBSection( srce_dcMask, info, DIB_RGB_COLORS, &mask_bits, 0, 0))) { TRACE("CreateDIBSection failed %i\n", GetLastError()); goto done; @@ -1386,13 +1386,13 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des SelectObject(hdc, bmp); goto done; } - if (!BitBlt(hdc, 0, 0, cx, cy, himl->hdcMask, src_x, src_y, SRCCOPY)) + if (!BitBlt( hdc, 0, 0, cx, cy, srce_dcMask, src_x, src_y, SRCCOPY)) { TRACE("BitBlt failed %i\n", GetLastError()); SelectObject(hdc, bmp); goto done; } - if (SelectObject(hdc, bmp) == NULL) + if (SelectObject( hdc, bmp) == NULL) { TRACE("SelectObject failed %i\n", GetLastError()); goto done; @@ -1414,11 +1414,12 @@ done: } #ifdef __REACTOS__ -HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, - int src_x, int src_y, int cx, int cy, COLORREF rgbFg) +BOOL saturate_image(HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, + int src_x, int src_y, int cx, int cy, COLORREF rgbFg, + HDC *hdcImageListDC, HDC *hdcMaskListDC) { - HDC hdc = NULL; - HBITMAP bmp = 0; + HDC hdc = NULL, hdcMask = NULL; + HBITMAP bmp = 0, bmpMask = 0; BITMAPINFO *info; unsigned int *ptr; @@ -1470,16 +1471,37 @@ HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, *ptr = RGBA(mixed_color, mixed_color, mixed_color, GetAValue(orig_color)); } + if (himl->hdcMask) + { + hdcMask = CreateCompatibleDC(NULL); + bmpMask = CreateCompatibleBitmap(hdcMask, cx, cy); + + SelectObject(hdcMask, bmpMask); + + if (!BitBlt(hdcMask, 0, 0, cx, cy, himl->hdcMask, src_x, src_y, SRCCOPY)) + { + ERR("BitBlt failed %i\n", GetLastError()); + DeleteDC(hdcMask); + hdcMask = NULL; + goto done; + } + TRACE("mask ok\n"); + } + done: if (bmp) DeleteObject(bmp); + if (bmpMask) + DeleteObject(bmpMask); if (info) HeapFree(GetProcessHeap(), 0, info); /* return the handle to our desaturated dc, that will substitute its original counterpart in the next calls */ - return hdc; + *hdcMaskListDC = hdcMask; + *hdcImageListDC = hdc; + return (hdc != NULL); } #endif /* __REACTOS__ */ @@ -1511,7 +1533,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) POINT pt; BOOL has_alpha; #ifdef __REACTOS__ - HDC hdcSaturated = NULL; + HDC hdcSaturated = NULL, hdcSaturatedMask = NULL; #endif if (!pimldp || !(himl = pimldp->himl)) return FALSE; @@ -1569,12 +1591,12 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) */ if (fState & ILS_SATURATE) { - hdcSaturated = saturate_image(himl, pimldp->hdcDst, pimldp->x, pimldp->y, - pt.x, pt.y, cx, cy, pimldp->rgbFg); - - if (hdcSaturated != NULL) + if (saturate_image(himl, pimldp->hdcDst, pimldp->x, pimldp->y, + pt.x, pt.y, cx, cy, pimldp->rgbFg, + &hdcSaturated, &hdcSaturatedMask)) { hImageListDC = hdcSaturated; + hMaskListDC = hdcSaturatedMask; /* shitty way of getting subroutines to blit at the right place (top left corner), as our modified imagelist only contains a single image for performance reasons */ pt.x = 0; @@ -1604,7 +1626,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) if (bIsTransparent) { #ifdef __REACTOS__ - bResult = alpha_blend_image( himl, hImageListDC, pimldp->hdcDst, pimldp->x, pimldp->y, + bResult = alpha_blend_image( himl, hImageListDC, hMaskListDC, pimldp->hdcDst, pimldp->x, pimldp->y, #else bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y, #endif @@ -1618,7 +1640,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour)); PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY ); #ifdef __REACTOS__ - alpha_blend_image( himl, hImageListDC, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); + alpha_blend_image( himl, hImageListDC, hMaskListDC, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); #else alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); #endif @@ -1748,6 +1770,8 @@ cleanup: #ifdef __REACTOS__ if (hdcSaturated) DeleteDC(hdcSaturated); + if (hdcSaturatedMask) + DeleteDC(hdcSaturatedMask); #endif DeleteObject(hBlendMaskBmp); DeleteObject(hImageBmp);
5 years, 4 months
1
0
0
0
[reactos] 01/02: [COMCTL32] Improve failure cases.
by Andreas Maier
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49a797543f1201726999f…
commit 49a797543f1201726999f0d67fabed327b58744f Author: Andreas Maier <staubim(a)quantentunnel.de> AuthorDate: Fri May 31 10:15:06 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Aug 15 21:11:45 2019 +0200 [COMCTL32] Improve failure cases. --- dll/win32/comctl32/imagelist.c | 54 +++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/dll/win32/comctl32/imagelist.c b/dll/win32/comctl32/imagelist.c index 11ad5080f0a..c7c780bbee3 100644 --- a/dll/win32/comctl32/imagelist.c +++ b/dll/win32/comctl32/imagelist.c @@ -1316,7 +1316,11 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des #endif SelectObject( hdc, bmp ); #ifdef __REACTOS__ - BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY ); + if (!BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY )) + { + TRACE("BitBlt failed\n"); + goto done; + } #else BitBlt( hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY ); #endif @@ -1372,10 +1376,27 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des info->bmiColors[1].rgbBlue = 0xff; info->bmiColors[1].rgbReserved = 0; if (!(mask = CreateDIBSection( himl->hdcMask, info, DIB_RGB_COLORS, &mask_bits, 0, 0 ))) + { + TRACE("CreateDIBSection failed %i\n", GetLastError()); + goto done; + } + if (SelectObject(hdc, mask) == NULL) + { + TRACE("SelectObject failed %i\n", GetLastError()); + SelectObject(hdc, bmp); + goto done; + } + if (!BitBlt(hdc, 0, 0, cx, cy, himl->hdcMask, src_x, src_y, SRCCOPY)) + { + TRACE("BitBlt failed %i\n", GetLastError()); + SelectObject(hdc, bmp); + goto done; + } + if (SelectObject(hdc, bmp) == NULL) + { + TRACE("SelectObject failed %i\n", GetLastError()); goto done; - SelectObject( hdc, mask ); - BitBlt( hdc, 0, 0, cx, cy, himl->hdcMask, src_x, src_y, SRCCOPY ); - SelectObject( hdc, bmp ); + } for (i = 0, ptr = bits; i < cy; i++) for (j = 0; j < cx; j++, ptr++) if ((((BYTE *)mask_bits)[i * width_bytes + j / 8] << (j % 8)) & 0x80) *ptr = 0; @@ -1422,10 +1443,18 @@ HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, if (!(bmp = CreateDIBSection(himl->hdcImage, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done; /* bind both surfaces */ - SelectObject(hdc, bmp); + if (SelectObject(hdc, bmp) == NULL) + { + TRACE("SelectObject failed\n"); + goto done; + } /* copy into our dc the section that covers just the icon we we're asked for */ - BitBlt(hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY); + if (!BitBlt(hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY)) + { + TRACE("BitBlt failed!\n"); + goto done; + } /* loop every pixel of the bitmap */ for (i = 0, ptr = bits; i < cx * cy; i++, ptr++) @@ -1543,11 +1572,14 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) hdcSaturated = saturate_image(himl, pimldp->hdcDst, pimldp->x, pimldp->y, pt.x, pt.y, cx, cy, pimldp->rgbFg); - hImageListDC = hdcSaturated; - /* shitty way of getting subroutines to blit at the right place (top left corner), - as our modified imagelist only contains a single image for performance reasons */ - pt.x = 0; - pt.y = 0; + if (hdcSaturated != NULL) + { + hImageListDC = hdcSaturated; + /* shitty way of getting subroutines to blit at the right place (top left corner), + as our modified imagelist only contains a single image for performance reasons */ + pt.x = 0; + pt.y = 0; + } } #endif
5 years, 4 months
1
0
0
0
[reactos] 01/01: [NDIS] Enforce '#if DBG' around MiniDisplayPacket[2]()
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=68bcc2df7c06377903a17…
commit 68bcc2df7c06377903a17d6fcd0253c280958446 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sat Jun 8 03:03:40 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Aug 15 21:08:10 2019 +0200 [NDIS] Enforce '#if DBG' around MiniDisplayPacket[2]() Also add 'static' on MiniDisplayPacket2(). --- drivers/network/ndis/ndis/miniport.c | 9 +++++---- drivers/network/ndis/ndis/protocol.c | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/network/ndis/ndis/miniport.c b/drivers/network/ndis/ndis/miniport.c index 645291cab92..ad5f7741e6c 100644 --- a/drivers/network/ndis/ndis/miniport.c +++ b/drivers/network/ndis/ndis/miniport.c @@ -57,12 +57,12 @@ KSPIN_LOCK MiniportListLock; LIST_ENTRY AdapterListHead; KSPIN_LOCK AdapterListLock; +#if DBG VOID MiniDisplayPacket( PNDIS_PACKET Packet, PCSTR Reason) { -#if DBG ULONG i, Length; UCHAR Buffer[64]; if ((DebugTraceLevel & DEBUG_PACKET) > 0) { @@ -82,9 +82,9 @@ MiniDisplayPacket( DbgPrint("\n*** %s PACKET STOP ***\n", Reason); } -#endif /* DBG */ } +static VOID MiniDisplayPacket2( PVOID HeaderBuffer, @@ -92,7 +92,6 @@ MiniDisplayPacket2( PVOID LookaheadBuffer, UINT LookaheadBufferSize) { -#if DBG if ((DebugTraceLevel & DEBUG_PACKET) > 0) { ULONG i, Length; PUCHAR p; @@ -118,8 +117,8 @@ MiniDisplayPacket2( DbgPrint("\n*** RECEIVE PACKET STOP ***\n"); } -#endif /* DBG */ } +#endif /* DBG */ PNDIS_MINIPORT_WORK_ITEM MiniGetFirstWorkItem( @@ -201,7 +200,9 @@ MiniIndicateData( "HeaderBufferSize (0x%X) LookaheadBuffer (0x%X) LookaheadBufferSize (0x%X).\n", Adapter, HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize)); +#if DBG MiniDisplayPacket2(HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize); +#endif NDIS_DbgPrint(MAX_TRACE, ("acquiring miniport block lock\n")); KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql); diff --git a/drivers/network/ndis/ndis/protocol.c b/drivers/network/ndis/ndis/protocol.c index d584d36f15e..83c2797e2ab 100644 --- a/drivers/network/ndis/ndis/protocol.c +++ b/drivers/network/ndis/ndis/protocol.c @@ -404,7 +404,9 @@ proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet) return NDIS_STATUS_PENDING; } +#if DBG MiniDisplayPacket(Packet, "SEND"); +#endif if(Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendPacketsHandler) {
5 years, 4 months
1
0
0
0
[reactos] 01/01: [OSK] General refactoring
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=84e162e66939a3e370d74…
commit 84e162e66939a3e370d74196a6983840468fee4d Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Tue Jul 16 17:35:30 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Aug 15 20:35:17 2019 +0200 [OSK] General refactoring - Replace the existing header files in favour to a pre-compiled header instead. Furthermore, move all the function prototypes in the pre-compiled header. - As per the prototype definitions, LoadDataFromRegistry() and SaveDataToRegistry() mustn't accept any number of parameters. - Rename rsrc.rc to osk.rc (main resource file) as most of user-mode applications name have their main resource as the same application's name anyways. - When querying and saving the data to registry, use only one value, greatly reducing the bloat of variables (as per the Hermes Belusca's request on #1729 PR). - Update the header description reflecting the official ReactOS Coding style guidelines. --- base/applications/osk/CMakeLists.txt | 10 +++- base/applications/osk/main.c | 16 +------ base/applications/osk/main.h | 43 ----------------- base/applications/osk/osk.h | 26 ----------- base/applications/osk/{rsrc.rc => osk.rc} | 15 ++---- base/applications/osk/osk_res.h | 5 +- base/applications/osk/precomp.h | 77 +++++++++++++++++++++++++++++++ base/applications/osk/settings.c | 71 ++++++++++++++-------------- base/applications/osk/settings.h | 15 ------ 9 files changed, 127 insertions(+), 151 deletions(-) diff --git a/base/applications/osk/CMakeLists.txt b/base/applications/osk/CMakeLists.txt index ff5876046ca..293eba14b50 100644 --- a/base/applications/osk/CMakeLists.txt +++ b/base/applications/osk/CMakeLists.txt @@ -1,7 +1,13 @@ +list(APPEND SOURCE + main.c + settings.c + precomp.h) + file(GLOB osk_rc_deps res/*.*) -add_rc_deps(rsrc.rc ${osk_rc_deps}) -add_executable(osk main.c settings.c rsrc.rc) +add_rc_deps(osk.rc ${osk_rc_deps}) +add_executable(osk ${SOURCE} osk.rc) set_module_type(osk win32gui UNICODE) add_importlibs(osk comdlg32 uxtheme winmm shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll) +add_pch(osk precomp.h SOURCE) add_cd_file(TARGET osk DESTINATION reactos/system32 FOR all) diff --git a/base/applications/osk/main.c b/base/applications/osk/main.c index 0a3a001fa91..a467eb24518 100644 --- a/base/applications/osk/main.c +++ b/base/applications/osk/main.c @@ -8,26 +8,12 @@ /* INCLUDES *******************************************************************/ -#include "osk.h" -#include "settings.h" +#include "precomp.h" /* GLOBALS ********************************************************************/ OSK_GLOBALS Globals; -/* Functions */ -int OSK_SetImage(int IdDlgItem, int IdResource); -int OSK_DlgInitDialog(HWND hDlg); -int OSK_DlgClose(void); -int OSK_DlgTimer(void); -BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl); -BOOL OSK_ReleaseKey(WORD ScanCode); -VOID OSK_RestoreDlgPlacement(HWND hDlg); - -INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); -LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw); -int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int); - /* FUNCTIONS ******************************************************************/ /*********************************************************************** diff --git a/base/applications/osk/main.h b/base/applications/osk/main.h deleted file mode 100644 index 5ce6a7acb7c..00000000000 --- a/base/applications/osk/main.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * PROJECT: ReactOS On-Screen Keyboard - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: On screen keyboard. - * COPYRIGHT: Denis ROBERT - * Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com) - */ - -#ifndef _OSKMAIN_H -#define _OSKMAIN_H - -/* INCLUDES *******************************************************************/ - -#include "osk_res.h" - -/* TYPES **********************************************************************/ - -typedef struct -{ - HINSTANCE hInstance; - HWND hMainWnd; - HBRUSH hBrushGreenLed; - UINT_PTR iTimer; - /* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */ - HWND hActiveWnd; - BOOL bShowWarning; - BOOL bIsEnhancedKeyboard; - BOOL bSoundClick; - BOOL bAlwaysOnTop; - INT PosX; - INT PosY; -} OSK_GLOBALS; - -/* DEFINES ********************************************************************/ - -extern OSK_GLOBALS Globals; - -#define countof(x) (sizeof(x) / sizeof((x)[0])) -#define MAX_BUFF 256 - -#endif - -/* EOF */ diff --git a/base/applications/osk/osk.h b/base/applications/osk/osk.h deleted file mode 100644 index a435e69ac6a..00000000000 --- a/base/applications/osk/osk.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS On-Screen Keyboard - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: On screen keyboard. - * COPYRIGHT: Denis ROBERT - * Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com) - */ - -#ifndef _OSK_H -#define _OSK_H - -/* INCLUDES ******************************************************************/ - -#include <stdio.h> - -#include <windows.h> -#include <commctrl.h> -#include <debug.h> -#include <uxtheme.h> -#include <vsstyle.h> - -#include "main.h" - -#endif - -/* EOF */ diff --git a/base/applications/osk/rsrc.rc b/base/applications/osk/osk.rc similarity index 87% rename from base/applications/osk/rsrc.rc rename to base/applications/osk/osk.rc index 963581773d1..a897be3c8c6 100644 --- a/base/applications/osk/rsrc.rc +++ b/base/applications/osk/osk.rc @@ -1,19 +1,12 @@ /* - * PROJECT: ReactOS Kernel + * PROJECT: On-Screen Keyboard * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/osk/rsrc.rc - * PURPOSE: On Screen Keyboard - * PROGRAMMERS: Denis ROBERT + * PURPOSE: On-Screen Keyboard main resource file + * COPYRIGHT: Denis ROBERT */ /* INCLUDES ******************************************************************/ -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "main.h" -#include "winnls.h" -#include "commctrl.h" -#include "osk_res.h" +#include "precomp.h" #define REACTOS_STR_FILE_DESCRIPTION "ReactOS On Screen Keyboard" #define REACTOS_STR_INTERNAL_NAME "osk" diff --git a/base/applications/osk/osk_res.h b/base/applications/osk/osk_res.h index 04dd6e2b887..21d01f32f3f 100644 --- a/base/applications/osk/osk_res.h +++ b/base/applications/osk/osk_res.h @@ -1,9 +1,8 @@ /* * PROJECT: ReactOS On-Screen Keyboard * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/osk/osk_res.h - * PURPOSE: On screen keyboard. - * PROGRAMMERS: Denis ROBERT + * PURPOSE: On-Screen Keyboard resource identifiers + * COPYRIGHT: Denis ROBERT */ #define MAIN_DIALOG_ENHANCED_KB 2000 diff --git a/base/applications/osk/precomp.h b/base/applications/osk/precomp.h new file mode 100644 index 00000000000..c1e7e50543d --- /dev/null +++ b/base/applications/osk/precomp.h @@ -0,0 +1,77 @@ +/* + * PROJECT: ReactOS On-Screen Keyboard + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Pre-compiled header + * COPYRIGHT: Denis ROBERT + * Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com) + */ + +#ifndef _OSK_PRECOMP_H +#define _OSK_PRECOMP_H + +/* INCLUDES *******************************************************************/ + +#include <stdio.h> + +#include <windows.h> +#include <commctrl.h> +#include <debug.h> +#include <uxtheme.h> +#include <vsstyle.h> +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "commctrl.h" + +#include "osk_res.h" + +/* TYPES **********************************************************************/ + +typedef struct +{ + HINSTANCE hInstance; + HWND hMainWnd; + HBRUSH hBrushGreenLed; + UINT_PTR iTimer; + /* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */ + HWND hActiveWnd; + + /* On-Screen Keyboard registry settings */ + BOOL bShowWarning; + BOOL bIsEnhancedKeyboard; + BOOL bSoundClick; + BOOL bAlwaysOnTop; + INT PosX; + INT PosY; +} OSK_GLOBALS; + +/* PROTOTYPES *****************************************************************/ + +/* main.c */ +int OSK_SetImage(int IdDlgItem, int IdResource); +int OSK_DlgInitDialog(HWND hDlg); +int OSK_DlgClose(void); +int OSK_DlgTimer(void); +BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl); +BOOL OSK_ReleaseKey(WORD ScanCode); +INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); +LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw); +int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int); +VOID OSK_RestoreDlgPlacement(HWND hDlg); + +/* settings.c */ +BOOL LoadDataFromRegistry(VOID); +BOOL SaveDataToRegistry(VOID); +INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); + +/* DEFINES ********************************************************************/ + +extern OSK_GLOBALS Globals; + +#define countof(x) (sizeof(x) / sizeof((x)[0])) +#define MAX_BUFF 256 + +#endif /* _OSK_PRECOMP_H */ + +/* EOF */ diff --git a/base/applications/osk/settings.c b/base/applications/osk/settings.c index 5d403e89d6d..b1bcb210f96 100644 --- a/base/applications/osk/settings.c +++ b/base/applications/osk/settings.c @@ -7,16 +7,15 @@ /* INCLUDES *******************************************************************/ -#include "osk.h" -#include "settings.h" +#include "precomp.h" /* FUNCTIONS *******************************************************************/ -BOOL LoadDataFromRegistry() +BOOL LoadDataFromRegistry(VOID) { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop, dwAlwaysOnTop; + DWORD dwValue; DWORD cbData = sizeof(DWORD); /* Initialize the registry application settings */ @@ -47,7 +46,7 @@ BOOL LoadDataFromRegistry() L"ShowWarning", 0, 0, - (BYTE *)&dwShowWarningData, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -58,14 +57,14 @@ BOOL LoadDataFromRegistry() } /* Load the data value (it can be either FALSE or TRUE depending on the data itself) */ - Globals.bShowWarning = (dwShowWarningData != 0); + Globals.bShowWarning = (dwValue != 0); /* Query the key */ lResult = RegQueryValueExW(hKey, L"IsEnhancedKeyboard", 0, 0, - (BYTE *)&dwLayout, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -76,14 +75,14 @@ BOOL LoadDataFromRegistry() } /* Load the dialog layout value */ - Globals.bIsEnhancedKeyboard = (dwLayout != 0); + Globals.bIsEnhancedKeyboard = (dwValue != 0); /* Query the key */ lResult = RegQueryValueExW(hKey, L"ClickSound", 0, 0, - (BYTE *)&dwSoundOnClick, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -94,14 +93,14 @@ BOOL LoadDataFromRegistry() } /* Load the sound on click value event */ - Globals.bSoundClick = (dwSoundOnClick != 0); + Globals.bSoundClick = (dwValue != 0); /* Query the key */ lResult = RegQueryValueExW(hKey, L"WindowLeft", 0, 0, - (BYTE *)&dwPositionLeft, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -112,13 +111,13 @@ BOOL LoadDataFromRegistry() } /* Load the X value data of the dialog's coordinate */ - Globals.PosX = dwPositionLeft; + Globals.PosX = dwValue; lResult = RegQueryValueExW(hKey, L"WindowTop", 0, 0, - (BYTE *)&dwPositionTop, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -129,13 +128,13 @@ BOOL LoadDataFromRegistry() } /* Load the Y value data of the dialog's coordinate */ - Globals.PosY = dwPositionTop; + Globals.PosY = dwValue; lResult = RegQueryValueExW(hKey, L"AlwaysOnTop", 0, 0, - (BYTE *)&dwAlwaysOnTop, + (BYTE *)&dwValue, &cbData); if (lResult != ERROR_SUCCESS) @@ -146,18 +145,18 @@ BOOL LoadDataFromRegistry() } /* Load the window state value data */ - Globals.bAlwaysOnTop = (dwAlwaysOnTop != 0); + Globals.bAlwaysOnTop = (dwValue != 0); /* If we're here then we succeed, close the key and return TRUE */ RegCloseKey(hKey); return TRUE; } -BOOL SaveDataToRegistry() +BOOL SaveDataToRegistry(VOID) { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop, dwAlwaysOnTop; + DWORD dwValue; WINDOWPLACEMENT wp; /* Set the structure length and retrieve the dialog's placement */ @@ -182,15 +181,15 @@ BOOL SaveDataToRegistry() } /* The data value of the subkey will be appended to the warning dialog switch */ - dwShowWarningData = Globals.bShowWarning; + dwValue = Globals.bShowWarning; /* Welcome warning box value key */ lResult = RegSetValueExW(hKey, L"ShowWarning", 0, REG_DWORD, - (BYTE *)&dwShowWarningData, - sizeof(dwShowWarningData)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { @@ -200,15 +199,15 @@ BOOL SaveDataToRegistry() } /* The value will be appended to the layout dialog */ - dwLayout = Globals.bIsEnhancedKeyboard; + dwValue = Globals.bIsEnhancedKeyboard; /* Keyboard dialog switcher */ lResult = RegSetValueExW(hKey, L"IsEnhancedKeyboard", 0, REG_DWORD, - (BYTE *)&dwLayout, - sizeof(dwLayout)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { @@ -218,15 +217,15 @@ BOOL SaveDataToRegistry() } /* The value will be appended to the sound on click event */ - dwSoundOnClick = Globals.bSoundClick; + dwValue = Globals.bSoundClick; /* "Sound on Click" switcher value key */ lResult = RegSetValueExW(hKey, L"ClickSound", 0, REG_DWORD, - (BYTE *)&dwSoundOnClick, - sizeof(dwSoundOnClick)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { @@ -236,15 +235,15 @@ BOOL SaveDataToRegistry() } /* The value will be appended to the X coordination dialog's placement */ - dwPositionLeft = wp.rcNormalPosition.left; + dwValue = wp.rcNormalPosition.left; /* Position X coordination of dialog's placement value key */ lResult = RegSetValueExW(hKey, L"WindowLeft", 0, REG_DWORD, - (BYTE *)&dwPositionLeft, - sizeof(dwPositionLeft)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { @@ -254,15 +253,15 @@ BOOL SaveDataToRegistry() } /* The value will be appended to the Y coordination dialog's placement */ - dwPositionTop = wp.rcNormalPosition.top; + dwValue = wp.rcNormalPosition.top; /* Position Y coordination of dialog's placement value key */ lResult = RegSetValueExW(hKey, L"WindowTop", 0, REG_DWORD, - (BYTE *)&dwPositionTop, - sizeof(dwPositionTop)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { @@ -272,15 +271,15 @@ BOOL SaveDataToRegistry() } /* Window top state value */ - dwAlwaysOnTop = Globals.bAlwaysOnTop; + dwValue = Globals.bAlwaysOnTop; /* "Always on Top" state value key */ lResult = RegSetValueExW(hKey, L"AlwaysOnTop", 0, REG_DWORD, - (BYTE *)&dwAlwaysOnTop, - sizeof(dwAlwaysOnTop)); + (BYTE *)&dwValue, + sizeof(dwValue)); if (lResult != ERROR_SUCCESS) { diff --git a/base/applications/osk/settings.h b/base/applications/osk/settings.h deleted file mode 100644 index 05e122a4fff..00000000000 --- a/base/applications/osk/settings.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PROJECT: ReactOS On-Screen Keyboard - * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) - * PURPOSE: Settings header file with function prototypes - * COPYRIGHT: Copyright 2018 Bișoc George (fraizeraust99 at gmail dot com) - */ - -#ifndef SETTINGS_OSK_H -#define SETTINGS_OSK_H - -BOOL LoadDataFromRegistry(VOID); -BOOL SaveDataToRegistry(VOID); -INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); - -#endif // SETTINGS_OSK_H
5 years, 4 months
1
0
0
0
[reactos] 01/01: [THEMES][LUNAR] Update
by Adam Słaboń
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65f42596cefa26c725b3c…
commit 65f42596cefa26c725b3c93612beb48ca198bf60 Author: Adam Słaboń <asaillen456esx(a)gmail.com> AuthorDate: Sat Jul 13 17:29:46 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Aug 15 20:25:02 2019 +0200 [THEMES][LUNAR] Update Improved Button and Combo Button bitmaps, fixed SYSSETUP Lunar resource. --- dll/win32/syssetup/resources/thmlunar.bmp | Bin 88074 -> 88074 bytes .../Lunar/lunar.msstyles/bitmaps/REACTOS_BUTTON.bmp | Bin 7874 -> 7874 bytes .../lunar.msstyles/bitmaps/REACTOS_COMBOBUTTON.bmp | Bin 3638 -> 3638 bytes .../REACTOS_STARTBUTTON \342\200\224 kopia.bmp" | Bin 12222 -> 0 bytes .../lunar.msstyles/bitmaps/SMALLCLOSEBUTTON.bmp | Bin 3222 -> 0 bytes media/themes/Lunar/lunar.msstyles/lang/en-US.rc | 2 +- media/themes/Lunar/lunar.msstyles/lang/pl-PL.rc | 2 +- 7 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/syssetup/resources/thmlunar.bmp b/dll/win32/syssetup/resources/thmlunar.bmp index bd4358f209b..8016e4e18fd 100644 Binary files a/dll/win32/syssetup/resources/thmlunar.bmp and b/dll/win32/syssetup/resources/thmlunar.bmp differ diff --git a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_BUTTON.bmp b/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_BUTTON.bmp index 94f7349a280..882a93082dc 100644 Binary files a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_BUTTON.bmp and b/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_BUTTON.bmp differ diff --git a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_COMBOBUTTON.bmp b/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_COMBOBUTTON.bmp index 30ee38a2aa1..d87da5d3b01 100644 Binary files a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_COMBOBUTTON.bmp and b/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_COMBOBUTTON.bmp differ diff --git "a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_STARTBUTTON \342\200\224 kopia.bmp" "b/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_STARTBUTTON \342\200\224 kopia.bmp" deleted file mode 100644 index bf3d9f32d69..00000000000 Binary files "a/media/themes/Lunar/lunar.msstyles/bitmaps/REACTOS_STARTBUTTON \342\200\224 kopia.bmp" and /dev/null differ diff --git a/media/themes/Lunar/lunar.msstyles/bitmaps/SMALLCLOSEBUTTON.bmp b/media/themes/Lunar/lunar.msstyles/bitmaps/SMALLCLOSEBUTTON.bmp deleted file mode 100644 index bef39411baa..00000000000 Binary files a/media/themes/Lunar/lunar.msstyles/bitmaps/SMALLCLOSEBUTTON.bmp and /dev/null differ diff --git a/media/themes/Lunar/lunar.msstyles/lang/en-US.rc b/media/themes/Lunar/lunar.msstyles/lang/en-US.rc index 3511f054678..75890cdb08f 100644 --- a/media/themes/Lunar/lunar.msstyles/lang/en-US.rc +++ b/media/themes/Lunar/lunar.msstyles/lang/en-US.rc @@ -32,7 +32,7 @@ STRINGTABLE 5003, "Cernodile & Illen, built on top of Lautus" 5004, "Released under GNU/GPL 2.0, 2019" 5005, "
http://www.reactos.org
" -5006, "1.0" +5006, "1.1" 5007, "Visual Style for ReactOS" } diff --git a/media/themes/Lunar/lunar.msstyles/lang/pl-PL.rc b/media/themes/Lunar/lunar.msstyles/lang/pl-PL.rc index 353f1144f5e..3e3882f8bab 100644 --- a/media/themes/Lunar/lunar.msstyles/lang/pl-PL.rc +++ b/media/themes/Lunar/lunar.msstyles/lang/pl-PL.rc @@ -32,7 +32,7 @@ STRINGTABLE 5003, "Cernodile & Illen, oparte na motywie Lautus" 5004, "Wydane na licencji GNU/GPL 2.0, 2019" 5005, "
http://www.reactos.org
" -5006, "1.0" +5006, "1.1" 5007, "Styl wizualny dla systemu ReactOS" }
5 years, 4 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
29
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Results per page:
10
25
50
100
200