TianoCore EDK2 master
Loading...
Searching...
No Matches
MainHexEditor.c File Reference
#include "HexEditor.h"
#include "EditStatusBar.h"
#include "EditInputBar.h"

Go to the source code of this file.

Functions

EFI_STATUS HMainCommandDisplayHelp (VOID)
 
EFI_STATUS HMainCommandGoToOffset (VOID)
 
EFI_STATUS HMainCommandSaveBuffer (VOID)
 
EFI_STATUS HMainCommandSelectStart (VOID)
 
EFI_STATUS HMainCommandSelectEnd (VOID)
 
EFI_STATUS HMainCommandCut (VOID)
 
EFI_STATUS HMainCommandPaste (VOID)
 
EFI_STATUS HMainCommandExit (VOID)
 
EFI_STATUS HMainCommandOpenFile (VOID)
 
EFI_STATUS HMainCommandOpenDisk (VOID)
 
EFI_STATUS HMainCommandOpenMemory (VOID)
 
EFI_STATUS HMainEditorInit (VOID)
 
EFI_STATUS HMainEditorCleanup (VOID)
 
EFI_STATUS HMainEditorRefresh (VOID)
 
EFI_STATUS HMainEditorHandleMouseInput (IN EFI_SIMPLE_POINTER_STATE MouseState, OUT BOOLEAN *BeforeLeftButtonDown)
 
EFI_STATUS HMainEditorKeyInput (VOID)
 
VOID HMainEditorBackup (VOID)
 

Variables

HEFI_EDITOR_COLOR_ATTRIBUTES HOriginalColors
 
INTN HOriginalMode
 
BOOLEAN HEditorFirst
 
BOOLEAN HEditorExit
 
BOOLEAN HEditorMouseAction
 
HEFI_EDITOR_BUFFER_IMAGE HBufferImage
 
HEFI_EDITOR_BUFFER_IMAGE HBufferImageBackupVar
 
BOOLEAN HBufferImageMouseNeedRefresh
 
BOOLEAN HBufferImageNeedRefresh
 
BOOLEAN HBufferImageOnlyLineNeedRefresh
 
HEFI_EDITOR_GLOBAL_EDITOR HMainEditor
 
HEFI_EDITOR_GLOBAL_EDITOR HMainEditorBackupVar
 
HEFI_EDITOR_GLOBAL_EDITOR HMainEditorConst
 
EFI_STRING_ID HexMainMenuHelpInfo []
 
MENU_ITEM_FUNCTION HexMainControlBasedMenuFunctions []
 
CONST EDITOR_MENU_ITEM HexEditorMenuItems []
 

Detailed Description

Defines the Main Editor data type -

  • Global variables
  • Instances of the other objects of the editor
  • Main Interfaces

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file MainHexEditor.c.

Function Documentation

◆ HMainCommandCut()

EFI_STATUS HMainCommandCut ( VOID  )

Cut current line to clipboard.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 641 of file MainHexEditor.c.

◆ HMainCommandDisplayHelp()

EFI_STATUS HMainCommandDisplayHelp ( VOID  )

show help menu.

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 98 of file MainHexEditor.c.

◆ HMainCommandExit()

EFI_STATUS HMainCommandExit ( VOID  )

Exit editor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 772 of file MainHexEditor.c.

◆ HMainCommandGoToOffset()

EFI_STATUS HMainCommandGoToOffset ( VOID  )

Move cursor to specified lines.

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 177 of file MainHexEditor.c.

◆ HMainCommandOpenDisk()

EFI_STATUS HMainCommandOpenDisk ( VOID  )

Load a disk buffer editor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.
EFI_NOT_FOUNDThe disk was not found.

Definition at line 1100 of file MainHexEditor.c.

◆ HMainCommandOpenFile()

EFI_STATUS HMainCommandOpenFile ( VOID  )

Load a file from disk to editor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 862 of file MainHexEditor.c.

◆ HMainCommandOpenMemory()

EFI_STATUS HMainCommandOpenMemory ( VOID  )

Load memory content to editor

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.
EFI_NOT_FOUNDThe disk was not found.

Definition at line 1348 of file MainHexEditor.c.

◆ HMainCommandPaste()

EFI_STATUS HMainCommandPaste ( VOID  )

Paste line to file buffer.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 715 of file MainHexEditor.c.

◆ HMainCommandSaveBuffer()

EFI_STATUS HMainCommandSaveBuffer ( VOID  )

Save current opened buffer. If is file buffer, you can save to current file name or save to another file name.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 260 of file MainHexEditor.c.

◆ HMainCommandSelectEnd()

EFI_STATUS HMainCommandSelectEnd ( VOID  )

Load a disk buffer editor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 603 of file MainHexEditor.c.

◆ HMainCommandSelectStart()

EFI_STATUS HMainCommandSelectStart ( VOID  )

Load a disk buffer editor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 565 of file MainHexEditor.c.

◆ HMainEditorBackup()

VOID HMainEditorBackup ( VOID  )

Backup function for MainEditor.

Definition at line 2396 of file MainHexEditor.c.

◆ HMainEditorCleanup()

EFI_STATUS HMainEditorCleanup ( VOID  )

Cleanup function for MainEditor.

Return values
EFI_SUCCESSThe operation was successful.
EFI_LOAD_ERRORA load error occurred.

Definition at line 1813 of file MainHexEditor.c.

◆ HMainEditorHandleMouseInput()

EFI_STATUS HMainEditorHandleMouseInput ( IN EFI_SIMPLE_POINTER_STATE  MouseState,
OUT BOOLEAN *  BeforeLeftButtonDown 
)

