https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1a89a3e731a4c22f757a5…
commit 1a89a3e731a4c22f757a55862d50731a649e9f82
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Aug 8 20:45:39 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 8 20:46:41 2018 +0200
[CONSRV] Minor code re-organization.
---
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c | 37 +------------
win32ss/user/winsrv/consrv/frontends/gui/guiterm.c | 2 -
win32ss/user/winsrv/consrv/frontends/gui/guiterm.h | 62 +++++++++++++++++++++-
3 files changed, 61 insertions(+), 40 deletions(-)
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
index 860244f6c5..6071a5dd9c 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
@@ -642,16 +642,6 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create)
return (BOOL)DefWindowProcW(GuiData->hWindow, WM_NCCREATE, 0, (LPARAM)Create);
}
-
-BOOL
-EnterFullScreen(PGUI_CONSOLE_DATA GuiData);
-VOID
-LeaveFullScreen(PGUI_CONSOLE_DATA GuiData);
-VOID
-SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
-VOID
-GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData);
-
static VOID
OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
{
@@ -973,18 +963,6 @@ UpdateSelection(PGUI_CONSOLE_DATA GuiData,
DeleteObject(oldRgn);
}
-
-VOID
-GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData,
- PRECT rcView,
- PRECT rcFramebuffer);
-VOID
-GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData,
- PRECT rcView,
- PRECT rcFramebuffer);
-
static VOID
OnPaint(PGUI_CONSOLE_DATA GuiData)
{
@@ -1966,12 +1944,6 @@ Quit:
return DefWindowProcW(GuiData->hWindow, msg, wParam, lParam);
}
-VOID
-GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData);
-VOID
-GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData);
static VOID
Copy(PGUI_CONSOLE_DATA GuiData)
@@ -1996,13 +1968,6 @@ Copy(PGUI_CONSOLE_DATA GuiData)
UpdateSelection(GuiData, NULL, NULL);
}
-VOID
-GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData);
-VOID
-GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData);
-
static VOID
Paste(PGUI_CONSOLE_DATA GuiData)
{
@@ -2135,6 +2100,7 @@ OnMove(PGUI_CONSOLE_DATA GuiData)
GuiData->GuiInfo.WindowOrigin.y = rcWnd.top;
}
+
/*
// HACK: This functionality is standard for general scrollbars. Don't add it by
hand.
@@ -2163,7 +2129,6 @@ GuiConsoleHandleScrollbarMenu(VOID)
}
*/
-
static LRESULT CALLBACK
ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
index 1b6120ec63..a3ebb0390c 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
@@ -96,8 +96,6 @@ InvalidateCell(PGUI_CONSOLE_DATA GuiData,
* GUI Terminal Initialization *
******************************************************************************/
-VOID
-SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
VOID
CreateSysMenu(HWND hWnd);
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
index 1d29d352c7..4ed6c1e8c1 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
+++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
@@ -14,6 +14,9 @@
#include "guisettings.h"
#include "conwnd.h"
+
+/* HELPER FUNCTIONS ***********************************************************/
+
FORCEINLINE
VOID
GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer,
@@ -50,11 +53,16 @@ SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT
SmallRect)
Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ViewOrigin.Y) * HeightUnit;
}
+
+/* FUNCTIONS ******************************************************************/
+
+/* guiterm.c */
+
VOID
GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData);
-VOID
-SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
+
+/* conwnd.c */
BOOL
InitFonts(PGUI_CONSOLE_DATA GuiData,
@@ -64,3 +72,53 @@ InitFonts(PGUI_CONSOLE_DATA GuiData,
ULONG FontWeight);
VOID
DeleteFonts(PGUI_CONSOLE_DATA GuiData);
+
+
+/* fullscreen.c */
+
+BOOL
+EnterFullScreen(PGUI_CONSOLE_DATA GuiData);
+VOID
+LeaveFullScreen(PGUI_CONSOLE_DATA GuiData);
+VOID
+SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
+VOID
+GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData);
+
+
+/* graphics.c */
+
+VOID
+GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData);
+VOID
+GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData);
+VOID
+GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData,
+ PRECT rcView,
+ PRECT rcFramebuffer);
+
+
+/* text.c */
+
+VOID
+PasteText(
+ IN PCONSRV_CONSOLE Console,
+ IN PWCHAR Buffer,
+ IN SIZE_T cchSize);
+
+VOID
+GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData);
+VOID
+GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData);
+VOID
+GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData,
+ PRECT rcView,
+ PRECT rcFramebuffer);
+
+/* EOF */