TianoCore EDK2 master
|
#include "HexEditor.h"
Go to the source code of this file.
Defines BufferImage - 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.h.
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.
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 HBufferImageFree | ( | VOID | ) |
Free the current image.
EFI_SUCCESS | The operation was successful. |
Definition at line 1082 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 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.
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 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 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.