2 Functions to deal with Clip Board
4 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
14 } HEFI_EDITOR_CLIPBOARD
;
16 HEFI_EDITOR_CLIPBOARD HClipBoard
;
19 // for basic initialization of HClipBoard
21 HEFI_EDITOR_CLIPBOARD HClipBoardConst
= {
27 Initialization function for HDiskImage.
29 @param[in] EFI_SUCCESS The operation was successful.
30 @param[in] EFI_LOAD_ERROR A load error occurred.
38 // basiclly initialize the HDiskImage
40 CopyMem (&HClipBoard
, &HClipBoardConst
, sizeof (HClipBoard
));
46 Initialization function for HDiskImage.
48 @param[in] EFI_SUCCESS The operation was successful.
49 @param[in] EFI_LOAD_ERROR A load error occurred.
56 SHELL_FREE_NON_NULL (HClipBoard
.Buffer
);
62 Set a buffer into the clipboard.
64 @param[in] Buffer The buffer to add to the clipboard.
65 @param[in] Size The size of Buffer in bytes.
67 @retval EFI_SUCCESS The operation was successful.
76 // free the old clipboard buffer
77 // and set new clipboard buffer
79 SHELL_FREE_NON_NULL (HClipBoard
.Buffer
);
80 HClipBoard
.Buffer
= Buffer
;
82 HClipBoard
.Size
= Size
;
88 Get a buffer from the clipboard.
90 @param[out] Buffer The pointer to the buffer to add to the clipboard.
92 @return the size of the buffer.
100 // return the clipboard buffer
102 *Buffer
= HClipBoard
.Buffer
;
104 return HClipBoard
.Size
;