/** @file
Implements statusbar interface functions.
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "EditStatusBar.h"
#include "UefiShellDebug1CommandsLib.h"
/**
Initialization function for Status Bar.
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@sa StatusBarSetStatusString
**/
)
{
//
// initialize the statusbar
//
StatusString = NULL;
//
// status string set to ""
//
return (StatusBarSetStatusString (L""));
}
/**
Cleanup function for the status bar.
**/
)
{
//
// free the status string and backvar's status string
//
}
typedef struct {
typedef union {
/**
Cause the status bar to refresh it's printing on the screen.
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
FALSE otherwise.
@param[in] LastRow LastPrintable row.
@param[in] LastCol Last printable column.
@param[in] FileRow Row in the file.
@param[in] FileCol Column in the file.
@param[in] InsertMode TRUE to indicate InsertMode. FALSE otherwise.
@retval EFI_SUCCESS The operation was successful.
**/
)
{
if (!StatusStringChanged && StatusBarNeedRefresh) {
StatusBarSetStatusString (L"\0");
}
//
// when it's called first time after editor launch, so refresh is mandatory
//
if (!StatusBarNeedRefresh && !StatusStringChanged) {
return EFI_SUCCESS;
}
//
// back up the screen attributes
//
//
// clear status bar
//
//
// print row, column fields
//
0,
L" %d,%d %s",
);
} else {
0,
L" %s",
);
}
//
// print insert mode field
//
if (InsertMode) {
} else {
}
//
// restore the old screen attributes
//
//
// restore position in edit area
//
return EFI_SUCCESS;
}
/**
Set the status string text part.
@param[in] Str The string to use.
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
**/
)
{
//
// free the old status string
//
if (StatusString == NULL) {
return EFI_OUT_OF_RESOURCES;
}
return EFI_SUCCESS;
}
/**
Function to retrieve the current status string.
@return The string that is used.
**/
)
{
return (StatusString);
}
/**
Function to set the need refresh boolean to TRUE.
**/
)
{
}
/**
Function to get the need refresh boolean to TRUE.
@retval TRUE The status bar needs to be refreshed.
**/
)
{
return (StatusBarNeedRefresh);
}