TianoCore EDK2 master
|
#include "TextEditorTypes.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | FileBufferInit (VOID) |
EFI_STATUS | FileBufferCleanup (VOID) |
EFI_STATUS | FileBufferRefresh (VOID) |
EFI_STATUS | FileBufferHandleInput (IN CONST EFI_INPUT_KEY *Key) |
EFI_STATUS | FileBufferBackup (VOID) |
EFI_STATUS | FileBufferRestorePosition (VOID) |
EFI_STATUS | FileBufferSetFileName (IN CONST CHAR16 *Str) |
EFI_STATUS | FileBufferRead (IN CONST CHAR16 *FileName, IN CONST BOOLEAN Recover) |
EFI_STATUS | FileBufferSave (CONST CHAR16 *FileName) |
VOID | FileBufferMovePosition (IN CONST UINTN NewFilePosRow, IN CONST UINTN NewFilePosCol) |
EFI_STATUS | FileBufferCutLine (OUT EFI_EDITOR_LINE **CutLine) |
EFI_STATUS | FileBufferPasteLine (VOID) |
EFI_STATUS | FileBufferSearch (IN CONST CHAR16 *Str, IN CONST UINTN Offset) |
EFI_STATUS | FileBufferReplace (IN CONST CHAR16 *Replace, IN CONST UINTN SearchLen) |
EFI_STATUS | FileBufferReplaceAll (IN CHAR16 *SearchStr, IN CHAR16 *ReplaceStr, IN UINTN Offset) |
VOID | FileBufferAdjustMousePosition (IN CONST INT32 TextX, IN CONST INT32 TextY) |
VOID | FileBufferSetModified (VOID) |
Declares filebuffer interface functions.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FileBuffer.h.
Move the mouse cursor position.
[in] | TextX | The new x-coordinate. |
[in] | TextY | The new y-coordinate. |
Definition at line 3158 of file FileBuffer.c.
EFI_STATUS FileBufferBackup | ( | VOID | ) |
Backup function for FileBuffer. Only backup the following items: Mouse/Cursor position File Name, Type, ReadOnly, Modified Insert Mode
This is for making the file buffer refresh as few as possible.
EFI_SUCCESS | The backup operation was successful. |
Definition at line 117 of file FileBuffer.c.
EFI_STATUS FileBufferCleanup | ( | VOID | ) |
Cleanup function for FileBuffer.
EFI_SUCCESS | The cleanup was successful. |
Definition at line 445 of file FileBuffer.c.
EFI_STATUS FileBufferCutLine | ( | OUT EFI_EDITOR_LINE ** | CutLine | ) |
Cut current line out and return a pointer to it.
[out] | CutLine | Upon a successful return pointer to the pointer to the allocated cut line. |
EFI_SUCCESS | The cut was successful. |
EFI_NOT_FOUND | There was no selection to cut. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 2791 of file FileBuffer.c.
EFI_STATUS FileBufferHandleInput | ( | IN CONST EFI_INPUT_KEY * | Key | ) |
Dispatch input to different handler
[in] | Key | The input key. One of: ASCII KEY Backspace/Delete Return Direction key: up/down/left/right/pgup/pgdn Home/End INS |
EFI_SUCCESS | The dispatch was done successfully. |
EFI_LOAD_ERROR | The dispatch was not successful. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 2438 of file FileBuffer.c.
EFI_STATUS FileBufferInit | ( | VOID | ) |
Initialization function for FileBuffer.
EFI_SUCCESS | The initialization was successful. |
EFI_LOAD_ERROR | A default name could not be created. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 69 of file FileBuffer.c.
According to cursor's file position, adjust screen display
[in] | NewFilePosRow | The row of file position ( start from 1 ). |
[in] | NewFilePosCol | The column of file position ( start from 1 ). |
Definition at line 2677 of file FileBuffer.c.
EFI_STATUS FileBufferPasteLine | ( | VOID | ) |
Paste a line into line list.
EFI_SUCCESS | The paste was successful. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 2874 of file FileBuffer.c.
EFI_STATUS FileBufferRead | ( | IN CONST CHAR16 * | FileName, |
IN CONST BOOLEAN | Recover | ||
) |
Read a file from disk into the FileBuffer.
[in] | FileName | The filename to read. |
[in] | Recover | TRUE if is for recover mode, no information printouts. |
EFI_SUCCESS | The load was successful. |
EFI_LOAD_ERROR | The load failed. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
EFI_INVALID_PARAMETER | FileName is a directory. |
Definition at line 777 of file FileBuffer.c.
EFI_STATUS FileBufferRefresh | ( | VOID | ) |
Refresh the screen with whats in the buffer.
EFI_SUCCESS | The refresh was successful. |
EFI_LOAD_ERROR | There was an error finding what to write. |
Definition at line 551 of file FileBuffer.c.
Replace SearchLen characters from current position on with Replace.
This will modify the current buffer at the current position.
[in] | Replace | The string to replace. |
[in] | SearchLen | Search string's length. |
EFI_SUCCESS | The operation was successful. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
Definition at line 3052 of file FileBuffer.c.
EFI_STATUS FileBufferReplaceAll | ( | IN CHAR16 * | SearchStr, |
IN CHAR16 * | ReplaceStr, | ||
IN UINTN | Offset | ||
) |
Search and replace operation.
[in] | SearchStr | The string to search for. |
[in] | ReplaceStr | The string to replace with. |
[in] | Offset | The column to start at. |
Definition at line 3235 of file FileBuffer.c.
EFI_STATUS FileBufferRestorePosition | ( | VOID | ) |
Set the cursor position according to FileBuffer.DisplayPosition.
EFI_SUCCESS | The operation was successful. |
Definition at line 530 of file FileBuffer.c.
EFI_STATUS FileBufferSave | ( | CONST CHAR16 * | FileName | ) |
Save lines in FileBuffer to disk
[in] | FileName | The file name for writing. |
EFI_SUCCESS | Data was written. |
EFI_LOAD_ERROR | |
EFI_OUT_OF_RESOURCES | There were not enough resources to write the file. |
Search string from current position on in file
[in] | Str | The search string. |
[in] | Offset | The offset from current position. |
EFI_SUCCESS | The operation was successful. |
EFI_NOT_FOUND | The string Str was not found. |
Definition at line 2947 of file FileBuffer.c.
EFI_STATUS FileBufferSetFileName | ( | IN CONST CHAR16 * | Str | ) |
Set FileName field in FileBuffer.
Str | The file name to set. |
EFI_SUCCESS | The filename was successfully set. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
EFI_INVALID_PARAMETER | Str is not a valid filename. |
Definition at line 719 of file FileBuffer.c.
VOID FileBufferSetModified | ( | VOID | ) |
Set the modified state to TRUE.
Definition at line 3354 of file FileBuffer.c.