Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

dispatch.h File Reference

Go to the source code of this file.

Defines

#define WWSB(fn)   fn

Functions

NTSTATUS TranslateOutputToAnsiUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size, IN OUT PCHAR_INFO OutputBufferR)
NTSTATUS FE_TranslateOutputToAnsiUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size, IN OUT PCHAR_INFO OutputBufferR)
NTSTATUS SB_TranslateOutputToAnsiUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)
NTSTATUS TranslateOutputToOemUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size, IN BOOL fRemoveDbcsMark)
NTSTATUS FE_TranslateOutputToOemUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size, IN BOOL fRemoveDbcsMark)
NTSTATUS SB_TranslateOutputToOemUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)
ULONG TranslateInputToUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords, IN OUT PINPUT_RECORD DBCSLeadByte)
ULONG FE_TranslateInputToUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords, IN OUT PINPUT_RECORD DBCSLeadByte)
ULONG SB_TranslateInputToUnicode (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords)
ULONG TranslateInputToOem (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords, IN ULONG UnicodeLength, OUT PINPUT_RECORD DbcsLeadInpRec)
ULONG FE_TranslateInputToOem (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords, IN ULONG UnicodeLength, OUT PINPUT_RECORD DbcsLeadInpRec)
ULONG SB_TranslateInputToOem (IN PCONSOLE_INFORMATION Console, IN OUT PINPUT_RECORD InputRecords, IN ULONG NumRecords)
VOID StreamWriteToScreenBuffer (IN PWCHAR String, IN SHORT StringLength, IN PSCREEN_INFORMATION ScreenInfo)
VOID FE_StreamWriteToScreenBuffer (IN PWCHAR String, IN SHORT StringLength, IN PSCREEN_INFORMATION ScreenInfo, IN PCHAR StringA)
VOID SB_StreamWriteToScreenBuffer (IN PWCHAR String, IN SHORT StringLength, IN PSCREEN_INFORMATION ScreenInfo)

Variables

NTSTATUS WWSB( DoSrvWriteConsole )(IN OUT PCSR_API_MSG m, IN OUT PCSR_REPLY_STATUS ReplyStatus, IN PCONSOLE_INFORMATION Console, IN PHANDLE_DATA HandleData)
NTSTATUS WWSB( WriteOutputString )(IN PSCREEN_INFORMATION ScreenInfo, IN PVOID Buffer, IN COORD WriteCoord, IN ULONG StringType, IN OUT PULONG NumRecords, OUT PULONG NumColumns OPTIONAL)
VOID WWSB( WriteRectToScreenBuffer )(PBYTE Source, COORD SourceSize, PSMALL_RECT SourceRect, PSCREEN_INFORMATION ScreenInfo, COORD TargetPoint, IN UINT Codepage)
VOID WWSB( WriteToScreen )(IN PSCREEN_INFORMATION ScreenInfo, PSMALL_RECT Region)
VOID WWSB( WriteRegionToScreen )(IN PSCREEN_INFORMATION ScreenInfo, IN PSMALL_RECT Region)
NTSTATUS WWSB( FillOutput )(IN PSCREEN_INFORMATION ScreenInfo, IN WORD Element, IN COORD WriteCoord, IN ULONG ElementType, IN OUT PULONG Length)
VOID WWSB( FillRectangle )(IN CHAR_INFO Fill, IN OUT PSCREEN_INFORMATION ScreenInfo, IN PSMALL_RECT TargetRect)
ULONG WWSB( DoWriteConsole )(IN OUT PCSR_API_MSG m, IN PCONSOLE_INFORMATION Console, IN PCSR_THREAD Thread)
NTSTATUS WWSB( WriteChars )(IN PSCREEN_INFORMATION ScreenInfo, IN PWCHAR lpBufferBackupLimit, IN PWCHAR lpBuffer, IN PWCHAR lpRealUnicodeString, IN OUT PDWORD NumBytes, OUT PLONG NumSpaces OPTIONAL, IN SHORT OriginalXPosition, IN DWORD dwFlags, OUT PSHORT ScrollY OPTIONAL)
NTSTATUS WWSB( AdjustCursorPosition )(IN PSCREEN_INFORMATION ScreenInfo, IN COORD CursorPosition, IN BOOL KeepCursorVisible, OUT PSHORT ScrollY OPTIONAL)
NTSTATUS WWSB( TranslateOutputToUnicode )(IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)
NTSTATUS WWSB( TranslateOutputToOem )(IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)


