Author: hbelusca
Date: Sun Aug 31 11:58:50 2014
New Revision: 64007
URL:
http://svn.reactos.org/svn/reactos?rev=64007&view=rev
Log:
[CONSRV]
- Some code cleaning.
- Bring back the terminal bell that was added in revision 58253 and disabled in revision
58447.
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -22,12 +22,6 @@
static VOID NTAPI
DummyDeinitTerminal(IN OUT PTERMINAL This)
-{
-}
-
-static VOID NTAPI
-DummyDrawRegion(IN OUT PTERMINAL This,
- SMALL_RECT* Region)
{
}
@@ -76,6 +70,12 @@
+static VOID NTAPI
+DummyDrawRegion(IN OUT PTERMINAL This,
+ SMALL_RECT* Region)
+{
+}
+
static BOOL NTAPI
DummySetCursorInfo(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer)
@@ -119,15 +119,6 @@
{
}
-/*
-static BOOL NTAPI
-DummyGetSelectionInfo(IN OUT PTERMINAL This,
- PCONSOLE_SELECTION_INFO pSelectionInfo)
-{
- return TRUE;
-}
-*/
-
static BOOL NTAPI
DummySetPalette(IN OUT PTERMINAL This,
HPALETTE PaletteHandle,
@@ -147,11 +138,11 @@
{
DummyInitTerminal,
DummyDeinitTerminal,
- DummyDrawRegion,
DummyReadStream,
DummyWriteStream,
+ DummyDrawRegion,
DummySetCursorInfo,
DummySetScreenInfo,
DummyResizeTerminal,
@@ -159,7 +150,6 @@
DummyReleaseScreenBuffer,
DummyChangeTitle,
DummyGetLargestConsoleWindowSize,
- // DummyGetSelectionInfo,
DummySetPalette,
DummyShowMouseCursor,
};
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -2435,7 +2435,7 @@
}
case PM_CONSOLE_BEEP:
- DPRINT1("Beep !!\n");
+ DPRINT1("Beep\n");
Beep(800, 200);
break;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -675,6 +675,15 @@
SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL);
}
+/* static */ VOID NTAPI
+GuiRingBell(IN OUT PFRONTEND This)
+{
+ PGUI_CONSOLE_DATA GuiData = This->Data;
+
+ /* Emit an error beep sound */
+ SendNotifyMessage(GuiData->hWindow, PM_CONSOLE_BEEP, 0, 0);
+}
+
static BOOL NTAPI
GuiSetCursorInfo(IN OUT PFRONTEND This,
PCONSOLE_SCREEN_BUFFER Buff)
@@ -1083,6 +1092,7 @@
GuiDeinitFrontEnd,
GuiDrawRegion,
GuiWriteStream,
+ GuiRingBell,
GuiSetCursorInfo,
GuiSetScreenInfo,
GuiResizeTerminal,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -286,14 +286,6 @@
{
PFRONTEND FrontEnd = This->Data;
FrontEnd->Vtbl->DeinitFrontEnd(FrontEnd);
-}
-
-static VOID NTAPI
-ConSrvTermDrawRegion(IN OUT PTERMINAL This,
- SMALL_RECT* Region)
-{
- PFRONTEND FrontEnd = This->Data;
- FrontEnd->Vtbl->DrawRegion(FrontEnd, Region);
}
@@ -588,14 +580,12 @@
}
continue;
}
- // /* --- BEL ---*/
- // else if (Buffer[i] == L'\a')
- // {
- // // FIXME: This MUST BE moved to the terminal emulator frontend!!
- // DPRINT1("Bell\n");
- // // SendNotifyMessage(Console->hWindow, PM_CONSOLE_BEEP, 0, 0);
- // continue;
- // }
+ /* --- BEL ---*/
+ else if (Buffer[i] == L'\a')
+ {
+ FrontEnd->Vtbl->RingBell(FrontEnd);
+ continue;
+ }
}
UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X);
UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X);
@@ -656,6 +646,14 @@
+static VOID NTAPI
+ConSrvTermDrawRegion(IN OUT PTERMINAL This,
+ SMALL_RECT* Region)
+{
+ PFRONTEND FrontEnd = This->Data;
+ FrontEnd->Vtbl->DrawRegion(FrontEnd, Region);
+}
+
static BOOL NTAPI
ConSrvTermSetCursorInfo(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer)
@@ -714,16 +712,6 @@
FrontEnd->Vtbl->GetLargestConsoleWindowSize(FrontEnd, pSize);
}
-/*
-static BOOL NTAPI
-ConSrvTermGetSelectionInfo(IN OUT PTERMINAL This,
- PCONSOLE_SELECTION_INFO pSelectionInfo)
-{
- PFRONTEND FrontEnd = This->Data;
- return FrontEnd->Vtbl->GetSelectionInfo(FrontEnd, pSelectionInfo);
-}
-*/
-
static BOOL NTAPI
ConSrvTermSetPalette(IN OUT PTERMINAL This,
HPALETTE PaletteHandle,
@@ -745,11 +733,11 @@
{
ConSrvTermInitTerminal,
ConSrvTermDeinitTerminal,
- ConSrvTermDrawRegion,
ConSrvTermReadStream,
ConSrvTermWriteStream,
+ ConSrvTermDrawRegion,
ConSrvTermSetCursorInfo,
ConSrvTermSetScreenInfo,
ConSrvTermResizeTerminal,
@@ -757,7 +745,6 @@
ConSrvTermReleaseScreenBuffer,
ConSrvTermChangeTitle,
ConSrvTermGetLargestConsoleWindowSize,
- // ConSrvTermGetSelectionInfo,
ConSrvTermSetPalette,
ConSrvTermShowMouseCursor,
};
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -194,10 +194,6 @@
IN struct _CONSOLE* Console);
VOID (NTAPI *DeinitTerminal)(IN OUT PTERMINAL This);
- /* Interface used for both text-mode and graphics screen buffers */
- VOID (NTAPI *DrawRegion)(IN OUT PTERMINAL This,
- SMALL_RECT* Region);
-
/************ Line discipline ***************/
@@ -222,6 +218,9 @@
+ /* Interface used for both text-mode and graphics screen buffers */
+ VOID (NTAPI *DrawRegion)(IN OUT PTERMINAL This,
+ SMALL_RECT* Region);
BOOL (NTAPI *SetCursorInfo)(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
BOOL (NTAPI *SetScreenInfo)(IN OUT PTERMINAL This,
@@ -239,8 +238,6 @@
VOID (NTAPI *ChangeTitle)(IN OUT PTERMINAL This);
VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PTERMINAL This,
PCOORD pSize);
- // BOOL (NTAPI *GetSelectionInfo)(IN OUT PTERMINAL This,
- // PCONSOLE_SELECTION_INFO pSelectionInfo);
BOOL (NTAPI *SetPalette)(IN OUT PTERMINAL This,
HPALETTE PaletteHandle,
UINT PaletteUsage);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1]
Sun Aug 31 11:58:50 2014
@@ -58,6 +58,7 @@
UINT ScrolledLines,
PWCHAR Buffer,
UINT Length);
+ VOID (NTAPI *RingBell)(IN OUT PFRONTEND This);
BOOL (NTAPI *SetCursorInfo)(IN OUT PFRONTEND This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
BOOL (NTAPI *SetScreenInfo)(IN OUT PFRONTEND This,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1] Sun
Aug 31 11:58:50 2014
@@ -8,11 +8,7 @@
#pragma once
-/* Macros used to call functions in the FRONTEND_VTBL virtual table */
-
-#define TermDrawRegion(Console, Region) \
- (Console)->TermIFace.Vtbl->DrawRegion(&(Console)->TermIFace, (Region))
-
+/* Macros used to call functions in the TERMINAL_VTBL virtual table */
#define TermReadStream(Console, ExeName, /**/ Unicode, /**/ Buffer, ReadControl,
NumCharsToRead, NumCharsRead) \
(Console)->TermIFace.Vtbl->ReadStream(&(Console)->TermIFace, (ExeName),
/**/ (Unicode), /**/ \
@@ -23,6 +19,8 @@
(Length), (Attrib))
+#define TermDrawRegion(Console, Region) \
+ (Console)->TermIFace.Vtbl->DrawRegion(&(Console)->TermIFace, (Region))
#define TermSetCursorInfo(Console, ScreenBuffer) \
(Console)->TermIFace.Vtbl->SetCursorInfo(&(Console)->TermIFace,
(ScreenBuffer))
#define TermSetScreenInfo(Console, ScreenBuffer, OldCursorX, OldCursorY) \
@@ -33,27 +31,30 @@
(Console)->TermIFace.Vtbl->SetActiveScreenBuffer(&(Console)->TermIFace)
#define TermReleaseScreenBuffer(Console, ScreenBuffer) \
(Console)->TermIFace.Vtbl->ReleaseScreenBuffer(&(Console)->TermIFace,
(ScreenBuffer))
+#define TermChangeTitle(Console) \
+ (Console)->TermIFace.Vtbl->ChangeTitle(&(Console)->TermIFace)
+#define TermGetLargestConsoleWindowSize(Console, pSize) \
+
(Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace,
(pSize))
+#define TermSetPalette(Console, PaletteHandle, PaletteUsage) \
+ (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace,
(PaletteHandle), (PaletteUsage))
+#define TermShowMouseCursor(Console, Show) \
+ (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace,
(Show))
+
+
+/* Macros used to call functions in the FRONTEND_VTBL virtual table */
+
#define TermRefreshInternalInfo(Console) \
(Console)->FrontEndIFace.Vtbl->RefreshInternalInfo(&(Console)->FrontEndIFace)
-
-#define TermChangeTitle(Console) \
- (Console)->TermIFace.Vtbl->ChangeTitle(&(Console)->TermIFace)
#define TermChangeIcon(Console, IconHandle) \
(Console)->FrontEndIFace.Vtbl->ChangeIcon(&(Console)->FrontEndIFace,
(IconHandle))
#define TermGetConsoleWindowHandle(Console) \
(Console)->FrontEndIFace.Vtbl->GetConsoleWindowHandle(&(Console)->FrontEndIFace)
-#define TermGetLargestConsoleWindowSize(Console, pSize) \
-
(Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace,
(pSize))
#define TermGetSelectionInfo(Console, pSelectionInfo) \
(Console)->FrontEndIFace.Vtbl->GetSelectionInfo(&(Console)->FrontEndIFace,
(pSelectionInfo))
-#define TermSetPalette(Console, PaletteHandle, PaletteUsage) \
- (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace,
(PaletteHandle), (PaletteUsage))
#define TermGetDisplayMode(Console) \
(Console)->FrontEndIFace.Vtbl->GetDisplayMode(&(Console)->FrontEndIFace)
#define TermSetDisplayMode(Console, NewMode) \
(Console)->FrontEndIFace.Vtbl->SetDisplayMode(&(Console)->FrontEndIFace,
(NewMode))
-#define TermShowMouseCursor(Console, Show) \
- (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace,
(Show))
#define TermSetMouseCursor(Console, CursorHandle) \
(Console)->FrontEndIFace.Vtbl->SetMouseCursor(&(Console)->FrontEndIFace,
(CursorHandle))
#define TermMenuControl(Console, CmdIdLow, CmdIdHigh) \