22extern BOOLEAN HEditorMouseAction;
62BOOLEAN HBufferImageNeedRefresh;
67BOOLEAN HBufferImageOnlyLineNeedRefresh;
69BOOLEAN HBufferImageMouseNeedRefresh;
87 CopyMem (&HBufferImage, &HBufferImageConst,
sizeof (HBufferImage));
93 if (HBufferImage.ListHead ==
NULL) {
94 return EFI_LOAD_ERROR;
99 HBufferImage.DisplayPosition.Row = 2;
100 HBufferImage.DisplayPosition.Column = 10;
101 HBufferImage.MousePosition.Row = 2;
102 HBufferImage.MousePosition.Column = 10;
104 HBufferImage.FileImage = &HFileImage;
105 HBufferImage.DiskImage = &HDiskImage;
106 HBufferImage.MemImage = &HMemImage;
108 HBufferImageNeedRefresh =
FALSE;
109 HBufferImageOnlyLineNeedRefresh =
FALSE;
110 HBufferImageMouseNeedRefresh =
FALSE;
112 HBufferImageBackupVar.FileImage = &HFileImageBackupVar;
113 HBufferImageBackupVar.DiskImage = &HDiskImageBackupVar;
114 HBufferImageBackupVar.MemImage = &HMemImageBackupVar;
117 if (EFI_ERROR (Status)) {
118 return EFI_LOAD_ERROR;
122 if (EFI_ERROR (Status)) {
123 return EFI_LOAD_ERROR;
127 if (EFI_ERROR (Status)) {
128 return EFI_LOAD_ERROR;
145 HBufferImageBackupVar.MousePosition = HBufferImage.MousePosition;
147 HBufferImageBackupVar.BufferPosition = HBufferImage.BufferPosition;
149 HBufferImageBackupVar.Modified = HBufferImage.Modified;
151 HBufferImageBackupVar.BufferType = HBufferImage.BufferType;
152 HBufferImageBackupVar.LowVisibleRow = HBufferImage.LowVisibleRow;
153 HBufferImageBackupVar.HighBits = HBufferImage.HighBits;
161 switch (HBufferImage.BufferType) {
162 case FileTypeFileBuffer:
166 case FileTypeDiskBuffer:
170 case FileTypeMemBuffer:
196 HFreeLines (HBufferImage.ListHead, HBufferImage.Lines);
198 HBufferImage.Lines =
NULL;
199 HBufferImage.CurrentLine =
NULL;
200 HBufferImage.NumLines = 0;
222 SHELL_FREE_NON_NULL (HBufferImage.ListHead);
223 HBufferImage.ListHead =
NULL;
271 if ((HMainEditor.SelectStart != 0) && (HMainEditor.SelectEnd != 0)) {
272 RowStart = (HMainEditor.SelectStart - 1) / 0x10 + 1;
273 RowEnd = (HMainEditor.SelectEnd - 1) / 0x10 + 1;
275 ColStart = (HMainEditor.SelectStart - 1) % 0x10 + 1;
276 ColEnd = (HMainEditor.SelectEnd - 1) % 0x10 + 1;
278 if ((FRow >= RowStart) && (FRow <= RowEnd)) {
282 if (FRow > RowStart) {
291 if (!HEditorMouseAction) {
296 ((INT32)Row - 2 + HBufferImage.LowVisibleRow - 1) * 0x10
300 for (Index = 0; Index < 0x08 && Index < Line->Size; Index++) {
304 if ((Index + 1 >= ColStart) && (Index + 1 <= ColEnd)) {
315 Pos = 10 + (Index * 3);
316 if (Line->Buffer[Index] < 0x10) {
322 ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L
"%x ", Line->Buffer[Index]);
324 ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L
"%x ", Line->Buffer[Index]);
329 while (Index < 0x08) {
330 Pos = 10 + (Index * 3);
335 while (Index < 0x10 && Index < Line->Size) {
339 if ((Index + 1 >= ColStart) && (Index + 1 <= ColEnd)) {
350 Pos = 10 + (Index * 3) + 1;
351 if (Line->Buffer[Index] < 0x10) {
356 ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L
"%x ", Line->Buffer[Index]);
361 while (Index < 0x10) {
362 Pos = 10 + (Index * 3) + 1;
375 if (!HEditorMouseAction) {
376 for (Index = 0; Index < 0x10 && Index < Line->Size; Index++) {
377 Pos = ASCII_POSITION + Index;
382 if (Line->Buffer[Index] >= L
' ') {
383 ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L
"%c", (CHAR16)Line->Buffer[Index]);
385 ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L
"%c",
'.');
389 while (Index < 0x10) {
390 Pos = ASCII_POSITION + Index;
401 Pos = 10 + (ColEnd - 1) * 3 + 2;
403 }
else if (ColEnd == 8) {
404 Pos = 10 + (ColEnd - 1) * 3 + 2;
407 Pos = 10 + (ColEnd - 1) * 3 + 3;
445 *FCol = (Column / 3) + 1;
447 if (Column % 3 == 0) {
451 if ((Column % 3 == 2)) {
487 if ((HMainEditor.SelectStart == 0) || (HMainEditor.SelectEnd == 0)) {
494 RowStart = (HMainEditor.SelectStart - 1) / 0x10 + 1;
495 RowEnd = (HMainEditor.SelectEnd - 1) / 0x10 + 1;
497 ColStart = (HMainEditor.SelectStart - 1) % 0x10 + 1;
498 ColEnd = (HMainEditor.SelectEnd - 1) % 0x10 + 1;
500 FRow = HBufferImage.LowVisibleRow + MouseRow - 2;
501 if ((FRow < RowStart) || (FRow > RowEnd)) {
505 if (FRow > RowStart) {
513 MouseColStart = 10 + (ColStart - 1) * 3;
518 MouseColEnd = 10 + (ColEnd - 1) * 3 + 1;
523 if ((MouseCol < MouseColStart) || (MouseCol > MouseColEnd)) {
544 BOOLEAN HasCharacter;
551 if (HMainEditor.MouseSupported) {
552 if (HBufferImageMouseNeedRefresh) {
553 HBufferImageMouseNeedRefresh =
FALSE;
560 (HBufferImage.MousePosition.Row == HBufferImageBackupVar.MousePosition.Row) &&
561 (HBufferImage.MousePosition.Column == HBufferImageBackupVar.MousePosition.Column)
572 Orig = HMainEditor.ColorAttributes;
574 New.Colors.Foreground = Orig.Colors.Background & 0xF;
575 New.Colors.Background = Orig.Colors.Foreground & 0x7;
582 HBufferImageBackupVar.MousePosition.Row,
583 HBufferImageBackupVar.MousePosition.Column
594 FRow = HBufferImage.LowVisibleRow + HBufferImageBackupVar.MousePosition.Row - 2;
597 HBufferImageBackupVar.MousePosition.Column,
602 if ((FRow > HBufferImage.NumLines) || (FColumn == 0)) {
603 HasCharacter =
FALSE;
605 CurrentLine = HBufferImage.CurrentLine;
606 Line =
HMoveLine (FRow - HBufferImage.BufferPosition.Row);
608 if ((Line ==
NULL) || (FColumn > Line->Size)) {
609 HasCharacter =
FALSE;
612 HBufferImage.CurrentLine = CurrentLine;
616 (INT32)HBufferImageBackupVar.MousePosition.Column - 1,
617 (INT32)HBufferImageBackupVar.MousePosition.Row - 1,
623 Value = (UINT8)(Line->Buffer[FColumn - 1] & 0xf0);
624 Value = (UINT8)(Value >> 4);
626 Value = (UINT8)(Line->Buffer[FColumn - 1] & 0xf);
630 (INT32)HBufferImageBackupVar.MousePosition.Column - 1,
631 (INT32)HBufferImageBackupVar.MousePosition.Row - 1,
638 HBufferImage.MousePosition.Row,
639 HBufferImage.MousePosition.Column
650 FRow = HBufferImage.LowVisibleRow + HBufferImage.MousePosition.Row - 2;
653 HBufferImage.MousePosition.Column,
658 if ((FRow > HBufferImage.NumLines) || (FColumn == 0)) {
659 HasCharacter =
FALSE;
661 CurrentLine = HBufferImage.CurrentLine;
662 Line =
HMoveLine (FRow - HBufferImage.BufferPosition.Row);
664 if ((Line ==
NULL) || (FColumn > Line->Size)) {
665 HasCharacter =
FALSE;
668 HBufferImage.CurrentLine = CurrentLine;
672 (INT32)HBufferImage.MousePosition.Column - 1,
673 (INT32)HBufferImage.MousePosition.Row - 1,
679 Value = (UINT8)(Line->Buffer[FColumn - 1] & 0xf0);
680 Value = (UINT8)(Value >> 4);
682 Value = (UINT8)(Line->Buffer[FColumn - 1] & 0xf);
686 (INT32)HBufferImage.MousePosition.Column - 1,
687 (INT32)HBufferImage.MousePosition.Row - 1,
725 HBufferImage.DisplayPosition.Column - 1,
726 HBufferImage.DisplayPosition.Row - 1
755 Orig = HMainEditor.ColorAttributes;
757 New.Colors.Foreground = Orig.Colors.Background;
758 New.Colors.Background = Orig.Colors.Foreground;
763 if (HEditorFirst ==
FALSE) {
768 if (!HBufferImageNeedRefresh &&
769 !HBufferImageOnlyLineNeedRefresh &&
770 (HBufferImageBackupVar.LowVisibleRow == HBufferImage.LowVisibleRow)
784 if (HBufferImageOnlyLineNeedRefresh && (HBufferImageBackupVar.LowVisibleRow == HBufferImage.LowVisibleRow)) {
786 HBufferImage.CurrentLine,
787 HBufferImage.DisplayPosition.Row,
788 HBufferImage.BufferPosition.Row,
796 if (HEditorMouseAction && (HMainEditor.SelectStart != 0) && (HMainEditor.SelectEnd != 0)) {
797 if (HMainEditor.SelectStart != HMainEditorBackupVar.SelectStart) {
798 if ((HMainEditor.SelectStart >= HMainEditorBackupVar.SelectStart) && (HMainEditorBackupVar.SelectStart != 0)) {
799 StartRow = (HMainEditorBackupVar.SelectStart - 1) / 0x10 + 1;
801 StartRow = (HMainEditor.SelectStart - 1) / 0x10 + 1;
804 StartRow = (HMainEditor.SelectStart - 1) / 0x10 + 1;
807 if (HMainEditor.SelectEnd <= HMainEditorBackupVar.SelectEnd) {
808 EndRow = (HMainEditorBackupVar.SelectEnd - 1) / 0x10 + 1;
810 EndRow = (HMainEditor.SelectEnd - 1) / 0x10 + 1;
816 if (StartRow > EndRow) {
822 FStartRow = StartRow;
824 StartRow = 2 + StartRow - HBufferImage.LowVisibleRow;
825 EndRow = 2 + EndRow - HBufferImage.LowVisibleRow;
830 FStartRow = HBufferImage.LowVisibleRow;
832 EndRow = (HMainEditor.ScreenSize.Row - 1);
838 if (HBufferImage.Lines ==
NULL) {
848 Line =
HMoveLine (FStartRow - HBufferImage.BufferPosition.Row);
851 return EFI_LOAD_ERROR;
854 Link = &(Line->Link);
865 HBufferImage.LowVisibleRow + Row - 2,
870 Link = Link->ForwardLink;
872 }
while (Link != HBufferImage.ListHead && Row <= EndRow);
874 while (Row <= EndRow) {
875 EditorClearLine (Row, HMainEditor.ScreenSize.Column, HMainEditor.ScreenSize.Row);
887 HBufferImageNeedRefresh =
FALSE;
888 HBufferImageOnlyLineNeedRefresh =
FALSE;
916 IN EDIT_FILE_TYPE BufferType,
921 EDIT_FILE_TYPE BufferTypeBackup;
927 HBufferImage.BufferType = BufferType;
935 BufferTypeBackup = HBufferImage.BufferType;
937 switch (BufferType) {
938 case FileTypeFileBuffer:
942 case FileTypeDiskBuffer:
943 Status =
HDiskImageRead (DiskName, DiskOffset, DiskSize, Recover);
946 case FileTypeMemBuffer:
951 Status = EFI_NOT_FOUND;
955 if (EFI_ERROR (Status)) {
956 HBufferImage.BufferType = BufferTypeBackup;
983 IN EDIT_FILE_TYPE BufferType
987 EDIT_FILE_TYPE BufferTypeBackup;
993 BufferTypeBackup = HBufferImage.BufferType;
995 switch (HBufferImage.BufferType) {
999 case FileTypeFileBuffer:
1006 case FileTypeDiskBuffer:
1013 case FileTypeMemBuffer:
1018 Status = EFI_NOT_FOUND;
1022 if (EFI_ERROR (Status)) {
1023 HBufferImage.BufferType = BufferTypeBackup;
1054 Line->Signature = EFI_EDITOR_LINE_LIST;
1057 HBufferImage.NumLines++;
1064 if (HBufferImage.Lines ==
NULL) {
1065 HBufferImage.Lines =
CR (
1066 HBufferImage.ListHead->ForwardLink,
1069 EFI_EDITOR_LINE_LIST
1110 if ((Char >= L
'0') && (Char <= L
'9')) {
1111 return (Char - L
'0');
1114 if ((Char >= L
'a') && (Char <= L
'f')) {
1115 return (Char - L
'a' + 10);
1118 if ((Char >= L
'A') && (Char <= L
'F')) {
1119 return (Char - L
'A' + 10);
1155 Line = HBufferImage.CurrentLine;
1156 FRow = HBufferImage.BufferPosition.Row;
1157 FCol = HBufferImage.BufferPosition.Column;
1158 High = HBufferImage.HighBits;
1163 HBufferImageOnlyLineNeedRefresh =
TRUE;
1168 if (FCol > Line->Size) {
1173 Line->Buffer[Line->Size] = (UINT8)Value;
1177 Old = Line->Buffer[FCol - 1];
1182 Old = (UINT8)(Old & 0x0f);
1183 Old = (UINT8)(Old << 4);
1184 Old = (UINT8)(Value + Old);
1185 Line->Buffer[FCol - 1] = Old;
1191 if (!High && (FCol == 0x10)) {
1192 HBufferImageOnlyLineNeedRefresh =
FALSE;
1193 HBufferImageNeedRefresh =
TRUE;
1195 if (Line->Link.ForwardLink == HBufferImage.ListHead) {
1202 if (NewLine ==
NULL) {
1203 return EFI_OUT_OF_RESOURCES;
1221 if ((FCol == 0x10) && !High) {
1253 if (!HBufferImage.Modified) {
1254 HBufferImage.Modified =
TRUE;
1284 if ((HBufferImage.BufferPosition.Row == 1) && (HBufferImage.BufferPosition.Column == 1)) {
1288 FPos = (HBufferImage.BufferPosition.Row - 1) * 0x10 + HBufferImage.BufferPosition.Column - 1;
1290 FileColumn = HBufferImage.BufferPosition.Column;
1292 Line = HBufferImage.CurrentLine;
1294 if ((Line->Link.ForwardLink == HBufferImage.ListHead) && (FileColumn > 1)) {
1305 HBufferImageNeedRefresh =
FALSE;
1306 HBufferImageOnlyLineNeedRefresh =
TRUE;
1308 HBufferImageNeedRefresh =
TRUE;
1309 HBufferImageOnlyLineNeedRefresh =
FALSE;
1312 if (!HBufferImage.Modified) {
1313 HBufferImage.Modified =
TRUE;
1357 if ((Char > 127) || (Char < 32)) {
1383 if (FileRow < HBufferImage.LowVisibleRow) {
1404 if (FileRow > HBufferImage.LowVisibleRow + (HMainEditor.ScreenSize.Row - 2) - 1) {
1429 UINTN NewDisplayCol;
1434 RowGap = NewFilePosRow - HBufferImage.BufferPosition.Row;
1439 HBufferImage.HighBits = HighBits;
1448 HBufferImage.BufferPosition.Row = NewFilePosRow;
1456 if (NewFilePosRow < (HBufferImage.DisplayPosition.Row - 2 + 1)) {
1457 HBufferImage.DisplayPosition.Row = NewFilePosRow + 2 - 1;
1460 HBufferImage.BufferPosition.Row = NewFilePosRow;
1465 HBufferImage.BufferPosition.Row = NewFilePosRow;
1468 HBufferImage.DisplayPosition.Row -= Abs;
1470 HBufferImage.DisplayPosition.Row += RowGap;
1475 HBufferImage.LowVisibleRow = HBufferImage.BufferPosition.Row - (HBufferImage.DisplayPosition.Row - 2);
1480 HBufferImage.BufferPosition.Column = NewFilePosCol;
1482 NewDisplayCol = 10 + (NewFilePosCol - 1) * 3;
1483 if (NewFilePosCol > 0x8) {
1491 HBufferImage.DisplayPosition.Column = NewDisplayCol;
1516 HBufferImageNeedRefresh =
FALSE;
1517 HBufferImageOnlyLineNeedRefresh =
FALSE;
1519 Line = HBufferImage.CurrentLine;
1521 FRow = HBufferImage.BufferPosition.Row;
1522 FCol = HBufferImage.BufferPosition.Column;
1527 if (FCol > Line->Size) {
1538 if (Line->Link.ForwardLink != HBufferImage.ListHead) {
1570 HBufferImageNeedRefresh =
FALSE;
1571 HBufferImageOnlyLineNeedRefresh =
FALSE;
1573 Line = HBufferImage.CurrentLine;
1575 FRow = HBufferImage.BufferPosition.Row;
1576 FCol = HBufferImage.BufferPosition.Column;
1585 if (Line->Link.BackLink != HBufferImage.ListHead) {
1619 Line = HBufferImage.CurrentLine;
1621 FRow = HBufferImage.BufferPosition.Row;
1622 FCol = HBufferImage.BufferPosition.Column;
1623 HighBits = HBufferImage.HighBits;
1628 if (Line->Link.ForwardLink != HBufferImage.ListHead) {
1635 if (FCol > Line->Size) {
1636 FCol = Line->Size + 1;
1662 Line = HBufferImage.CurrentLine;
1664 FRow = HBufferImage.BufferPosition.Row;
1665 FCol = HBufferImage.BufferPosition.Column;
1670 if (Line->Link.BackLink != HBufferImage.ListHead) {
1697 Line = HBufferImage.CurrentLine;
1699 FRow = HBufferImage.BufferPosition.Row;
1700 FCol = HBufferImage.BufferPosition.Column;
1701 HighBits = HBufferImage.HighBits;
1706 if (HBufferImage.NumLines >= FRow + (HMainEditor.ScreenSize.Row - 2)) {
1707 Gap = (HMainEditor.ScreenSize.Row - 2);
1712 Gap = HBufferImage.NumLines - FRow;
1723 if ((Line !=
NULL) && (FCol > Line->Size)) {
1724 FCol = Line->Size + 1;
1750 FRow = HBufferImage.BufferPosition.Row;
1751 FCol = HBufferImage.BufferPosition.Column;
1756 if (FRow > (HMainEditor.ScreenSize.Row - 2)) {
1757 Gap = (HMainEditor.ScreenSize.Row - 2);
1792 FRow = HBufferImage.BufferPosition.Row;
1822 HBufferImageMouseNeedRefresh =
TRUE;
1824 Line = HBufferImage.CurrentLine;
1826 FRow = HBufferImage.BufferPosition.Row;
1828 if (Line->Size == 0x10) {
1832 FCol = Line->Size + 1;
1861 if (HBufferImage.Lines ==
NULL) {
1866 HBufferImage.ListHead->BackLink,
1869 EFI_EDITOR_LINE_LIST
1874 Size = 0x10 * (HBufferImage.NumLines - 1) + Line->Size;
1892 OUT UINT8 *DeleteBuffer
1915 return EFI_LOAD_ERROR;
1925 OldFRow = HBufferImage.BufferPosition.Row;
1926 OldFCol = HBufferImage.BufferPosition.Column;
1927 OldPos = (OldFRow - 1) * 0x10 + OldFCol - 1;
1946 if (Buffer ==
NULL) {
1947 return EFI_OUT_OF_RESOURCES;
1952 BufferPtr = (UINT8 *)Buffer;
1957 if (DeleteBuffer !=
NULL) {
1958 for (Index = 0; Index < Count; Index++) {
1959 DeleteBuffer[Index] = BufferPtr[Pos + Index];
1966 for (Index = Pos; Index < Size - Count; Index++) {
1967 BufferPtr[Index] = BufferPtr[Index + Count];
1977 if (EFI_ERROR (Status)) {
1981 Link = HMainEditor.BufferImage->ListHead->ForwardLink;
1982 for (Index = 0; Index < NewPos / 0x10; Index++) {
1983 Link = Link->ForwardLink;
1987 HBufferImage.CurrentLine = Line;
1993 if ((OldPos >= Pos) && (OldPos < (Pos + Count))) {
1999 NewPos = OldPos - Count;
2045 OldFRow = HBufferImage.BufferPosition.Row;
2046 OldFCol = HBufferImage.BufferPosition.Column;
2047 OldPos = (OldFRow - 1) * 0x10 + OldFCol - 1;
2061 if (Buffer ==
NULL) {
2062 return EFI_OUT_OF_RESOURCES;
2067 BufferPtr = (UINT8 *)Buffer;
2072 for (Index = (
INTN)(Size + Count - 1); Index >= (
INTN)Pos; Index--) {
2073 BufferPtr[Index] = BufferPtr[Index - Count];
2079 for (Index = (
INTN)0; Index < (
INTN)Count; Index++) {
2080 BufferPtr[Index + Pos] = AddBuffer[Index];
2091 Link = HMainEditor.BufferImage->ListHead->ForwardLink;
2092 for (Index = 0; Index < (
INTN)NewPos / 0x10; Index++) {
2093 Link = Link->ForwardLink;
2097 HBufferImage.CurrentLine = Line;
2099 if (OldPos >= Pos) {
2100 NewPos = OldPos + Count;
2126 FPos = (HBufferImage.BufferPosition.Row - 1) * 0x10 + HBufferImage.BufferPosition.Column - 1;
2128 FileColumn = HBufferImage.BufferPosition.Column;
2130 Line = HBufferImage.CurrentLine;
2135 if (FileColumn > Line->Size) {
2140 if (Line->Link.ForwardLink == HBufferImage.ListHead) {
2151 HBufferImageNeedRefresh =
FALSE;
2152 HBufferImageOnlyLineNeedRefresh =
TRUE;
2154 HBufferImageNeedRefresh =
TRUE;
2155 HBufferImageOnlyLineNeedRefresh =
FALSE;
2158 if (!HBufferImage.Modified) {
2159 HBufferImage.Modified =
TRUE;
2188 BufferPtr = (UINT8 *)Buffer;
2193 while (TempI < Bytes) {
2194 if (Bytes - TempI >= 0x10) {
2197 Left = Bytes - TempI;
2205 return EFI_OUT_OF_RESOURCES;
2210 for (TempJ = 0; TempJ < Left; TempJ++) {
2211 Line->Buffer[TempJ] = BufferPtr[TempI];
2219 if ((Left == 0x10) || (Bytes == 0)) {
2222 return EFI_OUT_OF_RESOURCES;
2252 if (HBufferImage.Lines ==
NULL) {
2256 Link = &HBufferImage.Lines->Link;
2258 BufferPtr = (UINT8 *)Buffer;
2263 while (Link != HBufferImage.ListHead) {
2267 if (Count + Line->Size > Bytes) {
2271 for (Index = 0; Index < Line->Size; Index++) {
2272 BufferPtr[Index] = Line->Buffer[Index];
2275 Count += Line->Size;
2276 BufferPtr += Line->Size;
2278 Link = Link->ForwardLink;
2323 TempX = HBufferImage.MousePosition.Column;
2324 TempY = HBufferImage.MousePosition.Row;
2329 if (TempX >= AbsX) {
2339 if (TempY >= AbsY) {
2350 if ((TempX >= 10) && (TempX <= (10 + 0x10 * 3 - 1))) {
2351 HBufferImage.MousePosition.Column = TempX;
2352 }
else if (TempX < 10) {
2353 HBufferImage.MousePosition.Column = 10;
2354 }
else if (TempX > (10 + 0x10 * 3 - 1)) {
2355 HBufferImage.MousePosition.Column = 10 + 0x10 * 3 - 1;
2362 if ((TempY >= 2) && (TempY <= (HMainEditor.ScreenSize.Row - 1))) {
2363 HBufferImage.MousePosition.Row = TempY;
2364 }
else if (TempY < 2) {
2365 HBufferImage.MousePosition.Row = 2;
2366 }
else if (TempY > (HMainEditor.ScreenSize.Row - 1)) {
2367 HBufferImage.MousePosition.Row = (HMainEditor.ScreenSize.Row - 1);
2395 switch (Key->ScanCode) {
2441 case SCAN_PAGE_DOWN:
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS HBufferImageHandleInput(IN EFI_INPUT_KEY *Key)
VOID HBufferImageAdjustMousePosition(IN INT32 TextX, IN INT32 TextY)
BOOLEAN HUnderCurrentScreen(IN UINTN FileRow)
EFI_STATUS HBufferImageDoDelete(VOID)
EFI_STATUS HBufferImageRefresh(VOID)
EFI_STATUS HBufferImageAddCharacterToBuffer(IN UINTN Pos, IN UINTN Count, IN UINT8 *AddBuffer)
EFI_STATUS HBufferImageHome(VOID)
EFI_STATUS HBufferImageRead(IN CONST CHAR16 *FileName, IN CONST CHAR16 *DiskName, IN UINTN DiskOffset, IN UINTN DiskSize, IN UINTN MemOffset, IN UINTN MemSize, IN EDIT_FILE_TYPE BufferType, IN BOOLEAN Recover)
EFI_STATUS HBufferImageFree(VOID)
EFI_STATUS HBufferImageEnd(VOID)
EFI_STATUS HBufferImageScrollUp(VOID)
EFI_STATUS HBufferImageDoBackspace(VOID)
EFI_STATUS HBufferImageScrollLeft(VOID)
EFI_STATUS HBufferImageRestoreMousePosition(VOID)
EFI_STATUS HBufferImageDoCharInput(IN CHAR16 Char)
UINTN HBufferImageGetTotalSize(VOID)
EFI_STATUS HBufferImageSave(IN CHAR16 *FileName, IN CHAR16 *DiskName, IN UINTN DiskOffset, IN UINTN DiskSize, IN UINTN MemOffset, IN UINTN MemSize, IN EDIT_FILE_TYPE BufferType)
EFI_STATUS HBufferImageBackup(VOID)
EFI_STATUS HBufferImageListToBuffer(IN VOID *Buffer, IN UINTN Bytes)
EFI_STATUS HBufferImageScrollRight(VOID)
EFI_STATUS HBufferImagePageUp(VOID)
BOOLEAN HBufferImageIsAtHighBits(IN UINTN Column, OUT UINTN *FCol)
INTN HBufferImageCharToHex(IN CHAR16 Char)
EFI_STATUS HBufferImageRestorePosition(VOID)
BOOLEAN HBufferImageIsInSelectedArea(IN UINTN MouseRow, IN UINTN MouseCol)
EFI_STATUS HBufferImageBufferToList(IN VOID *Buffer, IN UINTN Bytes)
VOID HBufferImageMovePosition(IN UINTN NewFilePosRow, IN UINTN NewFilePosCol, IN BOOLEAN HighBits)
EFI_STATUS HBufferImageDeleteCharacterFromBuffer(IN UINTN Pos, IN UINTN Count, OUT UINT8 *DeleteBuffer)
EFI_STATUS HBufferImageFreeLines(VOID)
EFI_STATUS HBufferImageAddChar(IN CHAR16 Char)
BOOLEAN HAboveCurrentScreen(IN UINTN FileRow)
EFI_STATUS HBufferImageInit(VOID)
EFI_STATUS HBufferImageScrollDown(VOID)
HEFI_EDITOR_LINE * HBufferImageCreateLine(VOID)
EFI_STATUS HBufferImageCleanup(VOID)
EFI_STATUS HBufferImagePrintLine(IN HEFI_EDITOR_LINE *Line, IN UINTN Row, IN UINTN FRow, IN HEFI_EDITOR_COLOR_UNION Orig, IN HEFI_EDITOR_COLOR_UNION New)
EFI_STATUS HBufferImagePageDown(VOID)
EFI_STATUS HDiskImageCleanup(VOID)
EFI_STATUS HDiskImageSave(IN CHAR16 *DeviceName, IN UINTN Offset, IN UINTN Size)
EFI_STATUS HDiskImageInit(VOID)
EFI_STATUS HDiskImageBackup(VOID)
EFI_STATUS HDiskImageRead(IN CONST CHAR16 *DeviceName, IN UINTN Offset, IN UINTN Size, IN BOOLEAN Recover)
EFI_STATUS StatusBarSetStatusString(IN CHAR16 *Str)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS HFileImageRead(IN CONST CHAR16 *FileName, IN BOOLEAN Recover)
EFI_STATUS HFileImageBackup(VOID)
EFI_STATUS HFileImageCleanup(VOID)
EFI_STATUS HFileImageSave(IN CHAR16 *FileName)
EFI_STATUS HFileImageInit(VOID)
#define CR(Record, TYPE, Field, TestSignature)
EFI_STATUS HMemImageSave(IN UINTN Offset, IN UINTN Size)
EFI_STATUS HMemImageInit(VOID)
EFI_STATUS HMemImageRead(IN UINTN Offset, IN UINTN Size, IN BOOLEAN Recover)
EFI_STATUS HMemImageBackup(VOID)
EFI_STATUS EFIAPI ShellPrintEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR16 *Format,...)
HEFI_EDITOR_LINE * HMoveLine(IN INTN Count)
EFI_STATUS HFreeLines(IN LIST_ENTRY *ListHead, IN HEFI_EDITOR_LINE *Lines)
HEFI_EDITOR_LINE * HMoveCurrentLine(IN INTN Count)
VOID EditorClearLine(IN UINTN Row, IN UINTN LastCol, IN UINTN LastRow)
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut