ReactOS 0.4.15-dev-8241-g63935f8
guiterm.h
Go to the documentation of this file.
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
18/* HELPER FUNCTIONS ***********************************************************/
19
21VOID
23 IN PGUI_CONSOLE_DATA GuiData,
24 OUT PUINT WidthUnit,
25 OUT PUINT HeightUnit)
26{
27 ASSERT(Buffer && GuiData && WidthUnit && HeightUnit);
28
30 {
31 *WidthUnit = GuiData->CharWidth ;
32 *HeightUnit = GuiData->CharHeight;
33 }
34 else /* if (GetType(Buffer) == GRAPHICS_BUFFER) */
35 {
36 *WidthUnit = 1;
37 *HeightUnit = 1;
38 }
39}
40
42VOID
44{
46 UINT WidthUnit, HeightUnit;
47
48 GetScreenBufferSizeUnits(Buffer, GuiData, &WidthUnit, &HeightUnit);
49
50 Rect->left = (SmallRect->Left - Buffer->ViewOrigin.X) * WidthUnit ;
51 Rect->top = (SmallRect->Top - Buffer->ViewOrigin.Y) * HeightUnit;
52 Rect->right = (SmallRect->Right + 1 - Buffer->ViewOrigin.X) * WidthUnit ;
53 Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ViewOrigin.Y) * HeightUnit;
54}
55
56
57/* FUNCTIONS ******************************************************************/
58
59/* guiterm.c */
60
61VOID
63
64
65/* conwnd.c */
66
67BOOL
71 PCWSTR FaceName,
72 _In_ ULONG FontWeight,
74 _In_ COORD FontSize,
75 _In_opt_ UINT CodePage,
76 _In_ BOOL UseDefaultFallback);
77
78VOID
80
81
82/* fullscreen.c */
83
84BOOL
86VOID
88VOID
89SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
90VOID
92
93
94/* graphics.c */
95
96VOID
98 PGUI_CONSOLE_DATA GuiData);
99VOID
101 PGUI_CONSOLE_DATA GuiData);
102VOID
104 PGUI_CONSOLE_DATA GuiData,
105 PRECT rcView,
106 PRECT rcFramebuffer);
107
108
109/* text.c */
110
111VOID
115 IN SIZE_T cchSize);
116
117VOID
119 PGUI_CONSOLE_DATA GuiData);
120VOID
122 PGUI_CONSOLE_DATA GuiData);
123VOID
125 PGUI_CONSOLE_DATA GuiData,
126 PRECT rcView,
127 PRECT rcFramebuffer);
128
129/* EOF */
CConsole Console
Definition: bufpool.h:45
#define LF_FACESIZE
Definition: dimm.idl:39
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:306
FORCEINLINE VOID SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect)
Definition: guiterm.h:43
FORCEINLINE VOID GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, IN PGUI_CONSOLE_DATA GuiData, OUT PUINT WidthUnit, OUT PUINT HeightUnit)
Definition: guiterm.h:22
VOID GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:21
VOID PasteText(IN PCONSRV_CONSOLE Console, IN PWCHAR Buffer, IN SIZE_T cchSize)
Definition: text.c:238
BOOL EnterFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:21
VOID DeleteFonts(PGUI_CONSOLE_DATA GuiData)
Definition: conwnd.c:481
VOID GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData)
Definition: guiterm.c:61
VOID LeaveFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:39
VOID GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: graphics.c:124
VOID SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen)
Definition: fullscreen.c:49
VOID GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:111
VOID GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:175
VOID GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:339
VOID GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: text.c:433
BOOL InitFonts(_Inout_ PGUI_CONSOLE_DATA GuiData, _In_reads_or_z_(LF_FACESIZE) PCWSTR FaceName, _In_ ULONG FontWeight, _In_ ULONG FontFamily, _In_ COORD FontSize, _In_opt_ UINT CodePage, _In_ BOOL UseDefaultFallback)
Definition: conwnd.c:521
#define ASSERT(a)
Definition: mode.c:44
#define _In_reads_or_z_(size)
Definition: ms_sal.h:325
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define TEXTMODE_BUFFER
Definition: pccons.c:21
Definition: bl.h:1338
PCONSOLE_SCREEN_BUFFER ActiveBuffer
Definition: conwnd.h:92
SHORT Top
Definition: tui.c:25
SHORT Right
Definition: tui.c:26
SHORT Left
Definition: tui.c:24
SHORT Bottom
Definition: tui.c:27
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define FORCEINLINE
Definition: wdftypes.h:67
#define GetType(This)
Definition: conio.h:54