2001-05-15 03:50:25 +00:00
/*
* FreeLoader
2002-01-19 00:37:06 +00:00
* Copyright ( C ) 1998 - 2002 Brian Palmer < brianp @ sginet . com >
2001-05-15 03:50:25 +00:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
*/
2002-06-06 05:58:37 +00:00
# ifndef __UI_H
# define __UI_H
2001-05-15 03:50:25 +00:00
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
extern U32 UiScreenWidth ; // Screen Width
extern U32 UiScreenHeight ; // Screen Height
2001-05-15 03:50:25 +00:00
2002-06-06 05:58:37 +00:00
extern UCHAR UiStatusBarFgColor ; // Status bar foreground color
extern UCHAR UiStatusBarBgColor ; // Status bar background color
extern UCHAR UiBackdropFgColor ; // Backdrop foreground color
extern UCHAR UiBackdropBgColor ; // Backdrop background color
extern UCHAR UiBackdropFillStyle ; // Backdrop fill style
extern UCHAR UiTitleBoxFgColor ; // Title box foreground color
extern UCHAR UiTitleBoxBgColor ; // Title box background color
extern UCHAR UiMessageBoxFgColor ; // Message box foreground color
extern UCHAR UiMessageBoxBgColor ; // Message box background color
extern UCHAR UiMenuFgColor ; // Menu foreground color
extern UCHAR UiMenuBgColor ; // Menu background color
extern UCHAR UiTextColor ; // Normal text color
extern UCHAR UiSelectedTextColor ; // Selected text color
extern UCHAR UiSelectedTextBgColor ; // Selected text background color
extern UCHAR UiTitleBoxTitleText [ 260 ] ; // Title box's title text
2001-05-15 03:50:25 +00:00
2002-06-06 05:58:37 +00:00
extern PUCHAR UiMessageBoxLineText ;
2001-05-15 03:50:25 +00:00
2002-06-06 05:58:37 +00:00
extern BOOL UserInterfaceUp ; // Tells us if the user interface is displayed
2001-05-15 03:50:25 +00:00
2002-11-24 19:10:06 +00:00
extern BOOL UiUseSpecialEffects ; // Tells us if we should use fade effects
2002-06-06 05:58:37 +00:00
extern UCHAR UiMonthNames [ 12 ] [ 15 ] ;
2001-05-15 03:50:25 +00:00
2002-06-06 05:58:37 +00:00
///////////////////////////////////////////////////////////////////////////////////////
//
// User Interface Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL UiInitialize ( VOID ) ; // Initialize User-Interface
2002-11-24 19:10:06 +00:00
VOID UiUnInitialize ( PUCHAR BootText ) ; // Un-initialize User-Interface
2002-06-06 05:58:37 +00:00
VOID UiDrawBackdrop ( VOID ) ; // Fills the entire screen with a backdrop
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
VOID UiFillArea ( U32 Left , U32 Top , U32 Right , U32 Bottom , UCHAR FillChar , UCHAR Attr /* Color Attributes */ ) ; // Fills the area specified with FillChar and Attr
VOID UiDrawShadow ( U32 Left , U32 Top , U32 Right , U32 Bottom ) ; // Draws a shadow on the bottom and right sides of the area specified
VOID UiDrawBox ( U32 Left , U32 Top , U32 Right , U32 Bottom , UCHAR VertStyle , UCHAR HorzStyle , BOOL Fill , BOOL Shadow , UCHAR Attr ) ; // Draws a box around the area specified
VOID UiDrawText ( U32 X , U32 Y , PUCHAR Text , UCHAR Attr ) ; // Draws text at coordinates specified
VOID UiDrawCenteredText ( U32 Left , U32 Top , U32 Right , U32 Bottom , PUCHAR TextString , UCHAR Attr ) ; // Draws centered text at the coordinates specified and clips the edges
2002-06-06 05:58:37 +00:00
VOID UiDrawStatusText ( PUCHAR StatusText ) ; // Draws text at the very bottom line on the screen
VOID UiUpdateDateTime ( VOID ) ; // Updates the date and time
2002-11-24 19:10:06 +00:00
VOID UiInfoBox ( PUCHAR MessageText ) ; // Displays a info box on the screen
2002-06-06 05:58:37 +00:00
VOID UiMessageBox ( PUCHAR MessageText ) ; // Displays a message box on the screen with an ok button
VOID UiMessageBoxCritical ( PUCHAR MessageText ) ; // Displays a message box on the screen with an ok button using no system resources
VOID UiMessageLine ( PUCHAR MessageText ) ; // Adds a line of text to the message box buffer
2002-12-06 04:43:02 +00:00
VOID UiDrawProgressBarCenter ( U32 Position , U32 Range , PUCHAR ProgressText ) ; // Draws the progress bar showing nPos percent filled
VOID UiDrawProgressBar ( U32 Left , U32 Top , U32 Right , U32 Bottom , U32 Position , U32 Range , PUCHAR ProgressText ) ; // Draws the progress bar showing nPos percent filled
2002-06-06 05:58:37 +00:00
VOID UiShowMessageBoxesInSection ( PUCHAR SectionName ) ; // Displays all the message boxes in a given section
UCHAR UiTextToColor ( PUCHAR ColorText ) ; // Converts the text color into it's equivalent color value
UCHAR UiTextToFillStyle ( PUCHAR FillStyleText ) ; // Converts the text fill into it's equivalent fill value
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
VOID UiTruncateStringEllipsis ( PUCHAR StringText , U32 MaxChars ) ; // Truncates a string to MaxChars by adding an ellipsis on the end '...'
2001-11-28 10:26:53 +00:00
2002-11-24 19:10:06 +00:00
VOID UiFadeInBackdrop ( VOID ) ; // Draws the backdrop and fades the screen in
VOID UiFadeOut ( VOID ) ; // Fades the screen out
2001-11-28 10:26:53 +00:00
///////////////////////////////////////////////////////////////////////////////////////
//
// Menu Functions
//
///////////////////////////////////////////////////////////////////////////////////////
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
BOOL UiDisplayMenu ( PUCHAR MenuItemList [ ] , U32 MenuItemCount , U32 DefaultMenuItem , S32 MenuTimeOut , U32 * SelectedMenuItem ) ;
2002-06-06 05:58:37 +00:00
2001-11-28 10:26:53 +00:00
2002-06-06 05:58:37 +00:00
# endif // #defined __UI_H