]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.h
e7e6c786804578a12561afbacbef6d30f8b1d29d
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditInputBar.h
1 /** @file
2 Declares imputbar interface functions.
3
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
9
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.
12
13 **/
14
15 #ifndef _LIB_INPUT_BAR_H_
16 #define _LIB_INPUT_BAR_H_
17
18 /**
19 Initialize the input bar.
20
21 @param[in] TextInEx Pointer to SimpleTextInEx instance in System Table.
22 **/
23 VOID
24 InputBarInit (
25 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
26 );
27
28 /**
29 Cleanup function for input bar.
30 **/
31 VOID
32 InputBarCleanup (
33 VOID
34 );
35
36 /**
37 The refresh function for InputBar, it will wait for user input
38
39 @param[in] LastRow The last printable row.
40 @param[in] LastColumn The last printable column.
41
42 @retval EFI_SUCCESS The operation was successful.
43 **/
44 EFI_STATUS
45 InputBarRefresh (
46 UINTN LastRow,
47 UINTN LastColumn
48 );
49
50 /**
51 SetPrompt and wait for input.
52
53 @param[in] Str The prompt string.
54
55 @retval EFI_SUCCESS The operation was successful.
56 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
57 **/
58 EFI_STATUS
59 InputBarSetPrompt (
60 IN CONST CHAR16 *Str
61 );
62
63 /**
64 Set the size of the string in characters.
65
66 @param[in] Size The max number of characters to accept.
67
68 @retval EFI_SUCCESS The operation was successful.
69 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
70 **/
71 EFI_STATUS
72 InputBarSetStringSize (
73 UINTN Size
74 );
75
76 /**
77 Function to retrieve the input from the user.
78
79 @retval NULL No input has been received.
80 @return The string that was input.
81 **/
82 CONST CHAR16*
83 InputBarGetString (
84 VOID
85 );
86
87 #endif