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
December 2014
----- 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
17 participants
387 discussions
Start a n
N
ew thread
[hbelusca] 65562: Fix some DPRINTs.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Dec 4 23:15:18 2014 New Revision: 65562 URL:
http://svn.reactos.org/svn/reactos?rev=65562&view=rev
Log: Fix some DPRINTs. Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c trunk/reactos/win32ss/user/winsrv/consrv/console.c trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c trunk/reactos/win32ss/user/winsrv/consrv/subsysreg.c Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c [iso-8859-1] Thu Dec 4 23:15:18 2014 @@ -162,7 +162,7 @@ NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to create a shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to create a shared section, Status = 0x%08lx\n", Status); NtClose(NewBuffer->ClientMutex); NtClose(NewBuffer->Mutex); ConsoleFreeHeap(NewBuffer->BitMapInfo); @@ -187,7 +187,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to map the shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status); NtClose(NewBuffer->hSection); NtClose(NewBuffer->ClientMutex); NtClose(NewBuffer->Mutex); @@ -214,7 +214,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to map the shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status); NtUnmapViewOfSection(NtCurrentProcess(), NewBuffer->BitMap); NtClose(NewBuffer->hSection); NtClose(NewBuffer->ClientMutex); Modified: trunk/reactos/win32ss/user/winsrv/consrv/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Thu Dec 4 23:15:18 2014 @@ -990,7 +990,7 @@ Length, &Length); if (!NT_SUCCESS(Status)) { - DPRINT1("SrvAttachConsole - Cannot retrieve basic process info, Status = %lu\n", Status); + DPRINT1("SrvAttachConsole - Cannot retrieve basic process info, Status = 0x%08lx\n", Status); return Status; } Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] Thu Dec 4 23:15:18 2014 @@ -254,7 +254,7 @@ NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to create a shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to create a shared section, Status = 0x%08lx\n", Status); goto Quit; } @@ -270,7 +270,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to map the shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status); goto Quit; } @@ -365,7 +365,7 @@ 0, 0, DUPLICATE_SAME_ACCESS); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to duplicate section handle for client ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to duplicate section handle for client, Status = 0x%08lx\n", Status); goto Quit; } @@ -401,7 +401,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { Status = _SEH2_GetExceptionCode(); - DPRINT1("GuiConsoleShowConsoleProperties - Caught an exception, Status = %08X\n", Status); + DPRINT1("GuiConsoleShowConsoleProperties - Caught an exception, Status = 0x%08lx\n", Status); } _SEH2_END; } @@ -442,7 +442,7 @@ 0, 0, DUPLICATE_SAME_ACCESS); if (!NT_SUCCESS(Status)) { - DPRINT1("Error when mapping client handle, Status = %lu\n", Status); + DPRINT1("Error when mapping client handle, Status = 0x%08lx\n", Status); goto Quit; } @@ -459,7 +459,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error when mapping view of file, Status = %lu\n", Status); + DPRINT1("Error when mapping view of file, Status = 0x%08lx\n", Status); goto Quit; } @@ -536,7 +536,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { Status = _SEH2_GetExceptionCode(); - DPRINT1("GuiApplyUserSettings - Caught an exception, Status = %08X\n", Status); + DPRINT1("GuiApplyUserSettings - Caught an exception, Status = 0x%08lx\n", Status); } _SEH2_END; @@ -588,7 +588,7 @@ 0, 0, DUPLICATE_SAME_ACCESS); if (!NT_SUCCESS(Status)) { - DPRINT1("Error when mapping client handle, Status = %lu\n", Status); + DPRINT1("Error when mapping client handle, Status = 0x%08lx\n", Status); goto Quit; } @@ -605,7 +605,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error when mapping view of file, Status = %lu\n", Status); + DPRINT1("Error when mapping view of file, Status = 0x%08lx\n", Status); goto Quit; } @@ -720,7 +720,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { Status = _SEH2_GetExceptionCode(); - DPRINT1("GuiApplyUserSettings - Caught an exception, Status = %08X\n", Status); + DPRINT1("GuiApplyUserSettings - Caught an exception, Status = 0x%08lx\n", Status); } _SEH2_END; Modified: trunk/reactos/win32ss/user/winsrv/consrv/subsysreg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/subsysreg.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/subsysreg.c [iso-8859-1] Thu Dec 4 23:15:18 2014 @@ -67,7 +67,7 @@ NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to create a shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to create a shared section, Status = 0x%08lx\n", Status); goto Quit; } @@ -88,7 +88,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to map the shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status); NtClose(Console->VDMBufferSection); goto Quit; } @@ -111,7 +111,7 @@ PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DPRINT1("Error: Impossible to map the shared section ; Status = %lu\n", Status); + DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status); NtUnmapViewOfSection(NtCurrentProcess(), Console->VDMBuffer); NtClose(Console->VDMBufferSection); goto Quit;
10 years
1
0
0
0
[hbelusca] 65561: [CONSRV] - Give the process handle which creates the screenbuffer, to ConDrvCreateScreenBuffer. - Few code refactoring.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Dec 4 22:47:13 2014 New Revision: 65561 URL:
http://svn.reactos.org/svn/reactos?rev=65561&view=rev
Log: [CONSRV] - Give the process handle which creates the screenbuffer, to ConDrvCreateScreenBuffer. - Few code refactoring. Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/conoutput.c trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c trunk/reactos/win32ss/user/winsrv/consrv/conoutput.h Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/conoutput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -18,11 +18,13 @@ NTSTATUS TEXTMODE_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, + IN HANDLE ProcessHandle, IN PTEXTMODE_BUFFER_INFO TextModeInfo); NTSTATUS GRAPHICS_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, + IN HANDLE ProcessHandle, IN PGRAPHICS_BUFFER_INFO GraphicsInfo); VOID @@ -33,7 +35,7 @@ NTSTATUS CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl, IN SIZE_T Size) { @@ -77,7 +79,8 @@ // ConDrvCreateConsoleScreenBuffer NTSTATUS ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, + IN HANDLE ProcessHandle OPTIONAL, IN ULONG BufferType, IN PVOID ScreenBufferInfo) { @@ -89,14 +92,18 @@ return STATUS_INVALID_PARAMETER; } + /* Use the current process if ProcessHandle is NULL */ + if (ProcessHandle == NULL) + ProcessHandle = NtCurrentProcess(); + if (BufferType == CONSOLE_TEXTMODE_BUFFER) { - Status = TEXTMODE_BUFFER_Initialize(Buffer, Console, + Status = TEXTMODE_BUFFER_Initialize(Buffer, Console, ProcessHandle, (PTEXTMODE_BUFFER_INFO)ScreenBufferInfo); } else if (BufferType == CONSOLE_GRAPHICS_BUFFER) { - Status = GRAPHICS_BUFFER_Initialize(Buffer, Console, + Status = GRAPHICS_BUFFER_Initialize(Buffer, Console, ProcessHandle, (PGRAPHICS_BUFFER_INFO)ScreenBufferInfo); } else Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -79,22 +79,24 @@ VOID NTAPI ConDrvPause(PCONSOLE Console) { - if (!Console->UnpauseEvent) - { - NtCreateEvent(&Console->UnpauseEvent, EVENT_ALL_ACCESS, - NULL, NotificationEvent, FALSE); - } + /* In case we already have a pause event, just exit... */ + if (Console->UnpauseEvent) return; + + /* ... otherwise create it */ + NtCreateEvent(&Console->UnpauseEvent, EVENT_ALL_ACCESS, + NULL, NotificationEvent, FALSE); } VOID NTAPI ConDrvUnpause(PCONSOLE Console) { - if (Console->UnpauseEvent) - { - NtSetEvent(Console->UnpauseEvent, NULL); - NtClose(Console->UnpauseEvent); - Console->UnpauseEvent = NULL; - } + /* In case we already freed the event, just exit... */ + if (!Console->UnpauseEvent) return; + + /* ... otherwise set and free it */ + NtSetEvent(Console->UnpauseEvent, NULL); + NtClose(Console->UnpauseEvent); + Console->UnpauseEvent = NULL; } @@ -152,8 +154,6 @@ /* Initialize the console list and its lock */ InitializeListHead(&ConsoleList); RtlInitializeResource(&ListLock); - - /* Should call LoadKeyboardLayout */ } /* For resetting the terminal - defined in dummyterm.c */ @@ -229,6 +229,7 @@ InitializeListHead(&Console->BufferList); Status = ConDrvCreateScreenBuffer(&NewBuffer, Console, + NULL, CONSOLE_TEXTMODE_BUFFER, &ScreenBufferInfo); if (!NT_SUCCESS(Status)) @@ -291,14 +292,12 @@ /* We failed, detach the terminal from the console */ Terminal->Console = NULL; // For the caller ResetTerminal(Console); - return Status; } /* Copy buffer contents to screen */ // Terminal.Draw(); // ConioDrawConsole(Console); - DPRINT("Console drawn\n"); DPRINT("Terminal initialization done\n"); return STATUS_SUCCESS; @@ -364,8 +363,6 @@ */ LeaveCriticalSection(&Console->Lock); ConDrvUnlockConsoleList(); - - /* FIXME: Send a terminate message to all the processes owning this console */ /* Deregister the terminal */ DPRINT("Deregister terminal\n"); Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/graphics.c [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -33,7 +33,7 @@ NTSTATUS CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl, IN SIZE_T Size); VOID @@ -42,7 +42,8 @@ NTSTATUS GRAPHICS_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, + IN HANDLE ProcessHandle, IN PGRAPHICS_BUFFER_INFO GraphicsInfo) { NTSTATUS Status = STATUS_SUCCESS; @@ -50,7 +51,6 @@ LARGE_INTEGER SectionSize; ULONG ViewSize = 0; - HANDLE ProcessHandle; if (Buffer == NULL || Console == NULL || GraphicsInfo == NULL) return STATUS_INVALID_PARAMETER; @@ -69,7 +69,6 @@ * correctly the allocated resources when the client releases the * screen buffer. */ - ProcessHandle = CsrGetClientThread()->Process->ProcessHandle; NewBuffer->ClientProcess = ProcessHandle; /* Get infos from the graphics buffer information structure */ Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -51,7 +51,7 @@ NTSTATUS CONSOLE_SCREEN_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, IN PCONSOLE_SCREEN_BUFFER_VTBL Vtbl, IN SIZE_T Size); VOID @@ -60,11 +60,14 @@ NTSTATUS TEXTMODE_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, + IN PCONSOLE Console, + IN HANDLE ProcessHandle, IN PTEXTMODE_BUFFER_INFO TextModeInfo) { NTSTATUS Status = STATUS_SUCCESS; PTEXTMODE_SCREEN_BUFFER NewBuffer = NULL; + + UNREFERENCED_PARAMETER(ProcessHandle); if (Console == NULL || Buffer == NULL || TextModeInfo == NULL) return STATUS_INVALID_PARAMETER; Modified: trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -169,7 +169,8 @@ { NTSTATUS Status = STATUS_INVALID_PARAMETER; PCONSOLE_CREATESCREENBUFFER CreateScreenBufferRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.CreateScreenBufferRequest; - PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrGetClientThread()->Process); + PCSR_PROCESS Process = CsrGetClientThread()->Process; + PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(Process); PCONSRV_CONSOLE Console; PCONSOLE_SCREEN_BUFFER Buff; @@ -253,6 +254,7 @@ Status = ConDrvCreateScreenBuffer(&Buff, (PCONSOLE)Console, + Process->ProcessHandle, CreateScreenBufferRequest->ScreenBufferType, ScreenBufferInfo); if (!NT_SUCCESS(Status)) goto Quit; Modified: trunk/reactos/win32ss/user/winsrv/consrv/conoutput.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/conoutput.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/conoutput.h [iso-8859-1] Thu Dec 4 22:47:13 2014 @@ -34,9 +34,10 @@ ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked)) NTSTATUS ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer, - IN OUT PCONSOLE Console, - IN ULONG BufferType, - IN PVOID ScreenBufferInfo); + IN PCONSOLE Console, + IN HANDLE ProcessHandle OPTIONAL, + IN ULONG BufferType, + IN PVOID ScreenBufferInfo); VOID NTAPI ConDrvDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer); // VOID ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
10 years
1
0
0
0
[dquintana] 65560: [EXPLORER] * Reorganize a bit the CTrayWindowCtxMenu::QueryContextMenu method and do not error if AddContextMenus fails. Fixes the taskbar context menu not opening on right-click...
by dquintana@svn.reactos.org
Author: dquintana Date: Thu Dec 4 19:53:02 2014 New Revision: 65560 URL:
http://svn.reactos.org/svn/reactos?rev=65560&view=rev
Log: [EXPLORER] * Reorganize a bit the CTrayWindowCtxMenu::QueryContextMenu method and do not error if AddContextMenus fails. Fixes the taskbar context menu not opening on right-click. (No need to call it explorer-new now that it's the primary one!) CORE-8838 Modified: trunk/reactos/base/shell/explorer/tbsite.cpp trunk/reactos/base/shell/explorer/traywnd.cpp Modified: trunk/reactos/base/shell/explorer/tbsite.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/tbsite…
============================================================================== --- trunk/reactos/base/shell/explorer/tbsite.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/tbsite.cpp [iso-8859-1] Thu Dec 4 19:53:02 2014 @@ -288,11 +288,11 @@ IN UINT uFlags, OUT IContextMenu **ppcm) { - IShellService *pSs; - HRESULT hRet; - if (ContextMenu == NULL) { + HRESULT hRet; + CComPtr<IShellService> pSs; + /* Cache the context menu so we don't need to CoCreateInstance all the time... */ hRet = CoCreateInstance(CLSID_BandSiteMenu, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IShellService, &pSs)); TRACE("CoCreateInstance(CLSID_BandSiteMenu) for IShellService returned: 0x%x\n", hRet); @@ -302,13 +302,10 @@ hRet = pSs->SetOwner((IBandSite*)this); if (!SUCCEEDED(hRet)) { - pSs->Release(); return hRet; } hRet = pSs->QueryInterface(IID_PPV_ARG(IContextMenu, &ContextMenu)); - - pSs->Release(); if (!SUCCEEDED(hRet)) return hRet; @@ -321,12 +318,7 @@ } /* Add the menu items */ - return ContextMenu->QueryContextMenu( - hmenu, - indexMenu, - idCmdFirst, - idCmdLast, - uFlags); + return ContextMenu->QueryContextMenu(hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags); } virtual HRESULT STDMETHODCALLTYPE Lock( Modified: trunk/reactos/base/shell/explorer/traywnd.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywn…
============================================================================== --- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Thu Dec 4 19:53:02 2014 @@ -3029,59 +3029,59 @@ { HMENU menubase = LoadPopupMenu(hExplorerInstance, MAKEINTRESOURCE(IDM_TRAYWND)); - if (menubase) - { - int count = ::GetMenuItemCount(menubase); - - for (int i = 0; i < count; i++) - { - WCHAR label[128]; - - MENUITEMINFOW mii = { 0 }; - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS - | MIIM_DATA | MIIM_STRING | MIIM_BITMAP | MIIM_FTYPE; - mii.dwTypeData = label; - mii.cch = _countof(label); - ::GetMenuItemInfoW(menubase, i, TRUE, &mii); - - TRACE("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType); - - mii.fType |= MFT_RADIOCHECK; - - ::InsertMenuItemW(hPopup, i + 1, TRUE, &mii); - } - - ::DestroyMenu(menubase); - - if (SHRestricted(REST_CLASSICSHELL) != 0) - { - DeleteMenu(hPopup, - ID_LOCKTASKBAR, - MF_BYCOMMAND); - } - - CheckMenuItem(hPopup, - ID_LOCKTASKBAR, - MF_BYCOMMAND | (TrayWnd->Locked ? MF_CHECKED : MF_UNCHECKED)); - - if (TrayWnd->TrayBandSite != NULL) - { - if (SUCCEEDED(TrayWnd->TrayBandSite->AddContextMenus( - hPopup, - 0, - ID_SHELL_CMD_FIRST, - ID_SHELL_CMD_LAST, - CMF_NORMAL, - &pcm))) - { - return S_OK; - } - } - - } - - return E_FAIL; + if (!menubase) + return HRESULT_FROM_WIN32(GetLastError()); + + int count = ::GetMenuItemCount(menubase); + + for (int i = 0; i < count; i++) + { + WCHAR label[128]; + + MENUITEMINFOW mii = { 0 }; + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS + | MIIM_DATA | MIIM_STRING | MIIM_BITMAP | MIIM_FTYPE; + mii.dwTypeData = label; + mii.cch = _countof(label); + ::GetMenuItemInfoW(menubase, i, TRUE, &mii); + + TRACE("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType); + + mii.fType |= MFT_RADIOCHECK; + + ::InsertMenuItemW(hPopup, i + 1, TRUE, &mii); + } + + ::DestroyMenu(menubase); + + if (SHRestricted(REST_CLASSICSHELL) != 0) + { + DeleteMenu(hPopup, + ID_LOCKTASKBAR, + MF_BYCOMMAND); + } + + CheckMenuItem(hPopup, + ID_LOCKTASKBAR, + MF_BYCOMMAND | (TrayWnd->Locked ? MF_CHECKED : MF_UNCHECKED)); + + if (TrayWnd->TrayBandSite != NULL) + { + if (FAILED(TrayWnd->TrayBandSite->AddContextMenus( + hPopup, + 0, + ID_SHELL_CMD_FIRST, + ID_SHELL_CMD_LAST, + CMF_NORMAL, + &pcm))) + { + WARN("AddContextMenus failed.\n"); + pcm = NULL; + } + } + + return S_OK; } virtual HRESULT STDMETHODCALLTYPE
10 years
1
0
0
0
[gadamopoulos] 65559: [INCLUDES] * Move some shared definitions in a common header
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Dec 4 18:20:51 2014 New Revision: 65559 URL:
http://svn.reactos.org/svn/reactos?rev=65559&view=rev
Log: [INCLUDES] * Move some shared definitions in a common header Modified: trunk/reactos/base/shell/explorer/precomp.h trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp trunk/reactos/include/reactos/undocshell.h Modified: trunk/reactos/base/shell/explorer/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precom…
============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Thu Dec 4 18:20:51 2014 @@ -157,7 +157,6 @@ */ #define TWM_OPENSTARTMENU (WM_USER + 260) -#define TWM_DOEXITWINDOWS (WM_USER + 342) extern const GUID IID_IShellDesktopTray; Modified: trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDesktop…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] Thu Dec 4 18:20:51 2014 @@ -388,9 +388,6 @@ return TRUE; } -#define TWM_DOEXITWINDOWS (WM_USER + 342) -#define TWM_CYCLEFOCUS (WM_USER + 348) - LRESULT CDesktopBrowser::_NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam) { HWND hwndTray; Modified: trunk/reactos/include/reactos/undocshell.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/undocshell…
============================================================================== --- trunk/reactos/include/reactos/undocshell.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/undocshell.h [iso-8859-1] Thu Dec 4 18:20:51 2014 @@ -22,6 +22,14 @@ #ifdef __cplusplus extern "C" { #endif /* defined(__cplusplus) */ + +/**************************************************************************** + * Taskbar WM_COMMAND identifiers + */ + +#define TWM_DOEXITWINDOWS (WM_USER + 342) +#define TWM_CYCLEFOCUS (WM_USER + 348) + /**************************************************************************** * IDList Functions
10 years
1
0
0
0
[gadamopoulos] 65558: Try to fix build
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Dec 4 17:40:29 2014 New Revision: 65558 URL:
http://svn.reactos.org/svn/reactos?rev=65558&view=rev
Log: Try to fix build Modified: trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp Modified: trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDesktop…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] Thu Dec 4 17:40:29 2014 @@ -46,7 +46,7 @@ LPITEMIDLIST pidlDesktopDirectory; LPITEMIDLIST pidlDesktop; - LRESULT CDesktopBrowser::_NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam); + LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam); public: CDesktopBrowser(); @@ -421,6 +421,8 @@ case FCIDM_DESKBROWSER_REFRESH: break; } + + return 0; } LRESULT CALLBACK CDesktopBrowser::ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
10 years
1
0
0
0
[gadamopoulos] 65557: [SHELL32] - Implement handling accelerators for CDesktopBrowser. The only noticeable difference is that pressing alt+f4 in the desktop doesn't close it. See issue #8864 for mo...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Dec 4 17:30:44 2014 New Revision: 65557 URL:
http://svn.reactos.org/svn/reactos?rev=65557&view=rev
Log: [SHELL32] - Implement handling accelerators for CDesktopBrowser. The only noticeable difference is that pressing alt+f4 in the desktop doesn't close it. See issue #8864 for more details. Modified: trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp trunk/reactos/dll/win32/shell32/shell32.rc trunk/reactos/dll/win32/shell32/shresdef.h Modified: trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDesktop…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDesktopBrowser.cpp [iso-8859-1] Thu Dec 4 17:30:44 2014 @@ -35,6 +35,7 @@ { public: DWORD Tag; + HACCEL m_hAccel; private: HWND hWnd; HWND hWndShellView; @@ -44,6 +45,9 @@ CComPtr<IShellBrowser> DefaultShellBrowser; LPITEMIDLIST pidlDesktopDirectory; LPITEMIDLIST pidlDesktop; + + LRESULT CDesktopBrowser::_NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam); + public: CDesktopBrowser(); ~CDesktopBrowser(); @@ -51,8 +55,9 @@ HWND FindDesktopListView (); BOOL CreateDeskWnd(); HWND DesktopGetWindowControl(IN UINT id); + LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam); - static BOOL MessageLoop(); + BOOL MessageLoop(); // *** IOleWindow methods *** virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); @@ -252,7 +257,9 @@ HRESULT STDMETHODCALLTYPE CDesktopBrowser::TranslateAcceleratorSB(LPMSG lpmsg, WORD wID) { - return S_FALSE; + if (!::TranslateAcceleratorW(hWnd, m_hAccel, lpmsg)) + return S_FALSE; + return S_OK; } HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags) @@ -370,12 +377,50 @@ { if (bRet != -1) { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); + if (DesktopView->TranslateAcceleratorW(&Msg) != S_OK) + { + TranslateMessage(&Msg); + DispatchMessage(&Msg); + } } } return TRUE; +} + +#define TWM_DOEXITWINDOWS (WM_USER + 342) +#define TWM_CYCLEFOCUS (WM_USER + 348) + +LRESULT CDesktopBrowser::_NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + HWND hwndTray; + HRESULT hres; + + hres = this->ShellDesk->GetTrayWindow(&hwndTray); + + if (SUCCEEDED(hres)) + PostMessageW(hwndTray, uMsg, wParam, lParam); + + return 0; +} + +LRESULT CDesktopBrowser::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (LOWORD(wParam)) + { + case FCIDM_DESKBROWSER_CLOSE: + return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0); + case FCIDM_DESKBROWSER_FOCUS: + if (GetKeyState(VK_SHIFT)) + return _NotifyTray(TWM_CYCLEFOCUS, 1, 0xFFFFFFFF); + else + return _NotifyTray(TWM_CYCLEFOCUS, 1, 1); + case FCIDM_DESKBROWSER_SEARCH: + SHFindFiles(NULL, NULL); + break; + case FCIDM_DESKBROWSER_REFRESH: + break; + } } LRESULT CALLBACK CDesktopBrowser::ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam) @@ -445,6 +490,9 @@ if (!pThis->CreateDeskWnd()) WARN("Could not create the desktop view control!\n"); + + pThis->m_hAccel = LoadAcceleratorsW(shell32_hInstance, MAKEINTRESOURCEW(3)); + break; } @@ -476,6 +524,8 @@ SHOnCWMCommandLine((HANDLE)lParam); break; + case WM_COMMAND: + return pThis->OnCommand(uMsg, wParam, lParam); default: DefMsgHandler: Ret = DefWindowProcW(hwnd, uMsg, wParam, lParam); Modified: trunk/reactos/dll/win32/shell32/shell32.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.rc [iso-8859-1] Thu Dec 4 17:30:44 2014 @@ -54,6 +54,17 @@ shv_accel ACCELERATORS BEGIN VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY +END + +IDA_DESKBROWSER ACCELERATORS +BEGIN + //"s", 34172, ALT + VK_F4, FCIDM_DESKBROWSER_CLOSE, VIRTKEY, ALT + VK_F6, FCIDM_DESKBROWSER_FOCUS, VIRTKEY + VK_TAB, FCIDM_DESKBROWSER_FOCUS, VIRTKEY + VK_TAB, FCIDM_DESKBROWSER_FOCUS, VIRTKEY, SHIFT + VK_F3, FCIDM_DESKBROWSER_SEARCH, VIRTKEY + VK_F5, FCIDM_DESKBROWSER_REFRESH, VIRTKEY END /* Modified: trunk/reactos/dll/win32/shell32/shresdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
============================================================================== --- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Thu Dec 4 17:30:44 2014 @@ -22,6 +22,7 @@ /* Accelerators */ #define IDA_SHELLVIEW 1 +#define IDA_DESKBROWSER 3 /* Bitmaps */ #define IDB_REACTOS 131 @@ -485,6 +486,12 @@ #define IDR_AVI_FILENUKE 163 #define IDR_AVI_FILEDELETE 164 +/* Desktop Browser commands */ +#define FCIDM_DESKBROWSER_CLOSE 0xA004 +#define FCIDM_DESKBROWSER_FOCUS 0xA030 +#define FCIDM_DESKBROWSER_SEARCH 0xA085 +#define FCIDM_DESKBROWSER_REFRESH 0xA220 + /* Shell view commands */ #define FCIDM_SHVIEW_ARRANGE 0x7001 #define FCIDM_SHVIEW_DELETE 0x7011
10 years
1
0
0
0
[gadamopoulos] 65556: [EXPLORER] - Implement registering all hotkeys that explorer registers in windows. Not all of them are implemented. The ones that are implemented work fine in windows but most...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Dec 4 17:20:43 2014 New Revision: 65556 URL:
http://svn.reactos.org/svn/reactos?rev=65556&view=rev
Log: [EXPLORER] - Implement registering all hotkeys that explorer registers in windows. Not all of them are implemented. The ones that are implemented work fine in windows but most of them don't work on ros. Thankfully nothing regressed by doing things the same with windows . Modified: trunk/reactos/base/shell/explorer/explorer.cpp trunk/reactos/base/shell/explorer/explorer.rc trunk/reactos/base/shell/explorer/precomp.h trunk/reactos/base/shell/explorer/resource.h trunk/reactos/base/shell/explorer/traywnd.cpp Modified: trunk/reactos/base/shell/explorer/explorer.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
============================================================================== --- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Thu Dec 4 17:20:43 2014 @@ -182,9 +182,6 @@ if (Tray != NULL) { -#if !WIN7_COMPAT_MODE - RegisterHotKey(NULL, IDHK_RUN, MOD_WIN, 'R'); -#endif TrayMessageLoop(Tray); #if !WIN7_COMPAT_MODE HideMinimizedWindows(FALSE); Modified: trunk/reactos/base/shell/explorer/explorer.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
============================================================================== --- trunk/reactos/base/shell/explorer/explorer.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer.rc [iso-8859-1] Thu Dec 4 17:20:43 2014 @@ -24,6 +24,12 @@ IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP "res/nolock_group_ql.bmp" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest" + +STRINGTABLE +BEGIN + //IDS_HELP_COMMAND "helpctr.exe>-FromStartHelp" + IDS_HELP_COMMAND "
https://www.reactos.org/
" +END /* UTF-8 */ #pragma code_page(65001) Modified: trunk/reactos/base/shell/explorer/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precom…
============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Thu Dec 4 17:20:43 2014 @@ -108,8 +108,6 @@ * explorer.c */ -#define IDHK_RUN 1 /* Win+R */ - LONG SetWindowStyle(IN HWND hWnd, IN LONG dwStyleMask, Modified: trunk/reactos/base/shell/explorer/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/resour…
============================================================================== --- trunk/reactos/base/shell/explorer/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/resource.h [iso-8859-1] Thu Dec 4 17:20:43 2014 @@ -109,3 +109,4 @@ #define IDC_TASKBARPROP_DESKBANDLIST 2301 #define IDS_TASKBAR_STARTMENU_PROP_CAPTION 2200 +#define IDS_HELP_COMMAND 732 Modified: trunk/reactos/base/shell/explorer/traywnd.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywn…
============================================================================== --- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Thu Dec 4 17:20:43 2014 @@ -39,6 +39,19 @@ #define AUTOHIDE_SHOWING 1 #define AUTOHIDE_SHOWN 2 #define AUTOHIDE_HIDING 3 + +#define IDHK_RUN 0x1f4 +#define IDHK_MINIMIZE_ALL 0x1f5 +#define IDHK_RESTORE_ALL 0x1f6 +#define IDHK_HELP 0x1f7 +#define IDHK_EXPLORE 0x1f8 +#define IDHK_FIND 0x1f9 +#define IDHK_FIND_COMPUTER 0x1fa +#define IDHK_NEXT_TASK 0x1fb +#define IDHK_PREV_TASK 0x1fc +#define IDHK_SYS_PROPERTIES 0x1fd +#define IDHK_DESKTOP 0x1fe +#define IDHK_PAGER 0x1ff static LONG TrayWndCount = 0; @@ -201,19 +214,6 @@ PostQuitMessage(0); } - BOOL LaunchCPanel(HWND hwnd, LPCTSTR applet) - { - WCHAR szParams[MAX_PATH]; - - StringCbCopy(szParams, sizeof(szParams), - TEXT("shell32.dll,Control_RunDLL ")); - if (FAILED_UNEXPECTEDLY(StringCbCat(szParams, sizeof(szParams), - applet))) - return FALSE; - - return (ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), szParams, NULL, SW_SHOWDEFAULT) > (HINSTANCE) 32); - } - /* * ITrayWindow */ @@ -1577,6 +1577,20 @@ AutoHideState = AUTOHIDE_HIDING; SetTimer(TIMER_ID_AUTOHIDE, AUTOHIDE_DELAY_HIDE, NULL); } + + RegisterHotKey(m_hWnd, IDHK_RUN, MOD_WIN, 'R'); + RegisterHotKey(m_hWnd, IDHK_MINIMIZE_ALL, MOD_WIN, 'M'); + RegisterHotKey(m_hWnd, IDHK_RESTORE_ALL, MOD_WIN|MOD_SHIFT, 'M'); + RegisterHotKey(m_hWnd, IDHK_HELP, MOD_WIN, VK_F1); + RegisterHotKey(m_hWnd, IDHK_EXPLORE, MOD_WIN, 'E'); + RegisterHotKey(m_hWnd, IDHK_FIND, MOD_WIN, 'F'); + RegisterHotKey(m_hWnd, IDHK_FIND_COMPUTER, MOD_WIN|MOD_CONTROL, 'F'); + RegisterHotKey(m_hWnd, IDHK_NEXT_TASK, MOD_WIN, VK_TAB); + RegisterHotKey(m_hWnd, IDHK_PREV_TASK, MOD_WIN|MOD_SHIFT, VK_TAB); + RegisterHotKey(m_hWnd, IDHK_SYS_PROPERTIES, MOD_WIN, VK_PAUSE); + RegisterHotKey(m_hWnd, IDHK_DESKTOP, MOD_WIN, 'D'); + RegisterHotKey(m_hWnd, IDHK_PAGER, MOD_WIN, 'B'); + return TRUE; } @@ -1789,7 +1803,8 @@ break; case ID_SHELL_CMD_ADJUST_DAT: - LaunchCPanel(NULL, TEXT("timedate.cpl")); + //FIXME: Use SHRunControlPanel + ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL, SW_NORMAL); break; default: @@ -2581,7 +2596,10 @@ ptClick.x = MAKEPOINTS(lParam).x; ptClick.y = MAKEPOINTS(lParam).y; if (PtInRect(&rcClock, ptClick)) - LaunchCPanel(NULL, TEXT("timedate.cpl")); + { + //FIXME: use SHRunControlPanel + ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL, SW_NORMAL); + } } return TRUE; } @@ -2637,6 +2655,70 @@ return TRUE; } + HRESULT ExecResourceCmd(int id) + { + WCHAR szCommand[256]; + WCHAR *pszParameters; + + if (!LoadString(hExplorerInstance, + id, + szCommand, + sizeof(szCommand) / sizeof(szCommand[0]))) + { + return E_FAIL; + } + + pszParameters = wcschr(szCommand, L'>'); + if (!pszParameters) + return E_FAIL; + + *pszParameters = 0; + pszParameters++; + + ShellExecuteW(m_hWnd, NULL, szCommand, pszParameters, NULL, 0); + return S_OK; + } + + LRESULT OnHotkey(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + switch (wParam) + { + case IDHK_RUN: + DisplayRunFileDlg(); + break; + case IDHK_HELP: + ExecResourceCmd(IDS_HELP_COMMAND); + break; + case IDHK_EXPLORE: + ShellExecuteW(0, L"explore", NULL, NULL, NULL, 1); + break; + case IDHK_FIND: + SHFindFiles(NULL, NULL); + break; + case IDHK_FIND_COMPUTER: + SHFindComputer(NULL, NULL); + break; + case IDHK_SYS_PROPERTIES: + //FIXME: Use SHRunControlPanel + ShellExecuteW(m_hWnd, NULL, L"sysdm.cpl", NULL, NULL, SW_NORMAL); + break; + case IDHK_NEXT_TASK: + break; + case IDHK_PREV_TASK: + break; + case IDHK_MINIMIZE_ALL: + break; + case IDHK_RESTORE_ALL: + break; + case IDHK_DESKTOP: + break; + case IDHK_PAGER: + break; + } + + return 0; + } + LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { LRESULT Ret = FALSE; @@ -2653,44 +2735,20 @@ { /* FIXME: Handle these commands as well */ case IDM_TASKBARANDSTARTMENU: - DisplayProperties(); break; case IDM_SEARCH: + SHFindFiles(NULL, NULL); break; case IDM_HELPANDSUPPORT: - { - /* TODO: Implement properly */ - - LPCWSTR strSite = L"
https://www.reactos.org/
"; - - /* TODO: Make localizable */ - LPCWSTR strCaption = L"Sorry"; - LPCWSTR strMessage = L"ReactOS could not browse to '%s' (error %d). Please make sure there is a web browser installed."; - WCHAR tmpMessage[512]; - - /* TODO: Read from the registry */ - LPCWSTR strVerb = NULL; /* default */ - LPCWSTR strPath = strSite; - LPCWSTR strParams = NULL; - - /* The return value is defined as HINSTANCE for backwards compatibility only, the cast is needed */ - int result = (int) ShellExecuteW(m_hWnd, strVerb, strPath, strParams, NULL, SW_SHOWNORMAL); - if (result <= 32) - { - StringCchPrintfW(tmpMessage, 512, strMessage, strSite, result); - MessageBoxExW(m_hWnd, tmpMessage, strCaption, MB_OK, 0); - } + ExecResourceCmd(IDS_HELP_COMMAND); break; - } case IDM_RUN: - { DisplayRunFileDlg(); break; - } /* FIXME: Handle these commands as well */ case IDM_SYNCHRONIZE: @@ -2700,10 +2758,8 @@ break; case IDM_SHUTDOWN: - { DoExitWindows(); break; - } } } return Ret; @@ -2835,6 +2891,7 @@ MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy) MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu) MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows) + MESSAGE_HANDLER(WM_HOTKEY, OnHotkey) ALT_MSG_MAP(1) END_MSG_MAP() @@ -2878,16 +2935,6 @@ if (!Ret || Ret == -1) break; - - if (Msg.message == WM_HOTKEY) - { - switch (Msg.wParam) - { - case IDHK_RUN: /* Win+R */ - DisplayRunFileDlg(); - break; - } - } if (StartMenuBand == NULL || StartMenuBand->IsMenuMessage(&Msg) != S_OK)
10 years
1
0
0
0
[gadamopoulos] 65555: [EXPLORER] - Handle TWM_DOEXITWINDOWS in CTrayWindow. This message is sent from CDesktopWindow when it handles alt+f4 as an accelerator. - Also handle SC_CLOSE for WM_SYSCOMMA...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Dec 3 17:16:53 2014 New Revision: 65555 URL:
http://svn.reactos.org/svn/reactos?rev=65555&view=rev
Log: [EXPLORER] - Handle TWM_DOEXITWINDOWS in CTrayWindow. This message is sent from CDesktopWindow when it handles alt+f4 as an accelerator. - Also handle SC_CLOSE for WM_SYSCOMMAND by calling ExitWindowsDialog. - Fixes pressing alt+f4 in xp - Now we have to make CDesktopWindow send TWM_DOEXITWINDOWS to the tray Modified: trunk/reactos/base/shell/explorer/precomp.h trunk/reactos/base/shell/explorer/traywnd.cpp Modified: trunk/reactos/base/shell/explorer/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precom…
============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Wed Dec 3 17:16:53 2014 @@ -159,6 +159,7 @@ */ #define TWM_OPENSTARTMENU (WM_USER + 260) +#define TWM_DOEXITWINDOWS (WM_USER + 342) extern const GUID IID_IShellDesktopTray; Modified: trunk/reactos/base/shell/explorer/traywnd.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywn…
============================================================================== --- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Wed Dec 3 17:16:53 2014 @@ -2611,6 +2611,32 @@ return TRUE; } + LRESULT DoExitWindows() + { + ExitWindowsDialog(m_hWnd); + return 0; + } + + LRESULT OnDoExitWindows(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + /* + * TWM_DOEXITWINDOWS is send by the CDesktopBrowserr to us to + * show the shutdown dialog + */ + return DoExitWindows(); + } + + LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + if (wParam == SC_CLOSE) + { + return DoExitWindows(); + } + + bHandled = FALSE; + return TRUE; + } + LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { LRESULT Ret = FALSE; @@ -2675,13 +2701,7 @@ case IDM_SHUTDOWN: { - HINSTANCE hShell32; - EXITWINDLG ExitWinDlg; - - hShell32 = GetModuleHandle(TEXT("SHELL32.DLL")); - ExitWinDlg = (EXITWINDLG) GetProcAddress(hShell32, (LPCSTR) 60); - - ExitWinDlg(m_hWnd); + DoExitWindows(); break; } } @@ -2794,6 +2814,7 @@ /*MESSAGE_HANDLER(WM_DESTROY, OnDestroy)*/ MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTest) MESSAGE_HANDLER(WM_COMMAND, OnCommand) + MESSAGE_HANDLER(WM_SYSCOMMAND, OnSysCommand) MESSAGE_HANDLER(WM_NOTIFY, OnNotify) MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu) MESSAGE_HANDLER(WM_TIMER, OnTimer) @@ -2813,6 +2834,7 @@ MESSAGE_HANDLER(WM_NCMOUSEMOVE, OnMouseMove) MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy) MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu) + MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows) ALT_MSG_MAP(1) END_MSG_MAP()
10 years
1
0
0
0
[dquintana] 65554: [BROWSEUI] * Add a stubbed CExplorerBand, which I will be using to investigate how the windows shell implements the sidebar panels. This will never be called in ReactOS because o...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Dec 3 16:11:46 2014 New Revision: 65554 URL:
http://svn.reactos.org/svn/reactos?rev=65554&view=rev
Log: [BROWSEUI] * Add a stubbed CExplorerBand, which I will be using to investigate how the windows shell implements the sidebar panels. This will never be called in ReactOS because our shell view doesn't handle the buttons for opening the sidebars, so it never asks the shell browser to open one. CORE-8815 Added: trunk/reactos/dll/win32/browseui/explorerband.cpp (with props) trunk/reactos/dll/win32/browseui/explorerband.h (with props) trunk/reactos/dll/win32/browseui/res/explorerband.rgs (with props) Modified: trunk/reactos/dll/win32/browseui/CMakeLists.txt trunk/reactos/dll/win32/browseui/browseui.cpp trunk/reactos/dll/win32/browseui/browseui.rc trunk/reactos/dll/win32/browseui/precomp.h trunk/reactos/dll/win32/browseui/resource.h trunk/reactos/dll/win32/browseui/shellbrowser.cpp Modified: trunk/reactos/dll/win32/browseui/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -22,6 +22,7 @@ browseuiord.cpp commonbrowser.cpp desktopipc.cpp + explorerband.cpp globalfoldersettings.cpp internettoolbar.cpp parsecmdline.cpp Modified: trunk/reactos/dll/win32/browseui/browseui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
============================================================================== --- trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -38,6 +38,7 @@ OBJECT_ENTRY(CLSID_GlobalFolderSettings, CGlobalFolderSettings) OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar) OBJECT_ENTRY(CLSID_CRegTreeOptions, CRegTreeOptions) +OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand) END_OBJECT_MAP() CBrowseUIModule gModule; Modified: trunk/reactos/dll/win32/browseui/browseui.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
============================================================================== --- trunk/reactos/dll/win32/browseui/browseui.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/browseui.rc [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -41,6 +41,7 @@ IDR_GLOBALFOLDERSETTINGS REGISTRY "res/globalfoldersettings.rgs" IDR_INTERNETTOOLBAR REGISTRY "res/internettoolbar.rgs" IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs" +IDR_EXPLORERBAND REGISTRY "res/explorerband.rgs" /* * Everything specific to any language goes Added: trunk/reactos/dll/win32/browseui/explorerband.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.cpp (added) +++ trunk/reactos/dll/win32/browseui/explorerband.cpp [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -0,0 +1,698 @@ +#include "precomp.h" + +#if 1 +#undef UNIMPLEMENTED + +#define UNIMPLEMENTED DbgPrint("%s is UNIMPLEMENTED!\n", __FUNCTION__) +#endif + +extern "C" +HRESULT WINAPI CExplorerBand_Constructor(REFIID riid, LPVOID *ppv) +{ + return ShellObjectCreator<CExplorerBand>(riid, ppv); +} + +CExplorerBand::CExplorerBand() : + m_internalBand(NULL), + m_internalDeskBand(NULL), + m_internalObjectWithSite(NULL), + m_internalInputObject(NULL), + m_internalPersistStream(NULL), + m_internalOleCommandTarget(NULL), + m_internalServiceProvider(NULL), + m_internalBandNavigate(NULL), + m_internalWinEventHandler(NULL), + m_internalNamespaceProxy(NULL), + m_internalDispatch(NULL), + m_OnWinEventShown(FALSE) +{ + HRESULT hResult = CoCreateInstance(CLSID_ExplorerBand, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IUnknown, &m_internalBand)); + if (FAILED(hResult)) + { + ERR("Could not create internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IDeskBand, &m_internalDeskBand)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IDeskBand from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IObjectWithSite, &m_internalObjectWithSite)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IObjectWithSite from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IInputObject, &m_internalInputObject)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IInputObject from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IPersistStream, &m_internalPersistStream)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IPersistStream from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IOleCommandTarget, &m_internalOleCommandTarget)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IOleCommandTarget from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IServiceProvider, &m_internalServiceProvider)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IServiceProvider from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + m_internalServiceProvider = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IBandNavigate, &m_internalBandNavigate)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IBandNavigate from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + m_internalServiceProvider = NULL; + m_internalBandNavigate = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IWinEventHandler, &m_internalWinEventHandler)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface IWinEventHandler from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + m_internalServiceProvider = NULL; + m_internalBandNavigate = NULL; + m_internalWinEventHandler = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(INamespaceProxy, &m_internalNamespaceProxy)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface INamespaceProxy from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + m_internalServiceProvider = NULL; + m_internalBandNavigate = NULL; + m_internalWinEventHandler = NULL; + m_internalNamespaceProxy = NULL; + return; + } + hResult = m_internalBand->QueryInterface(IID_PPV_ARG(IDispatch, &m_internalDispatch)); + if (FAILED(hResult)) + { + ERR("Could not obtain interface INamespaceProxy from internal band (hr=%08lx).\n", hResult); + m_internalBand = NULL; + m_internalDeskBand = NULL; + m_internalObjectWithSite = NULL; + m_internalInputObject = NULL; + m_internalPersistStream = NULL; + m_internalOleCommandTarget = NULL; + m_internalServiceProvider = NULL; + m_internalBandNavigate = NULL; + m_internalWinEventHandler = NULL; + m_internalNamespaceProxy = NULL; + m_internalDispatch = NULL; + return; + } +} + +CExplorerBand::~CExplorerBand() +{ +} + +// *** IOleWindow methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::GetWindow(HWND *lphwnd) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetWindow(HWND *lphwnd=%p)\n", lphwnd); + hr = m_internalDeskBand->GetWindow(lphwnd); + if (lphwnd) + DbgPrint("\t*lphwnd=%p\n", *lphwnd); + DbgPrint("CExplorerBand::GetWindow returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::ContextSensitiveHelp(BOOL fEnterMode) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::ContextSensitiveHelp(BOOL fEnterMode=%s)\n", fEnterMode ? "TRUE" : "FALSE"); + hr = m_internalDeskBand->ContextSensitiveHelp(fEnterMode); + DbgPrint("CExplorerBand::ContextSensitiveHelp returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IDockingWindow methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::CloseDW(DWORD dwReserved) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::CloseDW(DWORD dwReserved=%u)\n", dwReserved); + hr = m_internalDeskBand->CloseDW(dwReserved); + DbgPrint("CExplorerBand::CloseDW returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::ResizeBorderDW(const RECT *prcBorder=%p, IUnknown *punkToolbarSite=%p, BOOL fReserved=%s)\n", + prcBorder, punkToolbarSite, fReserved ? "TRUE" : "FALSE"); + if (prcBorder) + DbgPrint("\t*prcBorder={%u, %u, %u, %u}\n", prcBorder->left, prcBorder->top, prcBorder->right, prcBorder->bottom); + hr = m_internalDeskBand->ResizeBorderDW(prcBorder, punkToolbarSite, fReserved); + DbgPrint("CExplorerBand::ResizeBorderDW returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::ShowDW(BOOL fShow) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::ShowDW(BOOL fShow=%s)\n", fShow ? "TRUE" : "FALSE"); + hr = m_internalDeskBand->ShowDW(fShow); + DbgPrint("CExplorerBand::ShowDW returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IDeskBand methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) +{ + HRESULT hr; + if (m_internalDeskBand) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetBandInfo(DWORD dwBandID=%u, DWORD dwViewMode=%u, DESKBANDINFO *pdbi=%p)\n", + dwBandID, dwViewMode, pdbi); + if (pdbi) + DbgPrint("\t*pdbi={dwMask=%u, ...}\n", pdbi->dwMask); + hr = m_internalDeskBand->GetBandInfo(dwBandID, dwViewMode, pdbi); + if (pdbi) + DbgPrint("\t*pdbi={dwMask=%u, crBkgnd=%u, ...}\n", pdbi->dwMask, pdbi->crBkgnd); + DbgPrint("CExplorerBand::GetBandInfo returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IObjectWithSite methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::SetSite(IUnknown *pUnkSite) +{ + HRESULT hr; + if (m_internalObjectWithSite) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::SetSite(IUnknown *pUnkSite=%p)\n", pUnkSite); + hr = m_internalObjectWithSite->SetSite(pUnkSite); + DbgPrint("CExplorerBand::SetSite returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::GetSite(REFIID riid, void **ppvSite) +{ + HRESULT hr; + if (m_internalObjectWithSite) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetSite(REFIID riid=%s, void **ppvSite=%p)\n", wine_dbgstr_guid(&riid), ppvSite); + hr = m_internalObjectWithSite->GetSite(riid, ppvSite); + if (ppvSite) + DbgPrint("\t*ppvSite=%p\n", *ppvSite); + DbgPrint("CExplorerBand::GetSite returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IOleCommandTarget methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) +{ + HRESULT hr; + if (m_internalOleCommandTarget) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::QueryStatus(const GUID *pguidCmdGroup=%s, ULONG cCmds=%08x, OLECMD prgCmds []=%p, OLECMDTEXT *pCmdText=%p)\n", + wine_dbgstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText); + hr = m_internalOleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText); + DbgPrint("CExplorerBand::QueryStatus returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) +{ + HRESULT hr; + if (m_internalOleCommandTarget) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::Exec(const GUID *pguidCmdGroup=%s, DWORD nCmdID=%u, DWORD nCmdexecopt=%u, VARIANT *pvaIn=%p, VARIANT *pvaOut=%p)\n", + wine_dbgstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut); + hr = m_internalOleCommandTarget->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + DbgPrint("CExplorerBand::Exec returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IServiceProvider methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) +{ + HRESULT hr; + if (m_internalServiceProvider) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService=%s, REFIID riid=%s, void **ppvObject=%p)\n", + wine_dbgstr_guid(&guidService), wine_dbgstr_guid(&riid), ppvObject); + hr = m_internalServiceProvider->QueryService(guidService, riid, ppvObject); + if (ppvObject) + DbgPrint("\t*ppvObject=%p\n", *ppvObject); + DbgPrint("CExplorerBand::QueryService returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IInputObject methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg) +{ + HRESULT hr; + if (m_internalInputObject) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::UIActivateIO(BOOL fActivate=%s, LPMSG lpMsg=%p)\n", + fActivate ? "TRUE" : "FALSE", lpMsg); + hr = m_internalInputObject->UIActivateIO(fActivate, lpMsg); + if (lpMsg) + DbgPrint("\t*lpMsg={hwnd=%p, message=%x, wParam=%x, lParam=%x, time=%x, pt={%u %u}}\n", + lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam, lpMsg->time, lpMsg->pt.x, lpMsg->pt.y); + DbgPrint("CExplorerBand::UIActivateIO returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::HasFocusIO() +{ + HRESULT hr; + if (m_internalInputObject) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::HasFocusIO()\n"); + hr = m_internalInputObject->HasFocusIO(); + DbgPrint("CExplorerBand::HasFocusIO returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg) +{ + HRESULT hr; + if (m_internalInputObject) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg=%p)\n", lpMsg); + hr = m_internalInputObject->TranslateAcceleratorIO(lpMsg); + if (lpMsg) + DbgPrint("\t*lpMsg={hwnd=%p, message=%x, wParam=%x, lParam=%x, time=%x, pt={%u %u}}\n", + lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam, lpMsg->time, lpMsg->pt.x, lpMsg->pt.y); + DbgPrint("CExplorerBand::TranslateAcceleratorIO returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IPersist methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::GetClassID(CLSID *pClassID) +{ + HRESULT hr; + if (m_internalPersistStream) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetClassID(CLSID *pClassID=%p)\n", pClassID); + hr = m_internalPersistStream->GetClassID(pClassID); + if (pClassID) + DbgPrint("\t*pClassID=%s\n", wine_dbgstr_guid(pClassID)); + DbgPrint("CExplorerBand::GetClassID returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IPersistStream methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::IsDirty() +{ + HRESULT hr; + if (m_internalPersistStream) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::IsDirty()\n"); + hr = m_internalPersistStream->IsDirty(); + DbgPrint("CExplorerBand::IsDirty returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::Load(IStream *pStm) +{ + HRESULT hr; + if (m_internalPersistStream) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::Load(IStream *pStm=%p)\n", pStm); + hr = m_internalPersistStream->Load(pStm); + DbgPrint("CExplorerBand::Load returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::Save(IStream *pStm, BOOL fClearDirty) +{ + HRESULT hr; + if (m_internalPersistStream) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::Save(IStream *pStm=%p, BOOL fClearDirty=%s)\n", + pStm, fClearDirty ? "TRUE" : "FALSE"); + hr = m_internalPersistStream->Save(pStm, fClearDirty); + DbgPrint("CExplorerBand::Save returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::GetSizeMax(ULARGE_INTEGER *pcbSize) +{ + HRESULT hr; + if (m_internalPersistStream) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetSizeMax(ULARGE_INTEGER *pcbSize=%p)\n", pcbSize); + hr = m_internalPersistStream->GetSizeMax(pcbSize); + if (pcbSize) + DbgPrint("\t*pcbSize=%llx\n", pcbSize->QuadPart); + DbgPrint("CExplorerBand::GetSizeMax returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IWinEventHandler methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) +{ + HRESULT hr; + if (m_internalWinEventHandler) + { + if (m_OnWinEventShown) + return m_internalWinEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult); + m_OnWinEventShown = TRUE; + + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd=%x, UINT uMsg=%x, WPARAM wParam=%x, LPARAM lParam=%x, LRESULT *theResult=%p)\n", + hWnd, uMsg, wParam, lParam, theResult); + hr = m_internalWinEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult); + if (theResult) + DbgPrint("\t*theResult=%x\n", *theResult); + DbgPrint("CExplorerBand::OnWinEvent returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::IsWindowOwner(HWND hWnd) +{ + HRESULT hr; + if (m_internalWinEventHandler) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::IsWindowOwner(HWND hWnd=%x)\n", hWnd); + hr = m_internalWinEventHandler->IsWindowOwner(hWnd); + DbgPrint("CExplorerBand::IsWindowOwner returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IBandNavigate methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::Select(long paramC) +{ + HRESULT hr; + if (m_internalBandNavigate) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::Select(long paramC=%x)\n", paramC); + hr = m_internalBandNavigate->Select(paramC); + DbgPrint("CExplorerBand::Select returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** INamespaceProxy *** +HRESULT STDMETHODCALLTYPE CExplorerBand::GetNavigateTarget(long paramC, long param10, long param14) +{ + HRESULT hr; + if (m_internalNamespaceProxy) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetNavigateTarget(long paramC=%08x, long param10=%08x, long param14=%08x)\n", + paramC, param10, param14); + hr = m_internalNamespaceProxy->GetNavigateTarget(paramC, param10, param14); + DbgPrint("CExplorerBand::GetNavigateTarget returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::Invoke(long paramC) +{ + HRESULT hr; + if (m_internalNamespaceProxy) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::Invoke(long paramC=%08x)\n", paramC); + hr = m_internalNamespaceProxy->Invoke(paramC); + DbgPrint("CExplorerBand::Invoke returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::OnSelectionChanged(long paramC) +{ + HRESULT hr; + if (m_internalNamespaceProxy) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::OnSelectionChanged(long paramC=%08x)\n", paramC); + hr = m_internalNamespaceProxy->OnSelectionChanged(paramC); + DbgPrint("CExplorerBand::OnSelectionChanged returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::RefreshFlags(long paramC, long param10, long param14) +{ + HRESULT hr; + if (m_internalNamespaceProxy) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::RefreshFlags(long paramC=%08x, long param10=%08x, long param14=%08x)\n", + paramC, param10, param14); + hr = m_internalNamespaceProxy->RefreshFlags(paramC, param10, param14); + DbgPrint("CExplorerBand::RefreshFlags returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::CacheItem(long paramC) +{ + HRESULT hr; + if (m_internalNamespaceProxy) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::CacheItem(long paramC=%08x)\n", paramC); + hr = m_internalNamespaceProxy->CacheItem(paramC); + DbgPrint("CExplorerBand::CacheItem returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +// *** IDispatch methods *** +HRESULT STDMETHODCALLTYPE CExplorerBand::GetTypeInfoCount(UINT *pctinfo) +{ + HRESULT hr; + if (m_internalDispatch) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetTypeInfoCount(UINT *pctinfo=%p)\n", pctinfo); + hr = m_internalDispatch->GetTypeInfoCount(pctinfo); + if (pctinfo) + DbgPrint("\t*pctinfo=%08x\n", *pctinfo); + DbgPrint("CExplorerBand::GetTypeInfoCount returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) +{ + HRESULT hr; + if (m_internalDispatch) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetTypeInfo(UINT iTInfo=%u, LCID lcid=%08x, ITypeInfo **ppTInfo=%p)\n", + iTInfo, lcid, ppTInfo); + hr = m_internalDispatch->GetTypeInfo(iTInfo, lcid, ppTInfo); + if (ppTInfo) + DbgPrint("\t*ppTInfo=%08x\n", *ppTInfo); + DbgPrint("CExplorerBand::GetTypeInfo returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HRESULT hr; + if (m_internalDispatch) + { + DbgPrint("HRESULT STDMETHODCALLTYPE CExplorerBand::GetIDsOfNames(REFIID riid=%s, LPOLESTR *rgszNames=%S, UINT cNames=%u, LCID lcid=%08x, DISPID *rgDispId=%p)\n", + wine_dbgstr_guid(&riid), rgszNames, cNames, lcid, rgDispId); + hr = m_internalDispatch->GetIDsOfNames(riid, rgszNames, cNames, lcid, rgDispId); + if (rgDispId && SUCCEEDED(hr)) + { + for (UINT i = 0; i < cNames; i++) + { + DbgPrint("\trgDispId[%d]=%08x\n", rgDispId[i]); + } + } + DbgPrint("CExplorerBand::GetTypeInfo returning %08lx\n", hr); + return hr; + } + + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CExplorerBand::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + Propchange: trunk/reactos/dll/win32/browseui/explorerband.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/browseui/explorerband.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.h (added) +++ trunk/reactos/dll/win32/browseui/explorerband.h [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -0,0 +1,227 @@ +#pragma once + +#if 0 +// Is this a CToolsBand that implements a toolbar? +class CToolBand : + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IDeskBand, + public IObjectWithSite, + public IInputObject, + public IPersistStream, + public IOleCommandTarget, + public IServiceProvider +{ +public: + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + + // *** IDockingWindow methods *** + virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); + virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); + virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + + // *** IDeskBand methods *** + virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + + // *** IObjectWithSite methods *** + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + + // *** IOleCommandTarget methods *** + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + + // *** IInputObject methods *** + virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); + virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + + // *** IPersist methods *** + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + + // *** IPersistStream methods *** + virtual HRESULT STDMETHODCALLTYPE IsDirty(); + virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); + virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); + virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + + BEGIN_COM_MAP(CToolBand) + COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand) + COM_INTERFACE_ENTRY2_IID(IID_IDockingWindow, IDockingWindow, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) + COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistStream) + COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) + END_COM_MAP() +}; + +class CNSCBand : + public CToolBand, + public IDeskBand, + public IObjectWithSite, + public IInputObject, + public IPersistStream, + public IOleCommandTarget, + public IServiceProvider, + public IBandNavigate, + public IWinEventHandler, + public INamespaceProxy +{ +public: + // *** IWinEventHandler methods *** + virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); + virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + + // *** IBandNavigate methods *** + virtual HRESULT STDMETHODCALLTYPE Select(long paramC); + + // *** INamespaceProxy *** + virtual HRESULT STDMETHODCALLTYPE GetNavigateTarget(long paramC, long param10, long param14); + virtual HRESULT STDMETHODCALLTYPE Invoke(long paramC); + virtual HRESULT STDMETHODCALLTYPE OnSelectionChanged(long paramC); + virtual HRESULT STDMETHODCALLTYPE RefreshFlags(long paramC, long param10, long param14); + virtual HRESULT STDMETHODCALLTYPE CacheItem(long paramC); + + BEGIN_COM_MAP(CNSCBand) + COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) + COM_INTERFACE_ENTRY_IID(IID_IBandNavigate, IBandNavigate) + COM_INTERFACE_ENTRY_IID(IID_INamespaceProxy, INamespaceProxy) +#if 0 + COM_INTERFACE_ENTRY_CHAIN(CToolBand) +#else + COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand) + COM_INTERFACE_ENTRY2_IID(IID_IDockingWindow, IDockingWindow, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) + COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistStream) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) +#endif + END_COM_MAP() +}; +#endif + +class CExplorerBand : + public CComCoClass<CExplorerBand, &CLSID_ExplorerBand>, +#if 0 + public CNSCBand, +#else + public CComObjectRootEx<CComMultiThreadModelNoCS>, +#endif + public IDeskBand, + public IObjectWithSite, + public IInputObject, + public IPersistStream, + public IOleCommandTarget, + public IServiceProvider, + public IBandNavigate, + public IWinEventHandler, + public INamespaceProxy +{ + CComPtr<IUnknown> m_internalBand; + + CComPtr<IDeskBand> m_internalDeskBand; + CComPtr<IObjectWithSite> m_internalObjectWithSite; + CComPtr<IInputObject> m_internalInputObject; + CComPtr<IPersistStream> m_internalPersistStream; + CComPtr<IOleCommandTarget> m_internalOleCommandTarget; + CComPtr<IServiceProvider> m_internalServiceProvider; + CComPtr<IBandNavigate> m_internalBandNavigate; + CComPtr<IWinEventHandler> m_internalWinEventHandler; + CComPtr<INamespaceProxy> m_internalNamespaceProxy; + CComPtr<IDispatch> m_internalDispatch; + + bool m_OnWinEventShown; +public: + CExplorerBand(); + virtual ~CExplorerBand(); + + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + + // *** IDockingWindow methods *** + virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); + virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); + virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + + // *** IDeskBand methods *** + virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + + // *** IObjectWithSite methods *** + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + + // *** IOleCommandTarget methods *** + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + + // *** IInputObject methods *** + virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); + virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + + // *** IPersist methods *** + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + + // *** IPersistStream methods *** + virtual HRESULT STDMETHODCALLTYPE IsDirty(); + virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); + virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); + virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + + // *** IWinEventHandler methods *** + virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); + virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + + // *** IBandNavigate methods *** + virtual HRESULT STDMETHODCALLTYPE Select(long paramC); + + // *** INamespaceProxy *** + virtual HRESULT STDMETHODCALLTYPE GetNavigateTarget(long paramC, long param10, long param14); + virtual HRESULT STDMETHODCALLTYPE Invoke(long paramC); + virtual HRESULT STDMETHODCALLTYPE OnSelectionChanged(long paramC); + virtual HRESULT STDMETHODCALLTYPE RefreshFlags(long paramC, long param10, long param14); + virtual HRESULT STDMETHODCALLTYPE CacheItem(long paramC); + + // *** IDispatch methods *** + virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); + virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); + virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); + virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + + DECLARE_REGISTRY_RESOURCEID(IDR_EXPLORERBAND) + DECLARE_NOT_AGGREGATABLE(CExplorerBand) + + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CExplorerBand) + COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) + COM_INTERFACE_ENTRY_IID(IID_IBandNavigate, IBandNavigate) + COM_INTERFACE_ENTRY_IID(IID_INamespaceProxy, INamespaceProxy) + COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand) + COM_INTERFACE_ENTRY2_IID(IID_IDockingWindow, IDockingWindow, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) + COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistStream) + COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) + END_COM_MAP() +}; + +extern "C" +HRESULT WINAPI CExplorerBand_Constructor(REFIID riid, LPVOID *ppv); Propchange: trunk/reactos/dll/win32/browseui/explorerband.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/browseui/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/precomp…
============================================================================== --- trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -41,6 +41,7 @@ #include "commonbrowser.h" #include "globalfoldersettings.h" #include "regtreeoptions.h" +#include "explorerband.h" #include <stdio.h> WINE_DEFAULT_DEBUG_CHANNEL(browseui); Added: trunk/reactos/dll/win32/browseui/res/explorerband.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/res/exp…
============================================================================== --- trunk/reactos/dll/win32/browseui/res/explorerband.rgs (added) +++ trunk/reactos/dll/win32/browseui/res/explorerband.rgs [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {EFA24E64-B078-11D0-89E4-00C04FC9E26E} = s 'Explorer TreeView Band' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} Propchange: trunk/reactos/dll/win32/browseui/res/explorerband.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/browseui/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/resourc…
============================================================================== --- trunk/reactos/dll/win32/browseui/resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/resource.h [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -77,6 +77,7 @@ #define IDR_INTERNETTOOLBAR 136 #define IDR_GLOBALFOLDERSETTINGS 137 #define IDR_REGTREEOPTIONS 138 +#define IDR_EXPLORERBAND 139 #define IDS_SMALLICONS 12301 #define IDS_LARGEICONS 12302 Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellbr…
============================================================================== --- trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Wed Dec 3 16:11:46 2014 @@ -23,6 +23,8 @@ #include <shellapi.h> #include <htiframe.h> #include <strsafe.h> + +#define USE_CUSTOM_EXPLORERBAND 1 extern "C" BOOL WINAPI Shell_GetImageLists( @@ -1179,9 +1181,24 @@ hResult = GetBaseBar(vertical, (IUnknown **)&theBaseBar); if (FAILED_UNEXPECTEDLY(hResult)) return hResult; - hResult = CoCreateInstance(classID, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IUnknown, &newBand)); - if (FAILED_UNEXPECTEDLY(hResult)) - return hResult; + +#if USE_CUSTOM_EXPLORERBAND + TRACE("ShowBand called for CLSID %s, vertical=%d...\n", wine_dbgstr_guid(&classID), vertical); + if (IsEqualCLSID(CLSID_ExplorerBand, classID)) + { + TRACE("CLSID_ExplorerBand requested, building internal band.\n"); + hResult = CExplorerBand_Constructor(IID_PPV_ARG(IUnknown, &newBand)); + if (FAILED_UNEXPECTEDLY(hResult)) + return hResult; + } + else +#endif + { + TRACE("A different CLSID requested, using CoCreateInstance.\n"); + hResult = CoCreateInstance(classID, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IUnknown, &newBand)); + if (FAILED_UNEXPECTEDLY(hResult)) + return hResult; + } hResult = theBaseBar->QueryInterface(IID_PPV_ARG(IDeskBar, &deskBar)); if (FAILED_UNEXPECTEDLY(hResult)) return hResult; @@ -1199,6 +1216,7 @@ hResult = dockingWindow->ShowDW(TRUE); if (FAILED_UNEXPECTEDLY(hResult)) return hResult; + return S_OK; }
10 years
1
0
0
0
[akhaldi] 65553: [KBDES] Please Ismael Ferreras Morezuelas (swyter) with these mostly formatting changes. CORE-8848
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 3 11:40:37 2014 New Revision: 65553 URL:
http://svn.reactos.org/svn/reactos?rev=65553&view=rev
Log: [KBDES] Please Ismael Ferreras Morezuelas (swyter) with these mostly formatting changes. CORE-8848 Modified: trunk/reactos/dll/keyboard/kbdes/kbdes.c Modified: trunk/reactos/dll/keyboard/kbdes/kbdes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdes/kbdes.c…
============================================================================== --- trunk/reactos/dll/keyboard/kbdes/kbdes.c [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdes/kbdes.c [iso-8859-1] Wed Dec 3 11:40:37 2014 @@ -1,12 +1,14 @@ /* * ReactOS Spanish Keyboard Layout - * Copyright (C) 2003 ReactOS + * Copyright (C) 2003-2014 ReactOS * License: LGPL, see: LGPL.txt - * Created by HUMA2000 from kbdus, kbdgr, kbdda and kbdfr - * huma2000(a)terra.es - * Thanks to arty for the kbtest utility and help - * Thanks to carraca from
reactos.com
forum for his fixes - * Thanks Elrond for help + * + * (c) 2003 - Created by HUMA2000 <huma2000(a)terra.es> from kbdus, kbdgr, kbdda and kbdfr. + * (c) 2014 - Updated by Swyter <swyterzone+ros(a)gmail.com> + * + * Thanks to: arty, for the kbtest utility and help. + * Thanks to: carraca, from
reactos.com
forum for his fixes. + * Thanks to: Elrond, for help. * * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
* and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
@@ -19,389 +21,407 @@ #include <ndk/kbd.h> #ifdef _M_IA64 -#define ROSDATA static __declspec(allocate(".data")) + #define ROSDATA static __declspec(allocate(".data")) #else -#ifdef _MSC_VER -#pragma data_seg(".data") -#define ROSDATA static -#else -#define ROSDATA static __attribute__((section(".data"))) + #ifdef _MSC_VER + #pragma data_seg(".data") + #define ROSDATA static + #else + #define ROSDATA static __attribute__((section(".data"))) + #endif #endif -#endif - -#define VK_EMPTY 0xff /* The non-existent VK */ + +#define VK_EMPTY 0xff /* The non-existent VK */ #define KNUMS KBDNUMPAD|KBDSPECIAL /* Special + number pad */ #define KMEXT KBDEXT|KBDMULTIVK /* Multi + ext */ -ROSDATA USHORT scancode_to_vk[] = { -/* 00 */ VK_EMPTY, -/* 01 */ VK_ESCAPE, -/* 02 */ '1', -/* 03 */ '2', -/* 04 */ '3', -/* 05 */ '4', -/* 06 */ '5', -/* 07 */ '6', -/* 08 */ '7', -/* 09 */ '8', -/* 0a */ '9', -/* 0b */ '0', -/* 0c */ VK_OEM_4, -/* 0d */ VK_OEM_6, -/* 0e */ VK_BACK, -/* 0f */ VK_TAB, -/* 10 */ 'Q', -/* 11 */ 'W', -/* 12 */ 'E', -/* 13 */ 'R', -/* 14 */ 'T', -/* 15 */ 'Y', -/* 16 */ 'U', -/* 17 */ 'I', -/* 18 */ 'O', -/* 19 */ 'P', -/* 1a */ VK_OEM_1, -/* 1b */ VK_OEM_PLUS, -/* 1c */ VK_RETURN, -/* 1d */ VK_LCONTROL, -/* 1e */ 'A', -/* 1f */ 'S', -/* 20 */ 'D', -/* 21 */ 'F', -/* 22 */ 'G', -/* 23 */ 'H', -/* 24 */ 'J', -/* 25 */ 'K', -/* 26 */ 'L', -/* 27 */ VK_OEM_3, -/* 28 */ VK_OEM_7, -/* 29 */ VK_OEM_5, -/* 2a */ VK_LSHIFT, -/* 2b */ VK_OEM_2, -/* 2c */ 'Z', -/* 2d */ 'X', -/* 2e */ 'C', -/* 2f */ 'V', -/* 30 */ 'B', -/* 31 */ 'N', -/* 32 */ 'M', -/* 33 */ VK_OEM_COMMA, -/* 34 */ VK_OEM_PERIOD, -/* 35 */ VK_OEM_MINUS, -/* 36 */ VK_RSHIFT, -/* 37 */ VK_MULTIPLY, -/* 38 */ VK_LMENU, -/* 39 */ VK_SPACE, -/* 3a */ VK_CAPITAL, -/* 3b */ VK_F1, -/* 3c */ VK_F2, -/* 3d */ VK_F3, -/* 3e */ VK_F4, -/* 3f */ VK_F5, -/* 40 */ VK_F6, -/* 41 */ VK_F7, -/* 42 */ VK_F8, -/* 43 */ VK_F9, -/* 44 */ VK_F10, -/* 45 */ VK_NUMLOCK | KMEXT, -/* 46 */ VK_SCROLL | KBDMULTIVK, -/* 47 */ VK_HOME | KNUMS, -/* 48 */ VK_UP | KNUMS, -/* 49 */ VK_PRIOR | KNUMS, -/* 4a */ VK_SUBTRACT, -/* 4b */ VK_LEFT | KNUMS, -/* 4c */ VK_CLEAR | KNUMS, -/* 4d */ VK_RIGHT | KNUMS, -/* 4e */ VK_ADD, -/* 4f */ VK_END | KNUMS, -/* 50 */ VK_DOWN | KNUMS, -/* 51 */ VK_NEXT | KNUMS, -/* 52 */ VK_INSERT | KNUMS, -/* 53 */ VK_DELETE | KNUMS, -/* 54 */ VK_SNAPSHOT, -/* 55 */ VK_EMPTY, -/* 56 */ VK_OEM_102, -/* 57 */ VK_F11, -/* 58 */ VK_F12, -/* 59 */ VK_EMPTY, -/* 5a */ VK_CLEAR, -/* 5b */ VK_EMPTY, -/* 5c */ VK_EMPTY, -/* 5d */ VK_EMPTY, -/* 5e */ VK_EMPTY, /* EREOF */ -/* 5f */ VK_EMPTY, -/* 60 */ VK_EMPTY, -/* 61 */ VK_EMPTY, -/* 62 */ VK_EMPTY, -/* 63 */ VK_EMPTY, /* ZOOM */ -/* 64 */ VK_HELP, -/* 65 */ VK_F13, -/* 66 */ VK_F14, -/* 67 */ VK_F15, -/* 68 */ VK_F16, -/* 69 */ VK_F17, -/* 6a */ VK_F18, -/* 6b */ VK_F19, -/* 6c */ VK_F20, -/* 6d */ VK_F21, -/* 6e */ VK_F22, -/* 6f */ VK_F23, -/* 70 */ VK_EMPTY, -/* 71 */ VK_EMPTY, -/* 72 */ VK_EMPTY, -/* 73 */ VK_EMPTY, -/* 74 */ VK_EMPTY, -/* 75 */ VK_EMPTY, -/* 76 */ VK_EMPTY, -/* 77 */ VK_F24, -/* 78 */ VK_EMPTY, -/* 79 */ VK_EMPTY, -/* 7a */ VK_EMPTY, -/* 7b */ VK_EMPTY, -/* 7c */ VK_EMPTY, -/* 7d */ VK_EMPTY, -/* 7e */ VK_EMPTY, -/* 7f */ VK_EMPTY, -/* 80 */ VK_EMPTY, -/* 00 */ 0 -}; - -ROSDATA VSC_VK extcode0_to_vk[] = { - { 0x10, VK_MEDIA_PREV_TRACK | KBDEXT }, // Pista anterior, no puedo probarlo hasta que no se implemente el sonido - { 0x19, VK_MEDIA_NEXT_TRACK | KBDEXT }, // Pista siguiente, - { 0x1D, VK_RCONTROL | KBDEXT }, // Tecla control - { 0x20, VK_VOLUME_MUTE | KBDEXT }, // Silenciar volumen - { 0x21, VK_LAUNCH_APP2 | KBDEXT }, // Tecla calculadora - { 0x22, VK_MEDIA_PLAY_PAUSE | KBDEXT }, // Play/pause - { 0x24, VK_MEDIA_STOP | KBDEXT }, // Stop - { 0x2E, VK_VOLUME_DOWN | KBDEXT }, // Bajar volumen - { 0x30, VK_VOLUME_UP | KBDEXT }, // Subir volumen - { 0x32, VK_BROWSER_HOME | KBDEXT }, // Pagina de inicio del navegador de internet o abrirlo si no esta activolo - { 0x35, VK_DIVIDE | KBDEXT }, // Tecla - { 0x37, VK_SNAPSHOT | KBDEXT }, // La tecla de imprimir pantalla - { 0x38, VK_RMENU | KBDEXT }, // Tecla alt - { 0x47, VK_HOME | KBDEXT }, // Tecla inicio - { 0x48, VK_UP | KBDEXT }, // Cursor arriba - { 0x49, VK_PRIOR | KBDEXT }, // Tecla Re pag - { 0x4B, VK_LEFT | KBDEXT }, // Cursor izquierda - { 0x4D, VK_RIGHT | KBDEXT }, // Cursor derecha - { 0x4F, VK_END | KBDEXT }, // Tecla Fin - { 0x50, VK_DOWN | KBDEXT }, // Cursor abajo - { 0x51, VK_NEXT | KBDEXT }, // Tecla Av pag - { 0x52, VK_INSERT | KBDEXT }, // Tecla insertar - { 0x53, VK_DELETE | KBDEXT }, // Tecla deletear - { 0x5B, VK_LWIN | KBDEXT }, // Tecla windows izquierda - { 0x5C, VK_RWIN | KBDEXT }, // Tecla windows derecha - { 0x5D, VK_APPS | KBDEXT }, // Tecla menu aplicacion derecha - { 0x5F, VK_SLEEP | KBDEXT }, // Tecla Sleep - { 0x65, VK_BROWSER_SEARCH | KBDEXT }, // Pagina de búsqueda en el navegador de internet - { 0x66, VK_BROWSER_FAVORITES | KBDEXT }, // Favoritos, tengo que esperar a que el tcp/ip - { 0x67, VK_BROWSER_REFRESH | KBDEXT }, // Refrescar el navegador de internet - { 0x68, VK_BROWSER_STOP | KBDEXT }, // Stop en el navegador de internet - { 0x69, VK_BROWSER_FORWARD | KBDEXT }, // Adelante en el navegador de internet - { 0x6A, VK_BROWSER_BACK | KBDEXT }, // Atrás en el navegador de internet - { 0x6B, VK_LAUNCH_APP1 | KBDEXT }, // Tecla Mi pc - { 0x6C, VK_LAUNCH_MAIL | KBDEXT }, // Abrir programa de e-mail - { 0x6D, VK_LAUNCH_MEDIA_SELECT | KBDEXT }, // Abrir reproductor multimedia - { 0x1C, VK_RETURN | KBDEXT }, // La tecla de intro - { 0x46, VK_CANCEL | KBDEXT }, // Tecla escape +ROSDATA USHORT scancode_to_vk[] = +{ + /* 00 */ VK_EMPTY, + /* 01 */ VK_ESCAPE, + /* 02 */ L'1', + /* 03 */ L'2', + /* 04 */ L'3', + /* 05 */ L'4', + /* 06 */ L'5', + /* 07 */ L'6', + /* 08 */ L'7', + /* 09 */ L'8', + /* 0a */ L'9', + /* 0b */ L'0', + /* 0c */ VK_OEM_4, + /* 0d */ VK_OEM_6, + /* 0e */ VK_BACK, + /* 0f */ VK_TAB, + /* 10 */ L'Q', + /* 11 */ L'W', + /* 12 */ L'E', + /* 13 */ L'R', + /* 14 */ L'T', + /* 15 */ L'Y', + /* 16 */ L'U', + /* 17 */ L'I', + /* 18 */ L'O', + /* 19 */ L'P', + /* 1a */ VK_OEM_1, + /* 1b */ VK_OEM_PLUS, + /* 1c */ VK_RETURN, + /* 1d */ VK_LCONTROL, + /* 1e */ L'A', + /* 1f */ L'S', + /* 20 */ L'D', + /* 21 */ L'F', + /* 22 */ L'G', + /* 23 */ L'H', + /* 24 */ L'J', + /* 25 */ L'K', + /* 26 */ L'L', + /* 27 */ VK_OEM_3, + /* 28 */ VK_OEM_7, + /* 29 */ VK_OEM_5, + /* 2a */ VK_LSHIFT, + /* 2b */ VK_OEM_2, + /* 2c */ L'Z', + /* 2d */ L'X', + /* 2e */ L'C', + /* 2f */ L'V', + /* 30 */ L'B', + /* 31 */ L'N', + /* 32 */ L'M', + /* 33 */ VK_OEM_COMMA, + /* 34 */ VK_OEM_PERIOD, + /* 35 */ VK_OEM_MINUS, + /* 36 */ VK_RSHIFT, + /* 37 */ VK_MULTIPLY, + /* 38 */ VK_LMENU, + /* 39 */ VK_SPACE, + /* 3a */ VK_CAPITAL, + /* 3b */ VK_F1, + /* 3c */ VK_F2, + /* 3d */ VK_F3, + /* 3e */ VK_F4, + /* 3f */ VK_F5, + /* 40 */ VK_F6, + /* 41 */ VK_F7, + /* 42 */ VK_F8, + /* 43 */ VK_F9, + /* 44 */ VK_F10, + /* 45 */ VK_NUMLOCK | KMEXT, + /* 46 */ VK_SCROLL | KBDMULTIVK, + /* 47 */ VK_HOME | KNUMS, + /* 48 */ VK_UP | KNUMS, + /* 49 */ VK_PRIOR | KNUMS, + /* 4a */ VK_SUBTRACT, + /* 4b */ VK_LEFT | KNUMS, + /* 4c */ VK_CLEAR | KNUMS, + /* 4d */ VK_RIGHT | KNUMS, + /* 4e */ VK_ADD, + /* 4f */ VK_END | KNUMS, + /* 50 */ VK_DOWN | KNUMS, + /* 51 */ VK_NEXT | KNUMS, + /* 52 */ VK_INSERT | KNUMS, + /* 53 */ VK_DELETE | KNUMS, + /* 54 */ VK_SNAPSHOT, + /* 55 */ VK_EMPTY, + /* 56 */ VK_OEM_102, + /* 57 */ VK_F11, + /* 58 */ VK_F12, + /* 59 */ VK_EMPTY, + /* 5a */ VK_CLEAR, + /* 5b */ VK_EMPTY, + /* 5c */ VK_EMPTY, + /* 5d */ VK_EMPTY, + /* 5e */ VK_EMPTY, /* EREOF */ + /* 5f */ VK_EMPTY, + /* 60 */ VK_EMPTY, + /* 61 */ VK_EMPTY, + /* 62 */ VK_EMPTY, + /* 63 */ VK_EMPTY, /* ZOOM */ + /* 64 */ VK_HELP, + /* 65 */ VK_F13, + /* 66 */ VK_F14, + /* 67 */ VK_F15, + /* 68 */ VK_F16, + /* 69 */ VK_F17, + /* 6a */ VK_F18, + /* 6b */ VK_F19, + /* 6c */ VK_F20, + /* 6d */ VK_F21, + /* 6e */ VK_F22, + /* 6f */ VK_F23, + /* 70 */ VK_EMPTY, + /* 71 */ VK_EMPTY, + /* 72 */ VK_EMPTY, + /* 73 */ VK_EMPTY, + /* 74 */ VK_EMPTY, + /* 75 */ VK_EMPTY, + /* 76 */ VK_EMPTY, + /* 77 */ VK_F24, + /* 78 */ VK_EMPTY, + /* 79 */ VK_EMPTY, + /* 7a */ VK_EMPTY, + /* 7b */ VK_EMPTY, + /* 7c */ VK_EMPTY, + /* 7d */ VK_EMPTY, + /* 7e */ VK_EMPTY, + /* 7f */ VK_EMPTY, + /* 80 */ VK_EMPTY, + /* 00 */ 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = +{ + { 0x10, KBDEXT | VK_MEDIA_PREV_TRACK }, // Pista anterior, no puedo probarlo hasta que no se implemente el sonido + { 0x19, KBDEXT | VK_MEDIA_NEXT_TRACK }, // Pista siguiente, + { 0x1D, KBDEXT | VK_RCONTROL }, // Tecla control + { 0x20, KBDEXT | VK_VOLUME_MUTE }, // Silenciar volumen + { 0x21, KBDEXT | VK_LAUNCH_APP2 }, // Tecla calculadora + { 0x22, KBDEXT | VK_MEDIA_PLAY_PAUSE }, // Reproducir/Pausa + { 0x24, KBDEXT | VK_MEDIA_STOP }, // Stop + { 0x2E, KBDEXT | VK_VOLUME_DOWN }, // Bajar volumen + { 0x30, KBDEXT | VK_VOLUME_UP }, // Subir volumen + { 0x32, KBDEXT | VK_BROWSER_HOME }, // Pagina de inicio del navegador de Internet o abrirlo si no esta activo + { 0x35, KBDEXT | VK_DIVIDE }, // Tecla + { 0x37, KBDEXT | VK_SNAPSHOT }, // La tecla de imprimir pantalla + { 0x38, KBDEXT | VK_RMENU }, // Tecla Alt + { 0x47, KBDEXT | VK_HOME }, // Tecla inicio + { 0x48, KBDEXT | VK_UP }, // Cursor arriba + { 0x49, KBDEXT | VK_PRIOR }, // Tecla Repág + { 0x4B, KBDEXT | VK_LEFT }, // Cursor izquierda + { 0x4D, KBDEXT | VK_RIGHT }, // Cursor derecha + { 0x4F, KBDEXT | VK_END }, // Tecla Fin + { 0x50, KBDEXT | VK_DOWN }, // Cursor abajo + { 0x51, KBDEXT | VK_NEXT }, // Tecla Avpág + { 0x52, KBDEXT | VK_INSERT }, // Tecla Ins + { 0x53, KBDEXT | VK_DELETE }, // Tecla Supr + { 0x5B, KBDEXT | VK_LWIN }, // Tecla Windows izquierda + { 0x5C, KBDEXT | VK_RWIN }, // Tecla Windows derecha + { 0x5D, KBDEXT | VK_APPS }, // Tecla menú aplicacion derecha + { 0x5F, KBDEXT | VK_SLEEP }, // Tecla Suspensión + { 0x65, KBDEXT | VK_BROWSER_SEARCH }, // Pagina de búsqueda en el navegador de Internet + { 0x66, KBDEXT | VK_BROWSER_FAVORITES }, // Favoritos, tengo que esperar a que el tcp/ip + { 0x67, KBDEXT | VK_BROWSER_REFRESH }, // Refrescar el navegador de Internet + { 0x68, KBDEXT | VK_BROWSER_STOP }, // Stop en el navegador de Internet + { 0x69, KBDEXT | VK_BROWSER_FORWARD }, // Adelante en el navegador de Internet + { 0x6A, KBDEXT | VK_BROWSER_BACK }, // Atrás en el navegador de Internet + { 0x6B, KBDEXT | VK_LAUNCH_APP1 }, // Tecla Mi PC + { 0x6C, KBDEXT | VK_LAUNCH_MAIL }, // Abrir programa de e-mail + { 0x6D, KBDEXT | VK_LAUNCH_MEDIA_SELECT }, // Abrir reproductor multimedia + { 0x1C, KBDEXT | VK_RETURN }, // La tecla de intro + { 0x46, KBDEXT | VK_CANCEL }, // Tecla escape { 0, 0 }, }; -ROSDATA VSC_VK extcode1_to_vk[] = { +ROSDATA VSC_VK extcode1_to_vk[] = +{ { 0, 0 }, }; -ROSDATA VK_TO_BIT modifier_keys[] = { +ROSDATA VK_TO_BIT modifier_keys[] = +{ { VK_SHIFT, KBDSHIFT }, { VK_CONTROL, KBDCTRL }, { VK_MENU, KBDALT }, { 0, 0 } }; -ROSDATA MODIFIERS modifier_bits = { +ROSDATA MODIFIERS modifier_bits = +{ modifier_keys, 6, - { 0, 1, 2, 4, SHFT_INVALID, SHFT_INVALID, 3 } -/* NONE, SHIFT, CTRL, CTRL+SHIFT, ALT */ -}; - -ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { - /* Normal vs Shifted */ - /* The numbers */ - //Del 1 al 5 tienen tres estados - { '4', 0, {'4', '$'} }, - { '5', 0, {'5', '%'} }, - //El 6 tiene 3 estados - { '7', 0, {'7', '/'} }, - { '8', 0, {'8', '('} }, - { '9', 0, {'9', ')'} }, - { '0', 0, {'0', '='} }, - { VK_OEM_3, CAPLOK, {0x00F1, 0x00D1} }, // ñà + { + 0, /* NINGUNO */ + 1, /* MAYÃS */ + 2, /* CTRL */ + 2|1, /* CTRL+MAYÃS */ + SHFT_INVALID, + SHFT_INVALID, + 3 /* ALT */ + } +}; + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = +{ + /* Normal, Mayús */ + /* The numbers -- Del 1 al 6 tienen tres estados */ + { L'7', 0, {L'7', L'/'} }, + { L'8', 0, {L'8', L'('} }, + { L'9', 0, {L'9', L')'} }, + { L'0', 0, {L'0', L'='} }, + { VK_OEM_3, CAPLOK, {L'ñ', L'Ã'} }, /* ñà */ /* Specials */ /* Ctrl-_ generates ES */ - { VK_OEM_6 ,0, {0x00a1, 0x00bf} }, // ¡¿ - { VK_OEM_4 ,0, {0x0027, '?'} }, //'? - { VK_OEM_COMMA ,0, {',', ';'} }, - { VK_OEM_PERIOD ,0, {'.', ':'} }, - { VK_OEM_MINUS ,0, {'-', '_'} }, - { VK_OEM_102 ,0, {'<', '>'} }, + { VK_OEM_6, 0, {L'¡', L'¿'} }, /* ¡¿ */ + { VK_OEM_4, 0, {0x27, L'?'} }, /* '? */ + { VK_OEM_COMMA, 0, {L',', L';'} }, + { VK_OEM_PERIOD, 0, {L'.', L':'} }, + { VK_OEM_MINUS, 0, {L'-', L'_'} }, + { VK_OEM_102, 0, {L'<', L'>'} }, /* Keys that do not have shift states */ - { VK_TAB, 0, {'\t', '\t'} }, - { VK_ADD, 0, {'+', '+'} }, - { VK_SUBTRACT, 0, {'-', '-'} }, - { VK_MULTIPLY, 0, {'*', '*'} }, - { VK_DIVIDE, 0, {'/', '/'} }, - { VK_ESCAPE, 0, {0x1b,0x1b} }, - { VK_SPACE, 0, {' ', ' '} }, + { VK_TAB, 0, {L'\t', L'\t'} }, + { VK_ADD, 0, {L'+', L'+'} }, + { VK_SUBTRACT, 0, {L'-', L'-'} }, + { VK_MULTIPLY, 0, {L'*', L'*'} }, + { VK_DIVIDE, 0, {L'/', L'/'} }, + { VK_ESCAPE, 0, {0x1b, 0x1b} }, + { VK_SPACE, 0, {L' ', L' '} }, { 0, 0 } }; -ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { - /* Normal, Shifted, Ctrl */ - +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = +{ + /* Normal, Mayús, Ctrl */ /* The alphabet */ - { 'A', CAPLOK, {'a', 'A', 0x01} }, - { 'B', CAPLOK, {'b', 'B', 0x02} }, - { 'C', CAPLOK, {'c', 'C', 0x03} }, - { 'D', CAPLOK, {'d', 'D', 0x04} }, - { 'F', CAPLOK, {'f', 'F', 0x06} }, - { 'G', CAPLOK, {'g', 'G', 0x07} }, - { 'H', CAPLOK, {'h', 'H', 0x08} }, - { 'I', CAPLOK, {'i', 'I', 0x09} }, - { 'J', CAPLOK, {'j', 'J', 0x0a} }, - { 'K', CAPLOK, {'k', 'K', 0x0b} }, - { 'L', CAPLOK, {'l', 'L', 0x0c} }, - { 'M', CAPLOK, {'m', 'M', 0x0d} }, - { 'N', CAPLOK, {'n', 'N', 0x0e} }, - { 'O', CAPLOK, {'o', 'O', 0x0f} }, - { 'P', CAPLOK, {'p', 'P', 0x10} }, - { 'Q', CAPLOK, {'q', 'Q', 0x11} }, - { 'R', CAPLOK, {'r', 'R', 0x12} }, - { 'S', CAPLOK, {'s', 'S', 0x13} }, - { 'T', CAPLOK, {'t', 'T', 0x14} }, - { 'U', CAPLOK, {'u', 'U', 0x15} }, - { 'V', CAPLOK, {'v', 'V', 0x16} }, - { 'W', CAPLOK, {'w', 'W', 0x17} }, - { 'X', CAPLOK, {'x', 'X', 0x18} }, - { 'Y', CAPLOK, {'y', 'Y', 0x19} }, - { 'Z', CAPLOK, {'z', 'Z', 0x1a} }, + { L'A', CAPLOK, {L'a', L'A', 0x01} }, + { L'B', CAPLOK, {L'b', L'B', 0x02} }, + { L'C', CAPLOK, {L'c', L'C', 0x03} }, + { L'D', CAPLOK, {L'd', L'D', 0x04} }, + { L'F', CAPLOK, {L'f', L'F', 0x06} }, + { L'G', CAPLOK, {L'g', L'G', 0x07} }, + { L'H', CAPLOK, {L'h', L'H', 0x08} }, + { L'I', CAPLOK, {L'i', L'I', 0x09} }, + { L'J', CAPLOK, {L'j', L'J', 0x0a} }, + { L'K', CAPLOK, {L'k', L'K', 0x0b} }, + { L'L', CAPLOK, {L'l', L'L', 0x0c} }, + { L'M', CAPLOK, {L'm', L'M', 0x0d} }, + { L'N', CAPLOK, {L'n', L'N', 0x0e} }, + { L'O', CAPLOK, {L'o', L'O', 0x0f} }, + { L'P', CAPLOK, {L'p', L'P', 0x10} }, + { L'Q', CAPLOK, {L'q', L'Q', 0x11} }, + { L'R', CAPLOK, {L'r', L'R', 0x12} }, + { L'S', CAPLOK, {L's', L'S', 0x13} }, + { L'T', CAPLOK, {L't', L'T', 0x14} }, + { L'U', CAPLOK, {L'u', L'U', 0x15} }, + { L'V', CAPLOK, {L'v', L'V', 0x16} }, + { L'W', CAPLOK, {L'w', L'W', 0x17} }, + { L'X', CAPLOK, {L'x', L'X', 0x18} }, + { L'Y', CAPLOK, {L'y', L'Y', 0x19} }, + { L'Z', CAPLOK, {L'z', L'Z', 0x1a} }, /* Legacy (telnet-style) ascii escapes */ - { VK_RETURN, 0, {'\r', '\r', '\n'} }, - { 0,0 } -}; - -ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { -/* Normal, shifted, control, Alt+Gr */ - { '1', 0, {'1', '!', WCH_NONE, 0x00a6} }, // 1!| - { '2', 0, {'2', '"', WCH_NONE, '@'} }, // 2"@ - { '3', 0, {'3', 0x00B7, WCH_NONE, '#'} }, // 3·# - { L'4', 0, {L'4', L'$', WCH_NONE, WCH_DEAD} }, // 4$~ - { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, L'~'} }, // 4$~ - { L'5', 0, {L'5', L'%', WCH_NONE, L'â¬'} }, // 5%⬠- { '6', 0, {'6', '&', WCH_NONE, 0x00AC} }, // 6&¬ - { 'E', CAPLOK, {'e', 'E', 0x05, 0x20AC} }, // eE⬠- { VK_OEM_PLUS, 0, {'+', '*', WCH_NONE, 0x005d} }, // +*] - { VK_OEM_2, 0, {0x00e7, 0x00c7, WCH_NONE, '}'} }, // çÃ} - - { VK_OEM_7, 0, {WCH_DEAD, WCH_DEAD, WCH_NONE, '{'} }, // ´¨{ - { VK_EMPTY, 0, {0xB4, 0xA8, WCH_NONE, WCH_NONE} }, // ´¨{ - - { VK_OEM_1, 0, {WCH_DEAD, WCH_DEAD, WCH_NONE, 0x5B} }, // `^[ - { VK_EMPTY, 0, {0x60, 0x5e, WCH_NONE, WCH_NONE} }, // `^[ - - { VK_OEM_5, 0, {0x00BA, 0x00AA, WCH_NONE, 0x005c} }, // çÃ} + { VK_RETURN, 0, {L'\r',L'\r',L'\n'} }, { 0, 0 } }; -ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { - { VK_NUMPAD0, 0, {'0'} }, - { VK_NUMPAD1, 0, {'1'} }, - { VK_NUMPAD2, 0, {'2'} }, - { VK_NUMPAD3, 0, {'3'} }, - { VK_NUMPAD4, 0, {'4'} }, - { VK_NUMPAD5, 0, {'5'} }, - { VK_NUMPAD6, 0, {'6'} }, - { VK_NUMPAD7, 0, {'7'} }, - { VK_NUMPAD8, 0, {'8'} }, - { VK_NUMPAD9, 0, {'9'} }, - { VK_DECIMAL, 0, {'.'} }, - { VK_BACK, 0, {'\010'} }, - { 0,0 } +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = +{ + /* Normal, Mayús, Ctrl, Alt+Gr */ + { L'1', 0, {L'1', L'!', WCH_NONE, L'|'} }, /* 1!| */ + { L'2', 0, {L'2', L'"', WCH_NONE, L'@'} }, /* 2"@ */ + { L'3', 0, {L'3', L'·', WCH_NONE, L'#'} }, /* 3·# */ + { L'4', 0, {L'4', L'$', WCH_NONE, WCH_DEAD} }, /* 4$~ */ + { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, L'~'} }, /* 4$~ */ + { L'5', 0, {L'5', L'%', WCH_NONE, L'â¬'} }, /* 5%⬠*/ + { L'6', 0, {L'6', L'&', WCH_NONE, L'¬'} }, /* 6&¬ */ + { L'E', CAPLOK, {L'e', L'E', 0x05, L'â¬'} }, /* eE⬠*/ + { VK_OEM_PLUS, 0, {L'+', L'*', WCH_NONE, L']'} }, /* +*] */ + { VK_OEM_2, 0, {L'ç', L'Ã', WCH_NONE, L'}'} }, /* çÃ} */ + + { VK_OEM_7, 0, {WCH_DEAD, WCH_DEAD, WCH_NONE, L'{'} }, /* ´¨{ */ + { VK_EMPTY, 0, {L'´', L'¨', WCH_NONE, WCH_NONE} }, /* ´¨{ */ + + { VK_OEM_1, 0, {WCH_DEAD, WCH_DEAD, WCH_NONE, L'['} }, /* `^[ */ + { VK_EMPTY, 0, {L'`', L'^', WCH_NONE, WCH_NONE} }, /* `^[ */ + + { VK_OEM_5, 0, {L'º', L'ª', WCH_NONE, 0x5c} }, /* ºª\ */ + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = +{ + { VK_NUMPAD0, 0, {L'0'} }, + { VK_NUMPAD1, 0, {L'1'} }, + { VK_NUMPAD2, 0, {L'2'} }, + { VK_NUMPAD3, 0, {L'3'} }, + { VK_NUMPAD4, 0, {L'4'} }, + { VK_NUMPAD5, 0, {L'5'} }, + { VK_NUMPAD6, 0, {L'6'} }, + { VK_NUMPAD7, 0, {L'7'} }, + { VK_NUMPAD8, 0, {L'8'} }, + { VK_NUMPAD9, 0, {L'9'} }, + { VK_DECIMAL, 0, {L'.'} }, + { VK_BACK, 0, {L'\010'} }, + { 0, 0 } }; #define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } -ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { - vk_master(1,keypad_numbers), - vk_master(2,key_to_chars_2mod), - vk_master(3,key_to_chars_3mod), - vk_master(4,key_to_chars_4mod), - { 0,0,0 } +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = +{ + vk_master(1, keypad_numbers), + vk_master(2, key_to_chars_2mod), + vk_master(3, key_to_chars_3mod), + vk_master(4, key_to_chars_4mod), + { 0, 0, 0 } }; #define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags //no funciona -ROSDATA DEADKEY deadkey[] = -{ - //*´* - { DEADTRANS(L'a', 0xb4, 0xE1, 0x00) }, // letra a con ´ - { DEADTRANS(L'A', 0xb4, 0xC1, 0x00) }, // letra A con ´ - { DEADTRANS(L'e', 0xb4, 0xE9, 0x00) }, // letra e con ´ - { DEADTRANS(L'E', 0xb4, 0xC9, 0x00) }, // letra E con ´ - { DEADTRANS(L'i', 0xb4, 0xED, 0x00) }, // letra i con ´ - { DEADTRANS(L'I', 0xb4, 0xCD, 0x00) }, // letra I con ´ - { DEADTRANS(L'o', 0xb4, 0xF3, 0x00) }, // letra o con ´ - { DEADTRANS(L'O', 0xb4, 0xD3, 0x00) }, // letra O con ´ - { DEADTRANS(L'u', 0xb4, 0xFA, 0x00) }, // letra u con ´ - { DEADTRANS(L'U', 0xb4, 0xDA, 0x00) }, // letra U con ´ - //*`* - { DEADTRANS(L'a', 0x60, 0xE0, 0x00) }, // letra a con ` - { DEADTRANS(L'A', 0x60, 0xC0, 0x00) }, // letra A con ` - { DEADTRANS(L'e', 0x60, 0xE8, 0x00) }, // letra e con ` - { DEADTRANS(L'E', 0x60, 0xC8, 0x00) }, // letra E con ` - { DEADTRANS(L'i', 0x60, 0xEC, 0x00) }, // letra i con ` - { DEADTRANS(L'I', 0x60, 0xCC, 0x00) }, // letra I con ` - { DEADTRANS(L'o', 0x60, 0xF2, 0x00) }, // letra o con ` - { DEADTRANS(L'O', 0x60, 0xD2, 0x00) }, // letra O con ` - { DEADTRANS(L'u', 0x60, 0xF9, 0x00) }, // letra u con ` - { DEADTRANS(L'U', 0x60, 0xD9, 0x00) }, // letra U con ` - //*^* - { DEADTRANS(L'a', 0x5E, 0xE2, 0x00) }, // letra a con ^ - { DEADTRANS(L'A', 0x5E, 0xC2, 0x00) }, // letra A con ^ - { DEADTRANS(L'e', 0x5E, 0xEA, 0x00) }, // letra e con ^ - { DEADTRANS(L'E', 0x5E, 0xCA, 0x00) }, // letra E con ^ - { DEADTRANS(L'i', 0x5E, 0xEE, 0x00) }, // letra i con ^ - { DEADTRANS(L'I', 0x5E, 0xCE, 0x00) }, // letra I con ^ - { DEADTRANS(L'o', 0x5E, 0xF4, 0x00) }, // letra o con ^ - { DEADTRANS(L'O', 0x5E, 0xD4, 0x00) }, // letra O con ^ - { DEADTRANS(L'u', 0x5E, 0xFB, 0x00) }, // letra u con ^ - { DEADTRANS(L'U', 0x5E, 0xDB, 0x00) }, // letra U con ^ - //*¨* - { DEADTRANS(L'a', 0xA8, 0xE4, 0x00) }, // letra a con ¨ - { DEADTRANS(L'A', 0xA8, 0xC4, 0x00) }, // letra A con ¨ - { DEADTRANS(L'e', 0xA8, 0xEB, 0x00) }, // letra e con ¨ - { DEADTRANS(L'E', 0xA8, 0xCB, 0x00) }, // letra E con ¨ - { DEADTRANS(L'i', 0xA8, 0xEF, 0x00) }, // letra i con ¨ - { DEADTRANS(L'I', 0xA8, 0xCF, 0x00) }, // letra I con ¨ - { DEADTRANS(L'o', 0xA8, 0xF6, 0x00) }, // letra o con ¨ - { DEADTRANS(L'O', 0xA8, 0xD6, 0x00) }, // letra O con ¨ - { DEADTRANS(L'u', 0xA8, 0xFC, 0x00) }, // letra u con ¨ - { DEADTRANS(L'U', 0xA8, 0xDC, 0x00) }, // letra U con ¨ - //*~* - { DEADTRANS(L'a', 0x7e, 0xe3, 0x00) }, // ã - { DEADTRANS(L'A', 0x7e, 0xc3, 0x00) }, // à - { DEADTRANS(L'n', 0x7e, 0xf1, 0x00) }, // ñ - { DEADTRANS(L'N', 0x7e, 0xd1, 0x00) }, // à - { DEADTRANS(L'o', 0x7e, 0xf5, 0x00) }, // õ - { DEADTRANS(L'O', 0x7e, 0xd5, 0x00) }, // à - { 0, 0, 0} -}; - -ROSDATA VSC_LPWSTR key_names[] = { +ROSDATA DEADKEY deadkey[] = +{ + /* ´ */ + { DEADTRANS(L'a', L'´', 0xE1, 0x00) }, // letra a con ´ | á + { DEADTRANS(L'A', L'´', 0xC1, 0x00) }, // letra A con ´ | à + { DEADTRANS(L'e', L'´', 0xE9, 0x00) }, // letra e con ´ | é + { DEADTRANS(L'E', L'´', 0xC9, 0x00) }, // letra E con ´ | à + { DEADTRANS(L'i', L'´', 0xED, 0x00) }, // letra i con ´ | à + { DEADTRANS(L'I', L'´', 0xCD, 0x00) }, // letra I con ´ | à + { DEADTRANS(L'o', L'´', 0xF3, 0x00) }, // letra o con ´ | ó + { DEADTRANS(L'O', L'´', 0xD3, 0x00) }, // letra O con ´ | à + { DEADTRANS(L'u', L'´', 0xFA, 0x00) }, // letra u con ´ | ú + { DEADTRANS(L'U', L'´', 0xDA, 0x00) }, // letra U con ´ | à + + /* ` */ + { DEADTRANS(L'a', L'`', 0xE0, 0x00) }, // letra a con ` | à + { DEADTRANS(L'A', L'`', 0xC0, 0x00) }, // letra A con ` | à + { DEADTRANS(L'e', L'`', 0xE8, 0x00) }, // letra e con ` | è + { DEADTRANS(L'E', L'`', 0xC8, 0x00) }, // letra E con ` | à + { DEADTRANS(L'i', L'`', 0xEC, 0x00) }, // letra i con ` | ì + { DEADTRANS(L'I', L'`', 0xCC, 0x00) }, // letra I con ` | à + { DEADTRANS(L'o', L'`', 0xF2, 0x00) }, // letra o con ` | ò + { DEADTRANS(L'O', L'`', 0xD2, 0x00) }, // letra O con ` | à + { DEADTRANS(L'u', L'`', 0xF9, 0x00) }, // letra u con ` | ù + { DEADTRANS(L'U', L'`', 0xD9, 0x00) }, // letra U con ` | à + + /* ^ */ + { DEADTRANS(L'a', L'^', 0xE2, 0x00) }, // letra a con ^ | â + { DEADTRANS(L'A', L'^', 0xC2, 0x00) }, // letra A con ^ | à + { DEADTRANS(L'e', L'^', 0xEA, 0x00) }, // letra e con ^ | ê + { DEADTRANS(L'E', L'^', 0xCA, 0x00) }, // letra E con ^ | à + { DEADTRANS(L'i', L'^', 0xEE, 0x00) }, // letra i con ^ | î + { DEADTRANS(L'I', L'^', 0xCE, 0x00) }, // letra I con ^ | à + { DEADTRANS(L'o', L'^', 0xF4, 0x00) }, // letra o con ^ | ô + { DEADTRANS(L'O', L'^', 0xD4, 0x00) }, // letra O con ^ | à + { DEADTRANS(L'u', L'^', 0xFB, 0x00) }, // letra u con ^ | û + { DEADTRANS(L'U', L'^', 0xDB, 0x00) }, // letra U con ^ | à + + /* ¨ */ + { DEADTRANS(L'a', L'¨', 0xE4, 0x00) }, // letra a con ¨ | ä + { DEADTRANS(L'A', L'¨', 0xC4, 0x00) }, // letra A con ¨ | à + { DEADTRANS(L'e', L'¨', 0xEB, 0x00) }, // letra e con ¨ | ë + { DEADTRANS(L'E', L'¨', 0xCB, 0x00) }, // letra E con ¨ | à + { DEADTRANS(L'i', L'¨', 0xEF, 0x00) }, // letra i con ¨ | ï + { DEADTRANS(L'I', L'¨', 0xCF, 0x00) }, // letra I con ¨ | à + { DEADTRANS(L'o', L'¨', 0xF6, 0x00) }, // letra o con ¨ | ö + { DEADTRANS(L'O', L'¨', 0xD6, 0x00) }, // letra O con ¨ | à + { DEADTRANS(L'u', L'¨', 0xFC, 0x00) }, // letra u con ¨ | ü + { DEADTRANS(L'U', L'¨', 0xDC, 0x00) }, // letra U con ¨ | à + + /* ~ */ + { DEADTRANS(L'a', L'~', 0xe3, 0x00) }, // letra a con ~ | ã + { DEADTRANS(L'A', L'~', 0xc3, 0x00) }, // letra A con ~ | à + { DEADTRANS(L'n', L'~', 0xf1, 0x00) }, // letra n con ~ | ñ + { DEADTRANS(L'N', L'~', 0xd1, 0x00) }, // letra N con ~ | à + { DEADTRANS(L'o', L'~', 0xf5, 0x00) }, // letra o con ~ | õ + { DEADTRANS(L'O', L'~', 0xd5, 0x00) }, // letra O con ~ | à + + { 0, 0, 0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = +{ { 0x00, L"" }, { 0x01, L"Esc" }, { 0x0e, L"Retroceso" }, @@ -457,7 +477,8 @@ { 0, NULL }, }; -ROSDATA VSC_LPWSTR extended_key_names[] = { +ROSDATA VSC_LPWSTR extended_key_names[] = +{ { 0x1c, L"Intro num" }, { 0x1d, L"Ctrl der." }, { 0x35, L"/ num." }, @@ -483,32 +504,33 @@ { 0, NULL }, }; -ROSDATA DEADKEY_LPWSTR dead_key_names[] = { - L"\x00b4" L"Agudo", - L"\x0060" L"Grave", - L"\x005e" L"Circunflejo", - L"\x00A8" L"Diéresis", - NULL +ROSDATA DEADKEY_LPWSTR dead_key_names[] = +{ + L"\x00b4" L"Agudo", + L"\x0060" L"Grave", + L"\x005e" L"Circunflejo", + L"\x00A8" L"Diéresis", + NULL }; /* Finally, the master table */ -ROSDATA KBDTABLES keyboard_layout_table = { - +ROSDATA KBDTABLES keyboard_layout_table = +{ /* modifier assignments */ &modifier_bits, /* character from vk tables */ vk_to_wchar_master_table, - /* diacritical marks -- currently implemented by wine code */ - /* Spanish have severals */ + /* diacritical marks -- currently implemented by wine code, spanish has several */ deadkey, /* Key names */ (VSC_LPWSTR *)key_names, (VSC_LPWSTR *)extended_key_names, + + /* Dead key names */ dead_key_names, - /* Dead key names */ /* scan code to virtual key maps */ scancode_to_vk, @@ -516,14 +538,16 @@ extcode0_to_vk, extcode1_to_vk, - MAKELONG(KLLF_ALTGR, 1), /* Version 1.0 */ - - /* Ligatures -- Spanish doesn't have any */ + /* version 1.0 */ + MAKELONG(KLLF_ALTGR, 1), + + /* ligatures -- Spanish does not have any */ 0, 0, NULL }; -PKBDTABLES WINAPI KbdLayerDescriptor(VOID) { +PKBDTABLES WINAPI KbdLayerDescriptor(VOID) +{ return &keyboard_layout_table; }
10 years
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
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
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200