TianoCore EDK2 master
Loading...
Searching...
No Matches
Clipboard.c
Go to the documentation of this file.
1
9#include "HexEditor.h"
10
11typedef struct {
12 UINT8 *Buffer;
13 UINTN Size;
15
16HEFI_EDITOR_CLIPBOARD HClipBoard;
17
18//
19// for basic initialization of HClipBoard
20//
21HEFI_EDITOR_CLIPBOARD HClipBoardConst = {
22 NULL,
23 0
24};
25
34 VOID
35 )
36{
37 //
38 // basiclly initialize the HDiskImage
39 //
40 CopyMem (&HClipBoard, &HClipBoardConst, sizeof (HClipBoard));
41
42 return EFI_SUCCESS;
43}
44
53 VOID
54 )
55{
56 SHELL_FREE_NON_NULL (HClipBoard.Buffer);
57
58 return EFI_SUCCESS;
59}
60
71 IN UINT8 *Buffer,
72 IN UINTN Size
73 )
74{
75 //
76 // free the old clipboard buffer
77 // and set new clipboard buffer
78 //
79 SHELL_FREE_NON_NULL (HClipBoard.Buffer);
80 HClipBoard.Buffer = Buffer;
81
82 HClipBoard.Size = Size;
83
84 return EFI_SUCCESS;
85}
86
96 OUT UINT8 **Buffer
97 )
98{
99 //
100 // return the clipboard buffer
101 //
102 *Buffer = HClipBoard.Buffer;
103
104 return HClipBoard.Size;
105}
UINT64 UINTN
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
UINTN HClipBoardGet(OUT UINT8 **Buffer)
Definition: Clipboard.c:95
EFI_STATUS HClipBoardInit(VOID)
Definition: Clipboard.c:33
EFI_STATUS HClipBoardSet(IN UINT8 *Buffer, IN UINTN Size)
Definition: Clipboard.c:70
EFI_STATUS HClipBoardCleanup(VOID)
Definition: Clipboard.c:52
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112