TianoCore EDK2 master
|
#include "HexEditor.h"
Go to the source code of this file.
Defines HBufferImage - the view of the file that is visible at any point, as well as the event handlers for editing the file
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BufferImage.c.
Check user specified FileRow is above current screen.
[in] | FileRow | Row of file position ( start from 1 ). |
TRUE | It is above the current screen. |
FALSE | It is not above the current screen. |
Definition at line 1379 of file BufferImage.c.
EFI_STATUS HBufferImageAddChar | ( | IN CHAR16 | Char | ) |
Add character.
[in] | Char | – input char. |
EFI_SUCCESS | The operation was successful. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 1134 of file BufferImage.c.
Add character to buffer, add before pos.
[in] | Pos | Position, Pos starting from 0. |
[in] | Count | Count of characters to add. |
[in] | AddBuffer | Add buffer. |
EFI_SUCCESS | Success. |
Definition at line 2018 of file BufferImage.c.
Move the mouse in the image buffer.
[in] | TextX | The x-coordinate. |
[in] | TextY | The y-coordinate. |
Definition at line 2291 of file BufferImage.c.
EFI_STATUS HBufferImageBackup | ( | VOID | ) |
Backup function for HBufferImage. Only a few fields need to be backup. This is for making the file buffer refresh as few as possible.
EFI_SUCCESS | The operation was successful. |
Definition at line 141 of file BufferImage.c.
EFI_STATUS HBufferImageBufferToList | ( | IN VOID * | Buffer, |
IN UINTN | Bytes | ||
) |
Change the raw buffer to a list of lines for the UI.
[in] | Buffer | The pointer to the buffer to fill. |
[in] | Bytes | The size of the buffer in bytes. |
EFI_SUCCESS | The operation was successful. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 2175 of file BufferImage.c.
change char to int value based on Hex.
[in] | Char | The input char. |
-1 | The operation failed. |
Definition at line 1103 of file BufferImage.c.
EFI_STATUS HBufferImageCleanup | ( | VOID | ) |
Cleanup function for HBufferImage
EFI_SUCCESS | The operation was successful. |
Definition at line 211 of file BufferImage.c.
HEFI_EDITOR_LINE * HBufferImageCreateLine | ( | VOID | ) |
Create a new line and append it to the line list. Fields affected: NumLines Lines
NULL | create line failed. |
Definition at line 1040 of file BufferImage.c.
EFI_STATUS HBufferImageDeleteCharacterFromBuffer | ( | IN UINTN | Pos, |
IN UINTN | Count, | ||
OUT UINT8 * | DeleteBuffer | ||
) |
Delete character from buffer.
[in] | Pos | Position, Pos starting from 0. |
[in] | Count | The Count of characters to delete. |
[out] | DeleteBuffer | The DeleteBuffer. |
EFI_SUCCESS | Success |
Definition at line 1889 of file BufferImage.c.
EFI_STATUS HBufferImageDoBackspace | ( | VOID | ) |
Delete the previous character.
EFI_SUCCESS | The operationw as successful. |
Definition at line 1266 of file BufferImage.c.
EFI_STATUS HBufferImageDoCharInput | ( | IN CHAR16 | Char | ) |
ASCII key + Backspace + return.
[in] | Char | The input char. |
EFI_SUCCESS | The operation was successful. |
EFI_LOAD_ERROR | A load error occurred. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 1329 of file BufferImage.c.
EFI_STATUS HBufferImageDoDelete | ( | VOID | ) |
Delete current character from line.
EFI_SUCCESS | The operationw as successful. |
Definition at line 2116 of file BufferImage.c.
EFI_STATUS HBufferImageEnd | ( | VOID | ) |
Scroll cursor to end of line.
EFI_SUCCESS | Teh operation was successful. |
Definition at line 1810 of file BufferImage.c.
EFI_STATUS HBufferImageFree | ( | VOID | ) |
Free the current image.
EFI_SUCCESS | The operation was successful. |
Definition at line 1082 of file BufferImage.c.
EFI_STATUS HBufferImageFreeLines | ( | VOID | ) |
Free all the lines in HBufferImage. Fields affected: Lines CurrentLine NumLines ListHead
EFI_SUCCESS | The operation was successful. |
Definition at line 192 of file BufferImage.c.
UINTN HBufferImageGetTotalSize | ( | VOID | ) |
Get the size of the open buffer.
The | size in bytes. |
Definition at line 1850 of file BufferImage.c.
EFI_STATUS HBufferImageHandleInput | ( | IN EFI_INPUT_KEY * | Key | ) |
Dispatch input to different handler
[in] | Key | The input key: the keys can be: ASCII KEY Backspace/Delete Direction key: up/down/left/right/pgup/pgdn Home/End INS |
EFI_SUCCESS | The operation was successful. |
EFI_LOAD_ERROR | A load error occurred. |
EFI_OUT_OF_RESOURCES | A Memory allocation failed. |
Definition at line 2387 of file BufferImage.c.
EFI_STATUS HBufferImageHome | ( | VOID | ) |
Scroll cursor to start of line
EFI_SUCCESS | The operation was successful. |
Definition at line 1781 of file BufferImage.c.
EFI_STATUS HBufferImageInit | ( | VOID | ) |
Initialization function for HBufferImage
EFI_SUCCESS | The operation was successful. |
EFI_LOAD_ERROR | A load error occurred. |
Definition at line 78 of file BufferImage.c.
Function to decide if a column number is stored in the high bits.
[in] | Column | The column to examine. |
[out] | FCol | The actual column number. |
TRUE | The actual column was in high bits and is now in FCol. |
FALSE | There was not a column number in the high bits. |
Definition at line 425 of file BufferImage.c.
Decide if a point is in the already selected area.
[in] | MouseRow | The row of the point to test. |
[in] | MouseCol | The col of the point to test. |
TRUE | The point is in the selected area. |
FALSE | The point is not in the selected area. |
Definition at line 468 of file BufferImage.c.
EFI_STATUS HBufferImageListToBuffer | ( | IN VOID * | Buffer, |
IN UINTN | Bytes | ||
) |
Change the list of lines from the UI to a raw buffer.
[in] | Buffer | The pointer to the buffer to fill. |
[in] | Bytes | The size of the buffer in bytes. |
EFI_SUCCESS | The operation was successful. |
Definition at line 2238 of file BufferImage.c.
VOID HBufferImageMovePosition | ( | IN UINTN | NewFilePosRow, |
IN UINTN | NewFilePosCol, | ||
IN BOOLEAN | HighBits | ||
) |
According to cursor's file position, adjust screen display.
[in] | NewFilePosRow | Row of file position ( start from 1 ). |
[in] | NewFilePosCol | Column of file position ( start from 1 ). |
[in] | HighBits | Cursor will on high4 bits or low4 bits. |
Definition at line 1419 of file BufferImage.c.
EFI_STATUS HBufferImagePageDown | ( | VOID | ) |
Scroll cursor to next page
EFI_SUCCESS | The operation was successful. |
Definition at line 1687 of file BufferImage.c.
EFI_STATUS HBufferImagePageUp | ( | VOID | ) |
Scroll cursor to previous page
EFI_SUCCESS | The operation was successful. |
Definition at line 1741 of file BufferImage.c.
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 | ||
) |
Print Line on Row
[in] | Line | The lline to print. |
[in] | Row | The row on screen ( begin from 1 ). |
[in] | FRow | The FRow. |
[in] | Orig | The original color. |
[in] | New | The color to print with. |
EFI_SUCCESS | The operation was successful. |
Definition at line 243 of file BufferImage.c.
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 | ||
) |
Read an image into a buffer friom a source.
[in] | FileName | Pointer to the file name. OPTIONAL and ignored if not FileTypeFileBuffer. |
[in] | DiskName | Pointer to the disk name. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | DiskOffset | Offset into the disk. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | DiskSize | Size of the disk buffer. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | MemOffset | Offset into the Memory. OPTIONAL and ignored if not FileTypeMemBuffer. |
[in] | MemSize | Size of the Memory buffer. OPTIONAL and ignored if not FileTypeMemBuffer. |
[in] | BufferType | The type of buffer to save. IGNORED. |
[in] | Recover | TRUE for recovermode, FALSE otherwise. |
Definition at line 909 of file BufferImage.c.
EFI_STATUS HBufferImageRefresh | ( | VOID | ) |
Refresh function for HBufferImage.
EFI_SUCCESS | The operation was successful. |
EFI_LOAD_ERROR | A Load error occurred. |
Definition at line 740 of file BufferImage.c.
EFI_STATUS HBufferImageRestoreMousePosition | ( | VOID | ) |
Set mouse position according to HBufferImage.MousePosition.
EFI_SUCCESS | The operation was successful. |
Definition at line 536 of file BufferImage.c.
EFI_STATUS HBufferImageRestorePosition | ( | VOID | ) |
Set cursor position according to HBufferImage.DisplayPosition.
EFI_SUCCESS | The operation was successful. |
Definition at line 716 of file BufferImage.c.
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 | ||
) |
Save the current image.
[in] | FileName | Pointer to the file name. OPTIONAL and ignored if not FileTypeFileBuffer. |
[in] | DiskName | Pointer to the disk name. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | DiskOffset | Offset into the disk. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | DiskSize | Size of the disk buffer. OPTIONAL and ignored if not FileTypeDiskBuffer. |
[in] | MemOffset | Offset into the Memory. OPTIONAL and ignored if not FileTypeMemBuffer. |
[in] | MemSize | Size of the Memory buffer. OPTIONAL and ignored if not FileTypeMemBuffer. |
[in] | BufferType | The type of buffer to save. IGNORED. |
Definition at line 976 of file BufferImage.c.
EFI_STATUS HBufferImageScrollDown | ( | VOID | ) |
Scroll cursor to the next line
EFI_SUCCESS | The operation was successful. |
Definition at line 1610 of file BufferImage.c.
EFI_STATUS HBufferImageScrollLeft | ( | VOID | ) |
Scroll cursor to left.
EFI_SUCCESS | The operation was successful. |
Definition at line 1562 of file BufferImage.c.
EFI_STATUS HBufferImageScrollRight | ( | VOID | ) |
Scroll cursor to right.
EFI_SUCCESS | The operation was successful. |
Definition at line 1505 of file BufferImage.c.
EFI_STATUS HBufferImageScrollUp | ( | VOID | ) |
Scroll cursor to previous line
EFI_SUCCESS | The operation was successful. |
Definition at line 1654 of file BufferImage.c.
Check user specified FileRow is under current screen.
[in] | FileRow | Row of file position ( start from 1 ). |
TRUE | It is under the current screen. |
FALSE | It is not under the current screen. |
Definition at line 1400 of file BufferImage.c.
HEFI_EDITOR_BUFFER_IMAGE HBufferImage |
Definition at line 27 of file BufferImage.c.
HEFI_EDITOR_BUFFER_IMAGE HBufferImageBackupVar |
Definition at line 28 of file BufferImage.c.
HEFI_EDITOR_BUFFER_IMAGE HBufferImageConst |
BOOLEAN HBufferImageMouseNeedRefresh |
Definition at line 69 of file BufferImage.c.
BOOLEAN HBufferImageNeedRefresh |
Definition at line 62 of file BufferImage.c.
BOOLEAN HBufferImageOnlyLineNeedRefresh |
Definition at line 67 of file BufferImage.c.
|
extern |
Definition at line 21 of file DiskImage.c.
|
extern |
Definition at line 22 of file DiskImage.c.
|
extern |
Definition at line 29 of file MainHexEditor.c.
|
extern |
Definition at line 20 of file FileImage.c.
|
extern |
Definition at line 21 of file FileImage.c.
|
extern |
Definition at line 38 of file MainHexEditor.c.
|
extern |
Definition at line 39 of file MainHexEditor.c.
|
extern |
Definition at line 21 of file MemImage.c.
|
extern |
Definition at line 22 of file MemImage.c.