ReactOS  0.4.15-dev-4570-g4f8bbd1
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 
21 VOID
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 
42 VOID
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 
61 VOID
63 
64 
65 /* conwnd.c */
66 
67 BOOL
68 InitFonts(
69  _Inout_ PGUI_CONSOLE_DATA GuiData,
71  PCWSTR FaceName,
72  _In_ ULONG FontWeight,
74  _In_ COORD FontSize,
75  _In_opt_ UINT CodePage,
76  _In_ BOOL UseDefaultFallback);
77 
78 VOID
80 
81 
82 /* fullscreen.c */
83 
84 BOOL
86 VOID
88 VOID
89 SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
90 VOID
92 
93 
94 /* graphics.c */
95 
96 VOID
98  PGUI_CONSOLE_DATA GuiData);
99 VOID
101  PGUI_CONSOLE_DATA GuiData);
102 VOID
104  PGUI_CONSOLE_DATA GuiData,
105  PRECT rcView,
106  PRECT rcFramebuffer);
107 
108 
109 /* text.c */
110 
111 VOID
112 PasteText(
114  IN PWCHAR Buffer,
115  IN SIZE_T cchSize);
116 
117 VOID
119  PGUI_CONSOLE_DATA GuiData);
120 VOID
122  PGUI_CONSOLE_DATA GuiData);
123 VOID
125  PGUI_CONSOLE_DATA GuiData,
126  PRECT rcView,
127  PRECT rcFramebuffer);
128 
129 /* EOF */
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
VOID GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: graphics.c:124
#define LF_FACESIZE
Definition: dimm.idl:39
#define _In_opt_
Definition: ms_sal.h:309
#define _Inout_
Definition: ms_sal.h:378
VOID DeleteFonts(PGUI_CONSOLE_DATA GuiData)
Definition: conwnd.c:481
BOOL EnterFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:21
VOID LeaveFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:39
VOID GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:339
uint16_t * PWCHAR
Definition: typedefs.h:56
SHORT Right
Definition: wincon.h:193
SHORT Left
Definition: wincon.h:191
VOID PasteText(IN PCONSRV_CONSOLE Console, IN PWCHAR Buffer, IN SIZE_T cchSize)
Definition: text.c:238
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
unsigned int BOOL
Definition: ntddk_ex.h:94
PCONSOLE_SCREEN_BUFFER ActiveBuffer
Definition: conwnd.h:91
#define _In_
Definition: ms_sal.h:308
Definition: bufpool.h:45
VOID GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: text.c:433
#define ASSERT(a)
Definition: mode.c:44
VOID GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:111
VOID SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen)
Definition: fullscreen.c:49
SHORT Bottom
Definition: wincon.h:194
VOID GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:21
Definition: bl.h:1337
SHORT Top
Definition: wincon.h:192
#define GetType(This)
Definition: conio.h:54
ULONG_PTR SIZE_T
Definition: typedefs.h:80
FORCEINLINE VOID GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, IN PGUI_CONSOLE_DATA GuiData, OUT PUINT WidthUnit, OUT PUINT HeightUnit)
Definition: guiterm.h:22
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned int UINT
Definition: ndis.h:50
VOID GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:175
CConsole Console
#define _In_reads_or_z_(size)
Definition: ms_sal.h:325
#define OUT
Definition: typedefs.h:40
VOID GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData)
Definition: guiterm.c:61
unsigned int ULONG
Definition: retypes.h:1
VOID GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:306
unsigned int * PUINT
Definition: ndis.h:50
FORCEINLINE VOID SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect)
Definition: guiterm.h:43