00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #define UNICODE_DBCS_PADDING 0xffff
00019
00020 #define DEFAULT_FONTSIZE 256
00021 #define DEFAULT_EUDCSIZE 1
00022
00023 #define VDM_EUDC_FONT_SIZE_X 16
00024 #define VDM_EUDC_FONT_SIZE_Y 16
00025
00026 #define USACP 1252
00027 #define KOREAN_CP 949
00028 #define JAPAN_CP 932
00029
00030
#if defined(FE_SB)
00031
#define MIN_SCRBUF_WIDTH 12 // for suport display IME status
00032
#define MIN_SCRBUF_HEIGHT 2 // for suport display IME status
00033
#define MIN_WINDOW_HEIGHT 1
00034
#endif
00035
00036
00037
00038
#if defined(i386)
00039
extern ULONG gdwMachineId;
00040
#endif
00041
00042
00043 extern ULONG
DefaultFontIndex;
00044 extern COORD
DefaultFontSize;
00045 extern BYTE DefaultFontFamily;
00046
00047
00048 typedef struct _MODE_FONT_PAIR {
00049 DWORD Mode;
00050 #define FS_MODE_TEXT 0x0001
00051 #define FS_MODE_GRAPHICS 0x0002
00052 #define FS_MODE_FIND 0x8000
00053 #define FS_TEXT (FS_MODE_FIND+FS_MODE_TEXT)
00054 #define FS_GRAPHICS (FS_MODE_FIND+FS_MODE_GRAPHICS)
00055 COORD
ScreenSize;
00056 COORD
Resolution;
00057 COORD
FontSize;
00058 }
MODE_FONT_PAIR, *
PMODE_FONT_PAIR;
00059
00060 typedef struct _FS_CODEPAGE {
00061 SINGLE_LIST_ENTRY
List;
00062 UINT CodePage;
00063 }
FS_CODEPAGE, *
PFS_CODEPAGE;
00064
00065 extern PUSHORT RegInitialPalette;
00066 extern PUCHAR
RegColorBuffer;
00067 extern PUCHAR
RegColorBufferNoTranslate;
00068 extern DWORD NUMBER_OF_MODE_FONT_PAIRS;
00069 extern PMODE_FONT_PAIR RegModeFontPairs;
00070 extern SINGLE_LIST_ENTRY
gRegFullScreenCodePage;
00071
00072
00073
00074 typedef struct tagSTRINGBITMAP
00075 {
00076 UINT uiWidth;
00077 UINT uiHeight;
00078 BYTE ajBits[1];
00079 }
STRINGBITMAP, *
LPSTRINGBITMAP;
00080
00081
UINT
00082
GetStringBitmapW(
00083 HDC hdc,
00084 LPWSTR pwc,
00085 UINT cwc,
00086 UINT cbData,
00087 BYTE *pSB
00088 );
00089
00090
00091
00092
00093
00094
00095
00096
#if defined(FE_IME)
00097
00098
#if defined(i386)
00099
NTSTATUS
00100 ImeWmFullScreen(
00101 IN BOOL Foreground,
00102 IN
PCONSOLE_INFORMATION Console,
00103 IN
PSCREEN_INFORMATION ScreenInfo
00104 );
00105
#endif // i386
00106
00107
00108
NTSTATUS
00109 GetImeKeyState(
00110 IN
PCONSOLE_INFORMATION Console,
00111 IN PDWORD pdwConversion
00112 );
00113
00114
00115
NTSTATUS
00116 SetImeKeyState(
00117 IN
PCONSOLE_INFORMATION Console,
00118 IN DWORD fdwConversion
00119 );
00120
00121
NTSTATUS
00122 SetImeCodePage(
00123 IN
PCONSOLE_INFORMATION Console
00124 );
00125
00126
NTSTATUS
00127 SetImeOutputCodePage(
00128 IN
PCONSOLE_INFORMATION Console,
00129 IN
PSCREEN_INFORMATION ScreenInfo,
00130 IN DWORD CodePage
00131 );
00132
#endif // FE_IME
00133
00134
VOID
00135
SetLineChar(
00136 IN
PSCREEN_INFORMATION ScreenInfo
00137 );
00138
00139
BOOL
00140
CheckBisectStringA(
00141 IN DWORD CodePage,
00142 IN PCHAR Buffer,
00143 IN DWORD NumBytes,
00144 IN LPCPINFO lpCPInfo
00145 );
00146
00147
VOID
00148
BisectWrite(
00149 IN SHORT StringLength,
00150 IN COORD TargetPoint,
00151 IN
PSCREEN_INFORMATION ScreenInfo
00152 );
00153
00154
VOID
00155
BisectClipbrd(
00156 IN SHORT StringLength,
00157 IN COORD TargetPoint,
00158 IN
PSCREEN_INFORMATION ScreenInfo,
00159 OUT PSMALL_RECT SmallRect
00160 );
00161
00162
VOID
00163
BisectWriteAttr(
00164 IN SHORT StringLength,
00165 IN COORD TargetPoint,
00166 IN
PSCREEN_INFORMATION ScreenInfo
00167 );
00168
00169
DWORD
00170
RemoveDbcsMark(
00171 IN PWCHAR Dst,
00172 IN PWCHAR Src,
00173 IN DWORD NumBytes,
00174 IN PCHAR SrcA,
00175 IN BOOL OS2OemFormat
00176 );
00177
00178
DWORD
00179
RemoveDbcsMarkCell(
00180 IN PCHAR_INFO Dst,
00181 IN PCHAR_INFO Src,
00182 IN DWORD NumBytes
00183 );
00184
00185
DWORD
00186
RemoveDbcsMarkAll(
00187 IN
PSCREEN_INFORMATION ScreenInfo,
00188 IN
PROW Row,
00189 IN PSHORT LeftChar,
00190 IN PRECT TextRect,
00191 IN
int *TextLeft,
00192 IN PWCHAR Buffer,
00193 IN SHORT NumberOfChars
00194 );
00195
00196
BOOL
00197
IsDBCSLeadByteConsole(
00198 IN BYTE AsciiChar,
00199 IN LPCPINFO lpCPInfo
00200 );
00201
00202
NTSTATUS
00203
AdjustFont(
00204 IN
PCONSOLE_INFORMATION Console,
00205 IN UINT CodePage
00206 );
00207
00208
NTSTATUS
00209
ConvertToCodePage(
00210 IN
PCONSOLE_INFORMATION Console,
00211 IN UINT PrevCodePage
00212 );
00213
00214
NTSTATUS
00215
ConvertOutputOemToNonOemUnicode(
00216 IN OUT LPWSTR Source,
00217 IN OUT PBYTE KAttrRows,
00218 IN
int SourceLength,
00219 IN UINT Codepage
00220 );
00221
00222
00223
VOID
00224
TextOutEverything(
00225 IN
PCONSOLE_INFORMATION Console,
00226 IN
PSCREEN_INFORMATION ScreenInfo,
00227 IN SHORT LeftWindowPos,
00228 IN OUT PSHORT RightWindowPos,
00229 IN OUT PSHORT CountOfAttr,
00230 IN SHORT CountOfAttrOriginal,
00231 IN OUT PBOOL DoubleColorDBCS,
00232 IN BOOL LocalEUDCFlag,
00233 IN
PROW Row,
00234 IN
PATTR_PAIR Attr,
00235 IN SHORT LeftTextPos,
00236 IN SHORT RightTextPos,
00237 IN
int WindowRectLeft,
00238 IN RECT WindowRect,
00239 IN SHORT NumberOfChars
00240 );
00241
00242
VOID
00243
TextOutCommonLVB(
00244 IN
PCONSOLE_INFORMATION Console,
00245 IN WORD Attributes,
00246 IN RECT CommonLVBRect
00247 );
00248
00249
NTSTATUS
00250
MakeAltRasterFont(
00251 UINT CodePage,
00252 COORD DefaultFontSize,
00253 COORD *AltFontSize,
00254 BYTE *AltFontFamily,
00255 ULONG *AltFontIndex,
00256 LPWSTR AltFaceName
00257 );
00258
00259
NTSTATUS
00260
InitializeDbcsMisc(
00261 VOID
00262 );
00263
00264
#if defined(i386)
00265
NTSTATUS
00266 RealUnicodeToNEC_OS2_Unicode(
00267 IN OUT LPWSTR Source,
00268 IN
int SourceLength
00269 );
00270
00271
BOOL
00272 InitializeNEC_OS2_CP(
00273 VOID
00274 );
00275
#endif
00276
00277
BYTE
00278
CodePageToCharSet(
00279 UINT CodePage
00280 );
00281
00282
BOOL
00283
IsAvailableFarEastCodePage(
00284 UINT CodePage
00285 );
00286
00287 LPTTFONTLIST
00288
SearchTTFont(
00289 LPWSTR pwszFace,
00290 BOOL fCodePage,
00291 UINT CodePage
00292 );
00293
00294
BOOL
00295
IsAvailableTTFont(
00296 LPWSTR pwszFace
00297 );
00298
00299
BOOL
00300
IsAvailableTTFontCP(
00301 LPWSTR pwszFace,
00302 UINT CodePage
00303 );
00304
00305 LPWSTR
00306
GetAltFaceName(
00307 LPWSTR pwszFace
00308 );
00309
00310
BOOL
00311
IsAvailableFsCodePage(
00312 UINT CodePage
00313 );
00314
00315
#if defined(FE_IME)
00316
00317
VOID
00318 ProcessCreateConsoleIME(
00319 IN LPMSG lpMsg,
00320 DWORD dwConsoleThreadId
00321 );
00322
00323
NTSTATUS
00324 InitConsoleIMEStuff(
00325 HDESK hDesktop,
00326 DWORD dwConsoleThreadId,
00327
PCONSOLE_INFORMATION Console
00328 );
00329
00330
NTSTATUS
00331 WaitConsoleIMEStuff(
00332 HDESK hDesktop,
00333 HANDLE hThread
00334 );
00335
00336
NTSTATUS
00337 ConSrvRegisterConsoleIME(
00338 PCSR_PROCESS Process,
00339 HDESK hDesktop,
00340 HWINSTA hWinSta,
00341 HWND hWndConsoleIME,
00342 DWORD dwConsoleIMEThreadId,
00343 DWORD dwAction,
00344 DWORD *dwConsoleThreadId
00345 );
00346
00347
VOID
00348 RemoveConsoleIME(
00349 PCSR_PROCESS Process,
00350 DWORD dwConsoleIMEThreadId
00351 );
00352
00353
NTSTATUS
00354 ConsoleImeMessagePumpWorker(
00355
PCONSOLE_INFORMATION Console,
00356 UINT Message,
00357 WPARAM wParam,
00358 LPARAM lParam,
00359 LRESULT* lplResult);
00360
00361
00362
NTSTATUS
00363 ConsoleImeMessagePump(
00364
PCONSOLE_INFORMATION Console,
00365 UINT Message,
00366 WPARAM wParam,
00367 LPARAM lParam
00368 );
00369
#endif // FE_IME
00370
00371
00372
BOOL
00373
RegisterKeisenOfTTFont(
00374 IN
PSCREEN_INFORMATION ScreenInfo
00375 );
00376
00377 ULONG
00378
TranslateUnicodeToOem(
00379 IN
PCONSOLE_INFORMATION Console,
00380 IN PWCHAR UnicodeBuffer,
00381 IN ULONG UnicodeCharCount,
00382 OUT PCHAR AnsiBuffer,
00383 IN ULONG AnsiByteCount,
00384 OUT PINPUT_RECORD DbcsLeadInpRec
00385 );
00386
00387
DWORD
00388
ImmConversionToConsole(
00389 DWORD fdwConversion
00390 );
00391
00392
DWORD
00393
ImmConversionFromConsole(
00394 DWORD dwNlsMode
00395 );
00396
00397
00398
00399
00400
#if defined(DBG) && defined(DBG_KATTR)
00401
VOID
00402 BeginKAttrCheck(
00403 IN
PSCREEN_INFORMATION ScreenInfo
00404 );
00405
#endif
00406
00407
00408
00409
00410
00411
BOOL
00412
CreateDbcsScreenBuffer(
00413 IN
PCONSOLE_INFORMATION Console,
00414 IN COORD dwScreenBufferSize,
00415 OUT PDBCS_SCREEN_BUFFER DbcsScreenBuffer
00416 );
00417
00418
BOOL
00419
DeleteDbcsScreenBuffer(
00420 IN PDBCS_SCREEN_BUFFER DbcsScreenBuffer
00421 );
00422
00423
BOOL
00424
ReCreateDbcsScreenBuffer(
00425 IN
PCONSOLE_INFORMATION Console,
00426 IN UINT OldCodePage
00427 );
00428
00429
BOOL
00430
FE_PolyTextOutCandidate(
00431 IN
PSCREEN_INFORMATION ScreenInfo,
00432 IN PSMALL_RECT Region
00433 );
00434
00435
VOID
00436
FE_ConsolePolyTextOut(
00437 IN
PSCREEN_INFORMATION ScreenInfo,
00438 IN PSMALL_RECT Region
00439 );
00440
00441
00442
00443
00444
00445
NTSTATUS
00446
SetRAMFontCodePage(
00447 IN
PSCREEN_INFORMATION ScreenInfo
00448 );
00449
00450
NTSTATUS
00451
SetRAMFont(
00452 IN
PSCREEN_INFORMATION ScreenInfo,
00453 IN PCHAR_INFO ScreenBufPtr,
00454 IN DWORD Length
00455 );