1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS Console Server DLL 4 * FILE: win32ss/user/winsrv/consrv/frontends/gui/guiterm.h 5 * PURPOSE: GUI Terminal Front-End 6 * PROGRAMMERS: G� van Geldorp 7 * Johannes Anderwald 8 * Jeffrey Morlan 9 * Hermes Belusca-Maito (hermes.belusca@sfr.fr) 10 */ 11 12 #pragma once 13 14 #include "guisettings.h" 15 #include "conwnd.h" 16 17 extern inline 18 VOID 19 GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, 20 IN PGUI_CONSOLE_DATA GuiData, 21 OUT PUINT WidthUnit, 22 OUT PUINT HeightUnit) 23 { 24 ASSERT(Buffer && GuiData && WidthUnit && HeightUnit); 25 26 if (GetType(Buffer) == TEXTMODE_BUFFER) 27 { 28 *WidthUnit = GuiData->CharWidth ; 29 *HeightUnit = GuiData->CharHeight; 30 } 31 else /* if (GetType(Buffer) == GRAPHICS_BUFFER) */ 32 { 33 *WidthUnit = 1; 34 *HeightUnit = 1; 35 } 36 } 37 38 extern inline 39 VOID 40 SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect) 41 { 42 PCONSOLE_SCREEN_BUFFER Buffer = GuiData->ActiveBuffer; 43 UINT WidthUnit, HeightUnit; 44 45 GetScreenBufferSizeUnits(Buffer, GuiData, &WidthUnit, &HeightUnit); 46 47 Rect->left = (SmallRect->Left - Buffer->ViewOrigin.X) * WidthUnit ; 48 Rect->top = (SmallRect->Top - Buffer->ViewOrigin.Y) * HeightUnit; 49 Rect->right = (SmallRect->Right + 1 - Buffer->ViewOrigin.X) * WidthUnit ; 50 Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ViewOrigin.Y) * HeightUnit; 51 } 52 53 VOID 54 GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData); 55 56 VOID 57 SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen); 58 59 BOOL 60 InitFonts(PGUI_CONSOLE_DATA GuiData, 61 LPWSTR FaceName, // Points to a WCHAR array of LF_FACESIZE elements. 62 ULONG FontFamily, 63 COORD FontSize, 64 ULONG FontWeight); 65 VOID 66 DeleteFonts(PGUI_CONSOLE_DATA GuiData); 67