• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 MainTitleBarInit (
28   CONST CHAR16 *Prompt
29   );
30 
31 /**
32   Clean up the memory used.
33 **/
34 VOID
35 MainTitleBarCleanup (
36   VOID
37   );
38 
39 typedef enum {
40   FileTypeNone,
41   FileTypeAscii,
42   FileTypeUnicode,
43   FileTypeDiskBuffer,
44   FileTypeMemBuffer,
45   FileTypeFileBuffer
46 } EDIT_FILE_TYPE;
47 
48 /**
49   Refresh function for MainTitleBar
50 
51   @param[in] FileName           The open file's name (or NULL).
52   @param[in] FileType           The type fo the file.
53   @param[in] ReadOnly           TRUE if the file is read only.  FALSE otherwise.
54   @param[in] Modified           TRUE if the file was modified.  FALSE otherwise.
55   @param[in] LastCol            The last printable column.
56   @param[in] LastRow            The last printable row.
57   @param[in] Offset             The offset into the file. (only for mem/disk)
58   @param[in] Size               The file's size. (only for mem/disk)
59 
60   @retval EFI_SUCCESS           The operation was successful.
61 **/
62 EFI_STATUS
63 MainTitleBarRefresh (
64   IN CONST CHAR16                 *FileName OPTIONAL,
65   IN CONST EDIT_FILE_TYPE         FileType,
66   IN CONST BOOLEAN                ReadOnly,
67   IN CONST BOOLEAN                Modified,
68   IN CONST UINTN                  LastCol,
69   IN CONST UINTN                  LastRow,
70   IN CONST UINTN                  Offset,
71   IN CONST UINTN                  Size
72   );
73 
74 #endif
75