1 | /** @file
|
---|
2 | Declares imputbar interface functions.
|
---|
3 |
|
---|
4 | Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #ifndef _LIB_INPUT_BAR_H_
|
---|
10 | #define _LIB_INPUT_BAR_H_
|
---|
11 |
|
---|
12 | /**
|
---|
13 | Initialize the input bar.
|
---|
14 |
|
---|
15 | @param[in] TextInEx Pointer to SimpleTextInEx instance in System Table.
|
---|
16 | **/
|
---|
17 | VOID
|
---|
18 | InputBarInit (
|
---|
19 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
|
---|
20 | );
|
---|
21 |
|
---|
22 | /**
|
---|
23 | Cleanup function for input bar.
|
---|
24 | **/
|
---|
25 | VOID
|
---|
26 | InputBarCleanup (
|
---|
27 | VOID
|
---|
28 | );
|
---|
29 |
|
---|
30 | /**
|
---|
31 | The refresh function for InputBar, it will wait for user input
|
---|
32 |
|
---|
33 | @param[in] LastRow The last printable row.
|
---|
34 | @param[in] LastColumn The last printable column.
|
---|
35 |
|
---|
36 | @retval EFI_SUCCESS The operation was successful.
|
---|
37 | **/
|
---|
38 | EFI_STATUS
|
---|
39 | InputBarRefresh (
|
---|
40 | UINTN LastRow,
|
---|
41 | UINTN LastColumn
|
---|
42 | );
|
---|
43 |
|
---|
44 | /**
|
---|
45 | SetPrompt and wait for input.
|
---|
46 |
|
---|
47 | @param[in] Str The prompt string.
|
---|
48 |
|
---|
49 | @retval EFI_SUCCESS The operation was successful.
|
---|
50 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
---|
51 | **/
|
---|
52 | EFI_STATUS
|
---|
53 | InputBarSetPrompt (
|
---|
54 | IN CONST CHAR16 *Str
|
---|
55 | );
|
---|
56 |
|
---|
57 | /**
|
---|
58 | Set the size of the string in characters.
|
---|
59 |
|
---|
60 | @param[in] Size The max number of characters to accept.
|
---|
61 |
|
---|
62 | @retval EFI_SUCCESS The operation was successful.
|
---|
63 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
---|
64 | **/
|
---|
65 | EFI_STATUS
|
---|
66 | InputBarSetStringSize (
|
---|
67 | UINTN Size
|
---|
68 | );
|
---|
69 |
|
---|
70 | /**
|
---|
71 | Function to retrieve the input from the user.
|
---|
72 |
|
---|
73 | @retval NULL No input has been received.
|
---|
74 | @return The string that was input.
|
---|
75 | **/
|
---|
76 | CONST CHAR16*
|
---|
77 | InputBarGetString (
|
---|
78 | VOID
|
---|
79 | );
|
---|
80 |
|
---|
81 | #endif
|
---|