1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS Console Server DLL
4  * FILE:            win32ss/user/winsrv/consrv/include/term.h
5  * PURPOSE:         Internal Frontend Interface
6  * PROGRAMMERS:     Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7  */
8 
9 #pragma once
10 
11 /* Macros used to call functions in the TERMINAL_VTBL virtual table */
12 
13 #define TermReadStream(Console, /**/ Unicode, /**/ Buffer, ReadControl, Parameter, NumCharsToRead, NumCharsRead) \
14     (Console)->TermIFace.Vtbl->ReadStream(&(Console)->TermIFace, /**/ (Unicode), /**/ \
15                                            (Buffer), (ReadControl), (Parameter), (NumCharsToRead), (NumCharsRead))
16 
17 #define TermWriteStream(Console, ScreenBuffer, Buffer, Length, Attrib) \
18     (Console)->TermIFace.Vtbl->WriteStream(&(Console)->TermIFace, (ScreenBuffer), (Buffer), \
19                                            (Length), (Attrib))
20 
21 
22 #define TermDrawRegion(Console, Region) \
23     (Console)->TermIFace.Vtbl->DrawRegion(&(Console)->TermIFace, (Region))
24 #define TermSetCursorInfo(Console, ScreenBuffer) \
25     (Console)->TermIFace.Vtbl->SetCursorInfo(&(Console)->TermIFace, (ScreenBuffer))
26 #define TermSetScreenInfo(Console, ScreenBuffer, OldCursorX, OldCursorY) \
27     (Console)->TermIFace.Vtbl->SetScreenInfo(&(Console)->TermIFace, (ScreenBuffer), (OldCursorX), (OldCursorY))
28 #define TermResizeTerminal(Console) \
29     (Console)->TermIFace.Vtbl->ResizeTerminal(&(Console)->TermIFace)
30 #define TermSetActiveScreenBuffer(Console) \
31     (Console)->TermIFace.Vtbl->SetActiveScreenBuffer(&(Console)->TermIFace)
32 #define TermReleaseScreenBuffer(Console, ScreenBuffer) \
33     (Console)->TermIFace.Vtbl->ReleaseScreenBuffer(&(Console)->TermIFace, (ScreenBuffer))
34 #define TermGetLargestConsoleWindowSize(Console, pSize) \
35     (Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace, (pSize))
36 #define TermSetPalette(Console, PaletteHandle, PaletteUsage) \
37     (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace, (PaletteHandle), (PaletteUsage))
38 #define TermShowMouseCursor(Console, Show) \
39     (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace, (Show))
40 
41 
42 /* Macros used to call functions in the FRONTEND_VTBL virtual table */
43 
44 #define TermRefreshInternalInfo(Console) \
45     (Console)->FrontEndIFace.Vtbl->RefreshInternalInfo(&(Console)->FrontEndIFace)
46 #define TermChangeTitle(Console) \
47     (Console)->FrontEndIFace.Vtbl->ChangeTitle(&(Console)->FrontEndIFace)
48 #define TermChangeIcon(Console, IconHandle) \
49     (Console)->FrontEndIFace.Vtbl->ChangeIcon(&(Console)->FrontEndIFace, (IconHandle))
50 #define TermGetThreadConsoleDesktop(Console) \
51     (Console)->FrontEndIFace.Vtbl->GetThreadConsoleDesktop(&(Console)->FrontEndIFace)
52 #define TermGetConsoleWindowHandle(Console) \
53     (Console)->FrontEndIFace.Vtbl->GetConsoleWindowHandle(&(Console)->FrontEndIFace)
54 #define TermGetSelectionInfo(Console, pSelectionInfo) \
55     (Console)->FrontEndIFace.Vtbl->GetSelectionInfo(&(Console)->FrontEndIFace, (pSelectionInfo))
56 #define TermGetDisplayMode(Console) \
57     (Console)->FrontEndIFace.Vtbl->GetDisplayMode(&(Console)->FrontEndIFace)
58 #define TermSetDisplayMode(Console, NewMode) \
59     (Console)->FrontEndIFace.Vtbl->SetDisplayMode(&(Console)->FrontEndIFace, (NewMode))
60 #define TermSetMouseCursor(Console, CursorHandle) \
61     (Console)->FrontEndIFace.Vtbl->SetMouseCursor(&(Console)->FrontEndIFace, (CursorHandle))
62 #define TermMenuControl(Console, CmdIdLow, CmdIdHigh) \
63     (Console)->FrontEndIFace.Vtbl->MenuControl(&(Console)->FrontEndIFace, (CmdIdLow), (CmdIdHigh))
64 #define TermSetMenuClose(Console, Enable) \
65     (Console)->FrontEndIFace.Vtbl->SetMenuClose(&(Console)->FrontEndIFace, (Enable))
66 
67 /* EOF */
68