1 /** @file
2   Declares titlebar interface functions.
3 
4   Copyright (c) 2005 - 2011, 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_TITLE_BAR_H_
16 #define _LIB_TITLE_BAR_H_
17 
18 /**
19   Initialize a title bar.
20 
21   @param[in] Prompt             The prompt to print in the title bar.
22 
23   @retval EFI_SUCCESS           The initialization was successful.
24   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.
25 **/
26 EFI_STATUS
27 EFIAPI
28 MainTitleBarInit (
29   CONST CHAR16 *Prompt
30   );
31 
32 /**
33   Clean up the memory used.
34 **/
35 VOID
36 EFIAPI
37 MainTitleBarCleanup (
38   VOID
39   );
40 
41 typedef enum {
42   FileTypeNone,
43   FileTypeAscii,
44   FileTypeUnicode,
45   FileTypeDiskBuffer,
46   FileTypeMemBuffer,
47   FileTypeFileBuffer
48 } EDIT_FILE_TYPE;
49 
50 /**
51   Refresh function for MainTitleBar
52 
53   @param[in] FileName           The open file's name (or NULL).
54   @param[in] FileType           The type fo the file.
55   @param[in] ReadOnly           TRUE if the file is read only.  FALSE otherwise.
56   @param[in] Modified           TRUE if the file was modified.  FALSE otherwise.
57   @param[in] LastCol            The last printable column.
58   @param[in] LastRow            The last printable row.
59   @param[in] Offset             The offset into the file. (only for mem/disk)
60   @param[in] Size               The file's size. (only for mem/disk)
61 
62   @retval EFI_SUCCESS           The operation was successful.
63 **/
64 EFI_STATUS
65 EFIAPI
66 MainTitleBarRefresh (
67   IN CONST CHAR16                 *FileName OPTIONAL,
68   IN CONST EDIT_FILE_TYPE         FileType,
69   IN CONST BOOLEAN                ReadOnly,
70   IN CONST BOOLEAN                Modified,
71   IN CONST UINTN                  LastCol,
72   IN CONST UINTN                  LastRow,
73   IN CONST UINTN                  Offset,
74   IN CONST UINTN                  Size
75   );
76 
77 #endif
78