ReactOS  0.4.13-dev-259-g5ca9c9c
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
69  LPWSTR FaceName, // Points to a WCHAR array of LF_FACESIZE elements.
71  COORD FontSize,
72  ULONG FontWeight);
73 VOID
75 
76 
77 /* fullscreen.c */
78 
79 BOOL
81 VOID
83 VOID
84 SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
85 VOID
87 
88 
89 /* graphics.c */
90 
91 VOID
93  PGUI_CONSOLE_DATA GuiData);
94 VOID
96  PGUI_CONSOLE_DATA GuiData);
97 VOID
99  PGUI_CONSOLE_DATA GuiData,
100  PRECT rcView,
101  PRECT rcFramebuffer);
102 
103 
104 /* text.c */
105 
106 VOID
107 PasteText(
109  IN PWCHAR Buffer,
110  IN SIZE_T cchSize);
111 
112 VOID
114  PGUI_CONSOLE_DATA GuiData);
115 VOID
117  PGUI_CONSOLE_DATA GuiData);
118 VOID
120  PGUI_CONSOLE_DATA GuiData,
121  PRECT rcView,
122  PRECT rcFramebuffer);
123 
124 /* EOF */
#define IN
Definition: typedefs.h:38
FORCEINLINE VOID SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect)
Definition: guiterm.h:43
VOID SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen)
Definition: fullscreen.c:49
VOID GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:21
VOID DeleteFonts(PGUI_CONSOLE_DATA GuiData)
Definition: conwnd.c:470
uint16_t * PWCHAR
Definition: typedefs.h:54
#define TEXTMODE_BUFFER
Definition: pccons.c:21
#define PCONSRV_CONSOLE
Definition: conio.h:27
VOID GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:175
SHORT Right
Definition: wincon.h:178
SHORT Left
Definition: wincon.h:176
unsigned int BOOL
Definition: ntddk_ex.h:94
PCONSOLE_SCREEN_BUFFER ActiveBuffer
Definition: conwnd.h:91
#define FORCEINLINE
Definition: ntbasedef.h:221
Definition: bufpool.h:45
VOID GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:330
VOID GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: graphics.c:124
VOID PasteText(IN PCONSRV_CONSOLE Console, IN PWCHAR Buffer, IN SIZE_T cchSize)
Definition: text.c:229
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
SHORT Bottom
Definition: wincon.h:179
INT GetType(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
Definition: gettype.c:129
VOID GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:111
Definition: bl.h:1338
VOID LeaveFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:39
SHORT Top
Definition: wincon.h:177
BOOL InitFonts(PGUI_CONSOLE_DATA GuiData, LPWSTR FaceName, ULONG FontFamily, COORD FontSize, ULONG FontWeight)
Definition: conwnd.c:510
ULONG_PTR SIZE_T
Definition: typedefs.h:78
FORCEINLINE VOID GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, IN PGUI_CONSOLE_DATA GuiData, OUT PUINT WidthUnit, OUT PUINT HeightUnit)
Definition: guiterm.h:22
VOID GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: text.c:355
BOOL EnterFullScreen(PGUI_CONSOLE_DATA GuiData)
Definition: fullscreen.c:21
unsigned int UINT
Definition: ndis.h:50
VOID GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData)
Definition: guiterm.c:61
CConsole Console
VOID GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: text.c:297
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned int * PUINT
Definition: ndis.h:50