2 Functions to deal with Clip Board
4 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "HexEditor.h"
20 } HEFI_EDITOR_CLIPBOARD
;
22 HEFI_EDITOR_CLIPBOARD HClipBoard
;
25 // for basic initialization of HClipBoard
27 HEFI_EDITOR_CLIPBOARD HClipBoardConst
= {
33 Initialization function for HDiskImage.
35 @param[in] EFI_SUCCESS The operation was successful.
36 @param[in] EFI_LOAD_ERROR A load error occured.
44 // basiclly initialize the HDiskImage
46 CopyMem (&HClipBoard
, &HClipBoardConst
, sizeof (HClipBoard
));
52 Initialization function for HDiskImage.
54 @param[in] EFI_SUCCESS The operation was successful.
55 @param[in] EFI_LOAD_ERROR A load error occured.
63 SHELL_FREE_NON_NULL (HClipBoard
.Buffer
);
69 Set a buffer into the clipboard.
71 @param[in] Buffer The buffer to add to the clipboard.
72 @param[in] Size The size of Buffer in bytes.
74 @retval EFI_SUCCESS The operation was successful.
83 // free the old clipboard buffer
84 // and set new clipboard buffer
86 SHELL_FREE_NON_NULL (HClipBoard
.Buffer
);
87 HClipBoard
.Buffer
= Buffer
;
89 HClipBoard
.Size
= Size
;
95 Get a buffer from the clipboard.
97 @param[out] Buffer The pointer to the buffer to add to the clipboard.
99 @return the size of the buffer.
107 // return the clipboard buffer
109 *Buffer
= HClipBoard
.Buffer
;
111 return HClipBoard
.Size
;