Handle the mouse input.

Parameters
[in]MouseStateThe current mouse state.
[out]BeforeLeftButtonDownhelps with selections.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.
EFI_NOT_FOUNDThe disk was not found.

Definition at line 1974 of file MainHexEditor.c.

◆ HMainEditorInit()

EFI_STATUS HMainEditorInit ( VOID  )

Init function for MainEditor

Return values
EFI_SUCCESSThe operation was successful.
EFI_LOAD_ERRORA load error occurred.

Definition at line 1653 of file MainHexEditor.c.

◆ HMainEditorKeyInput()

EFI_STATUS HMainEditorKeyInput ( VOID  )

Handle user key input. will route it to other components handle function.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation occurred.
EFI_LOAD_ERRORA load error occurred.

Definition at line 2129 of file MainHexEditor.c.

◆ HMainEditorRefresh()

EFI_STATUS HMainEditorRefresh ( VOID  )

Refresh function for MainEditor.

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 1862 of file MainHexEditor.c.

Variable Documentation

◆ HBufferImage

HEFI_EDITOR_BUFFER_IMAGE HBufferImage
extern

Definition at line 27 of file BufferImage.c.

◆ HBufferImageBackupVar

HEFI_EDITOR_BUFFER_IMAGE HBufferImageBackupVar
extern

Definition at line 28 of file BufferImage.c.

◆ HBufferImageMouseNeedRefresh

BOOLEAN HBufferImageMouseNeedRefresh
extern

Definition at line 69 of file BufferImage.c.

◆ HBufferImageNeedRefresh

BOOLEAN HBufferImageNeedRefresh
extern

Definition at line 62 of file BufferImage.c.

◆ HBufferImageOnlyLineNeedRefresh

BOOLEAN HBufferImageOnlyLineNeedRefresh
extern

Definition at line 67 of file BufferImage.c.

◆ HEditorExit

BOOLEAN HEditorExit

Definition at line 27 of file MainHexEditor.c.

◆ HEditorFirst

BOOLEAN HEditorFirst

Definition at line 22 of file MainHexEditor.c.

◆ HEditorMouseAction

BOOLEAN HEditorMouseAction

Definition at line 29 of file MainHexEditor.c.

◆ HexEditorMenuItems

CONST EDITOR_MENU_ITEM HexEditorMenuItems[]

Definition at line 1585 of file MainHexEditor.c.

◆ HexMainControlBasedMenuFunctions

MENU_ITEM_FUNCTION HexMainControlBasedMenuFunctions[]
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
EFI_STATUS HMainCommandCut(VOID)
EFI_STATUS HMainCommandDisplayHelp(VOID)
Definition: MainHexEditor.c:98
EFI_STATUS HMainCommandGoToOffset(VOID)
EFI_STATUS HMainCommandOpenDisk(VOID)
EFI_STATUS HMainCommandExit(VOID)
EFI_STATUS HMainCommandOpenFile(VOID)
EFI_STATUS HMainCommandSaveBuffer(VOID)
EFI_STATUS HMainCommandSelectEnd(VOID)
EFI_STATUS HMainCommandOpenMemory(VOID)
EFI_STATUS HMainCommandSelectStart(VOID)
EFI_STATUS HMainCommandPaste(VOID)
#define NULL
Definition: Base.h:319

Definition at line 1555 of file MainHexEditor.c.

◆ HexMainMenuHelpInfo

EFI_STRING_ID HexMainMenuHelpInfo[]
Initial value:
= {
STRING_TOKEN (STR_HEXEDIT_HELP_TITLE),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_LIST_TITLE),
STRING_TOKEN (STR_HEXEDIT_HELP_DIV),
STRING_TOKEN (STR_HEXEDIT_HELP_GO_TO_OFFSET),
STRING_TOKEN (STR_HEXEDIT_HELP_SAVE_BUFFER),
STRING_TOKEN (STR_HEXEDIT_HELP_EXIT),
STRING_TOKEN (STR_HEXEDIT_HELP_SELECT_START),
STRING_TOKEN (STR_HEXEDIT_HELP_SELECT_END),
STRING_TOKEN (STR_HEXEDIT_HELP_CUT),
STRING_TOKEN (STR_HEXEDIT_HELP_PASTE),
STRING_TOKEN (STR_HEXEDIT_HELP_OPEN_FILE),
STRING_TOKEN (STR_HEXEDIT_HELP_OPEN_DISK),
STRING_TOKEN (STR_HEXEDIT_HELP_OPEN_MEMORY),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_EXIT_HELP),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_BLANK),
STRING_TOKEN (STR_HEXEDIT_HELP_DIV),
0
}
#define STRING_TOKEN(t)

Help info that will be displayed.

Definition at line 65 of file MainHexEditor.c.

◆ HMainEditor

Definition at line 38 of file MainHexEditor.c.

◆ HMainEditorBackupVar

HEFI_EDITOR_GLOBAL_EDITOR HMainEditorBackupVar

Definition at line 39 of file MainHexEditor.c.

◆ HMainEditorConst

HEFI_EDITOR_GLOBAL_EDITOR HMainEditorConst
Initial value:
= {
&HBufferImage,
{
{ 0, 0}
},
{
0,
0
},
0,
0,
1,
1
}
#define FALSE
Definition: Base.h:307

Definition at line 44 of file MainHexEditor.c.

◆ HOriginalColors

Definition at line 16 of file MainHexEditor.c.

◆ HOriginalMode

INTN HOriginalMode

Definition at line 17 of file MainHexEditor.c.