[CONSRV] Minor code re-organization.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 8 Aug 2018 18:45:39 +0000 (20:45 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 8 Aug 2018 18:46:41 +0000 (20:46 +0200)
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
win32ss/user/winsrv/consrv/frontends/gui/guiterm.h

index 860244f..6071a5d 100644 (file)
@@ -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)
 {
index 1b6120e..a3ebb03 100644 (file)
@@ -96,8 +96,6 @@ InvalidateCell(PGUI_CONSOLE_DATA GuiData,
  *                        GUI Terminal Initialization                         *
  ******************************************************************************/
 
-VOID
-SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
 VOID
 CreateSysMenu(HWND hWnd);
 
index 1d29d35..4ed6c1e 100644 (file)
@@ -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 */