Define Documentation

#define WWSB fn   )     fn
 

Definition at line 26 of file dispatch.h.


Function Documentation

VOID FE_StreamWriteToScreenBuffer IN PWCHAR  String,
IN SHORT  StringLength,
IN PSCREEN_INFORMATION  ScreenInfo,
IN PCHAR  StringA
 

Definition at line 61 of file _output.h.

References ASSERT, _ATTR_PAIR::Attr, ATTR_PAIR, _ATTR_ROW::AttrPair, _ROW::AttrRow, _ATTR_ROW::Attrs, BisectWrite(), CHAR, _ROW::CharRow, _CHAR_ROW::Chars, CONSOLE_TEXTMODE_BUFFER, ConsoleHeapFree, DBGOUTPUT, INVALID_OLD_LENGTH, _CHAR_ROW::Left, _ATTR_PAIR::Length, _ATTR_ROW::Length, MergeAttrStrings(), NT_SUCCESS, _CHAR_ROW::OldLeft, _CHAR_ROW::OldRight, PROW, ResetTextFlags(), _CHAR_ROW::Right, SHORT, String, StringLength(), TEXT_VALID_HINT, and UNICODE_SPACE.

Referenced by WWSB_DoWriteConsole(), and WWSB_WriteChars().

00068 { 00069 SHORT RowIndex; 00070 PROW Row; 00071 PWCHAR Char; 00072 COORD TargetPoint; 00073 00074 DBGOUTPUT(("StreamWriteToScreenBuffer\n")); 00075 #ifdef WWSB_FE 00076 ASSERT(ScreenInfo->Flags & CONSOLE_TEXTMODE_BUFFER); 00077 #endif 00078 ScreenInfo->BufferInfo.TextInfo.Flags |= TEXT_VALID_HINT; 00079 TargetPoint = ScreenInfo->BufferInfo.TextInfo.CursorPosition; 00080 RowIndex = (ScreenInfo->BufferInfo.TextInfo.FirstRow+TargetPoint.Y) % ScreenInfo->ScreenBufferSize.Y; 00081 Row = &ScreenInfo->BufferInfo.TextInfo.Rows[RowIndex]; 00082 DBGOUTPUT(("RowIndex = %x, Row = %x, TargetPoint = (%x,%x)\n", 00083 RowIndex, Row, TargetPoint.X, TargetPoint.Y)); 00084 00085 // 00086 // copy chars 00087 // 00088 #ifdef WWSB_FE 00089 BisectWrite(StringLength,TargetPoint,ScreenInfo); 00090 if (TargetPoint.Y == ScreenInfo->ScreenBufferSize.Y-1 && 00091 TargetPoint.X+StringLength >= ScreenInfo->ScreenBufferSize.X && 00092 *(StringA+ScreenInfo->ScreenBufferSize.X-TargetPoint.X-1) & ATTR_LEADING_BYTE 00093 ) { 00094 *(String+ScreenInfo->ScreenBufferSize.X-TargetPoint.X-1) = UNICODE_SPACE; 00095 *(StringA+ScreenInfo->ScreenBufferSize.X-TargetPoint.X-1) = 0; 00096 if (StringLength > ScreenInfo->ScreenBufferSize.X-TargetPoint.X-1) { 00097 *(String+ScreenInfo->ScreenBufferSize.X-TargetPoint.X) = UNICODE_SPACE; 00098 *(StringA+ScreenInfo->ScreenBufferSize.X-TargetPoint.X) = 0; 00099 } 00100 } 00101 00102 RtlCopyMemory(&Row->CharRow.KAttrs[TargetPoint.X],StringA,StringLength*sizeof(CHAR)); 00103 #endif 00104 00105 RtlCopyMemory(&Row->CharRow.Chars[TargetPoint.X],String,StringLength*sizeof(WCHAR)); 00106 00107 // recalculate first and last non-space char 00108 00109 Row->CharRow.OldLeft = Row->CharRow.Left; 00110 if (TargetPoint.X < Row->CharRow.Left) { 00111 PWCHAR LastChar = &Row->CharRow.Chars[ScreenInfo->ScreenBufferSize.X]; 00112 00113 for (Char=&Row->CharRow.Chars[TargetPoint.X];Char < LastChar && *Char==(WCHAR)' ';Char++) 00114 ; 00115 Row->CharRow.Left = (SHORT)(Char-Row->CharRow.Chars); 00116 } 00117 00118 Row->CharRow.OldRight = Row->CharRow.Right; 00119 if ((TargetPoint.X+StringLength) >= Row->CharRow.Right) { 00120 PWCHAR FirstChar = Row->CharRow.Chars; 00121 00122 for (Char=&Row->CharRow.Chars[TargetPoint.X+StringLength-1];*Char==(WCHAR)' ' && Char >= FirstChar;Char--) 00123 ; 00124 Row->CharRow.Right = (SHORT)(Char+1-FirstChar); 00125 } 00126 00127 // 00128 // see if attr string is different. if so, allocate a new 00129 // attr buffer and merge the two strings. 00130 // 00131 00132 if (Row->AttrRow.Length != 1 || 00133 Row->AttrRow.Attrs->Attr != ScreenInfo->Attributes) { 00134 PATTR_PAIR NewAttrs; 00135 WORD NewAttrsLength; 00136 ATTR_PAIR Attrs; 00137 00138 Attrs.Length = StringLength; 00139 Attrs.Attr = ScreenInfo->Attributes; 00140 if (!NT_SUCCESS(MergeAttrStrings(Row->AttrRow.Attrs, 00141 Row->AttrRow.Length, 00142 &Attrs, 00143 1, 00144 &NewAttrs, 00145 &NewAttrsLength, 00146 TargetPoint.X, 00147 (SHORT)(TargetPoint.X+StringLength-1), 00148 Row, 00149 ScreenInfo 00150 ))) { 00151 return; 00152 } 00153 if (Row->AttrRow.Length > 1) { 00154 ConsoleHeapFree(Row->AttrRow.Attrs); 00155 } 00156 else { 00157 ASSERT(Row->AttrRow.Attrs == &Row->AttrRow.AttrPair); 00158 } 00159 Row->AttrRow.Attrs = NewAttrs; 00160 Row->AttrRow.Length = NewAttrsLength; 00161 Row->CharRow.OldLeft = INVALID_OLD_LENGTH; 00162 Row->CharRow.OldRight = INVALID_OLD_LENGTH; 00163 } 00164 ResetTextFlags(ScreenInfo,TargetPoint.Y,TargetPoint.Y); 00165 }

ULONG FE_TranslateInputToOem IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords,
IN ULONG  UnicodeLength,
OUT PINPUT_RECORD  DbcsLeadInpRec
 

Referenced by DirectReadWaitRoutine().

ULONG FE_TranslateInputToUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords,
IN OUT PINPUT_RECORD  DBCSLeadByte
 

NTSTATUS FE_TranslateOutputToAnsiUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size,
IN OUT PCHAR_INFO  OutputBufferR
 

Definition at line 1174 of file directio.c.

References FE_TranslateOutputToAnsiUnicodeInternal(), Size, and TRUE.

Referenced by SrvWriteConsoleOutput().

01181 { 01182 return FE_TranslateOutputToAnsiUnicodeInternal(Console, 01183 OutputBuffer, 01184 Size, 01185 OutputBufferR, 01186 TRUE 01187 ); 01188 }

NTSTATUS FE_TranslateOutputToOemUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size,
IN BOOL  fRemoveDbcsMark
 

VOID SB_StreamWriteToScreenBuffer IN PWCHAR  String,
IN SHORT  StringLength,
IN PSCREEN_INFORMATION  ScreenInfo
 

Referenced by WWSB_DoWriteConsole(), and WWSB_WriteChars().

ULONG SB_TranslateInputToOem IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords
 

ULONG SB_TranslateInputToUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords
 

NTSTATUS SB_TranslateOutputToAnsiUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size
 

Definition at line 1093 of file directio.c.

References DBGCHARS, RealUnicodeToFalseUnicode(), SHORT, and Size.

Referenced by SrvWriteConsoleOutput().

01099 { 01100 SHORT i,j; 01101 DBGCHARS(("TranslateOutputToAnsiUnicode\n")); 01102 01103 j = Size.X * Size.Y; 01104 01105 for (i=0;i<j;i++,OutputBuffer++) { 01106 RealUnicodeToFalseUnicode(&OutputBuffer->Char.UnicodeChar, 01107 1, 01108 Console->OutputCP 01109 ); 01110 } 01111 return STATUS_SUCCESS; 01112 }

NTSTATUS SB_TranslateOutputToOemUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size
 

Definition at line 924 of file directio.c.

References DBGCHARS, FalseUnicodeToRealUnicode(), SHORT, and Size.

00930 { 00931 SHORT i,j; 00932 DBGCHARS(("SB_TranslateOutputToOemUnicode\n")); 00933 00934 j = Size.X * Size.Y; 00935 00936 for (i=0;i<j;i++,OutputBuffer++) { 00937 FalseUnicodeToRealUnicode(&OutputBuffer->Char.UnicodeChar, 00938 1, 00939 Console->OutputCP 00940 ); 00941 } 00942 return STATUS_SUCCESS; 00943 }

VOID StreamWriteToScreenBuffer IN PWCHAR  String,
IN SHORT  StringLength,
IN PSCREEN_INFORMATION  ScreenInfo
 

ULONG TranslateInputToOem IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords,
IN ULONG  UnicodeLength,
OUT PINPUT_RECORD  DbcsLeadInpRec
 

Referenced by DirectReadWaitRoutine(), and SrvGetConsoleInput().

ULONG TranslateInputToUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PINPUT_RECORD  InputRecords,
IN ULONG  NumRecords,
IN OUT PINPUT_RECORD  DBCSLeadByte
 

Referenced by SrvWriteConsoleInput().

NTSTATUS TranslateOutputToAnsiUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size,
IN OUT PCHAR_INFO  OutputBufferR
 

Referenced by EndPopup(), and SrvWriteConsoleOutput().

NTSTATUS TranslateOutputToOemUnicode IN PCONSOLE_INFORMATION  Console,
IN OUT PCHAR_INFO  OutputBuffer,
IN COORD  Size,
IN BOOL  fRemoveDbcsMark
 

Referenced by EndPopup(), and SrvReadConsoleOutput().


Variable Documentation

NTSTATUS WWSB( AdjustCursorPosition)(IN PSCREEN_INFORMATION ScreenInfo, IN COORD CursorPosition, IN BOOL KeepCursorVisible, OUT PSHORT ScrollY OPTIONAL)
 

Definition at line 115 of file dispatch.h.

Referenced by ProcessCommandLine(), ProcessCookedReadInput(), RedrawCommandLine(), SrvSetConsoleCursorPosition(), and UnregisterVDM().

NTSTATUS WWSB( DoSrvWriteConsole)(IN OUT PCSR_API_MSG m, IN OUT PCSR_REPLY_STATUS ReplyStatus, IN PCONSOLE_INFORMATION Console, IN PHANDLE_DATA HandleData)
 

Definition at line 30 of file dispatch.h.

Referenced by SrvWriteConsole().

ULONG WWSB( DoWriteConsole)(IN OUT PCSR_API_MSG m, IN PCONSOLE_INFORMATION Console, IN PCSR_THREAD Thread)
 

Definition at line 93 of file dispatch.h.

Referenced by WriteConsoleWaitRoutine().

NTSTATUS WWSB( FillOutput)(IN PSCREEN_INFORMATION ScreenInfo, IN WORD Element, IN COORD WriteCoord, IN ULONG ElementType, IN OUT PULONG Length)
 

Definition at line 75 of file dispatch.h.

Referenced by DeleteCommandLine(), DrawCommandListBorder(), DrawCommandListPopup(), DrawPromptPopup(), SrvFillConsoleOutput(), and UpdateHighlight().

VOID WWSB( FillRectangle)(IN CHAR_INFO Fill, IN OUT PSCREEN_INFORMATION ScreenInfo, IN PSMALL_RECT TargetRect)
 

Definition at line 85 of file dispatch.h.

Referenced by ScrollRegion().

NTSTATUS WWSB( TranslateOutputToOem)(IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)
 

Definition at line 175 of file dispatch.h.

NTSTATUS WWSB( TranslateOutputToUnicode)(IN PCONSOLE_INFORMATION Console, IN OUT PCHAR_INFO OutputBuffer, IN COORD Size)
 

Definition at line 146 of file dispatch.h.

Referenced by SrvWriteConsoleOutput().

NTSTATUS WWSB( WriteChars)(IN PSCREEN_INFORMATION ScreenInfo, IN PWCHAR lpBufferBackupLimit, IN PWCHAR lpBuffer, IN PWCHAR lpRealUnicodeString, IN OUT PDWORD NumBytes, OUT PLONG NumSpaces OPTIONAL, IN SHORT OriginalXPosition, IN DWORD dwFlags, OUT PSHORT ScrollY OPTIONAL)
 

Definition at line 101 of file dispatch.h.

Referenced by WriteCharsFromInput().

NTSTATUS WWSB( WriteOutputString)(IN PSCREEN_INFORMATION ScreenInfo, IN PVOID Buffer, IN COORD WriteCoord, IN ULONG StringType, IN OUT PULONG NumRecords,OUT PULONG NumColumns OPTIONAL)
 

Definition at line 39 of file dispatch.h.

Referenced by DrawCommandListPopup(), DrawPromptPopup(), and SrvWriteConsoleOutputString().

VOID WWSB( WriteRectToScreenBuffer)(PBYTE Source, COORD SourceSize, PSMALL_RECT SourceRect, PSCREEN_INFORMATION ScreenInfo, COORD TargetPoint, IN UINT Codepage)
 

Definition at line 50 of file dispatch.h.

Referenced by CopyRectangle(), ScrollRegion(), SrvInvalidateBitMapRect(), and WriteScreenBuffer().

VOID WWSB( WriteRegionToScreen)(IN PSCREEN_INFORMATION ScreenInfo, IN PSMALL_RECT Region)
 

Definition at line 68 of file dispatch.h.

Referenced by DisplayModeTransition(), SetWindowOrigin(), and StreamScrollRegion().

VOID WWSB( WriteToScreen)(IN PSCREEN_INFORMATION ScreenInfo, PSMALL_RECT Region)
 

Definition at line 61 of file dispatch.h.

Referenced by ConsoleWindowProc(), ConvertToFullScreen(), ConvertToWindowed(), EndPopup(), InternalSetWindowSize(), ScrollRegion(), ScrollScreen(), SetActiveScreenBuffer(), SetScreenBufferFont(), SetScreenColors(), SetWindowOrigin(), SrvInvalidateBitMapRect(), SrvSetConsoleWindowInfo(), SrvWriteConsoleOutput(), StreamScrollRegion(), and UpdateComplexRegion().


Generated on Sat May 15 19:43:27 2004 for test by doxygen 1.3.7