ReactOS  0.4.15-dev-4916-gd519b11
ui.c File Reference
#include <freeldr.h>
#include <debug.h>
Include dependency graph for ui.c:

Go to the source code of this file.

Macros

#define TAG_UI_TEXT   'xTiU'
 

Functions

 DBG_DEFAULT_CHANNEL (UI)
 
BOOLEAN UiInitialize (BOOLEAN ShowUi)
 
VOID UiUnInitialize (PCSTR BootText)
 
VOID UiDrawBackdrop (VOID)
 
VOID UiFillArea (ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
 
VOID UiDrawShadow (ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
 
VOID UiDrawBox (ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
 
VOID UiDrawText (_In_ ULONG X, _In_ ULONG Y, _In_ PCSTR Text, _In_ UCHAR Attr)
 
VOID UiDrawText2 (_In_ ULONG X, _In_ ULONG Y, _In_opt_ ULONG MaxNumChars, _In_reads_or_z_(MaxNumChars) PCSTR Text, _In_ UCHAR Attr)
 
VOID UiDrawCenteredText (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR TextString, _In_ UCHAR Attr)
 
VOID UiDrawStatusText (PCSTR StatusText)
 
VOID UiUpdateDateTime (VOID)
 
VOID UiInfoBox (PCSTR MessageText)
 
VOID UiMessageBox (PCSTR Format,...)
 
VOID UiMessageBoxCritical (PCSTR MessageText)
 
UCHAR UiTextToColor (PCSTR ColorText)
 
UCHAR UiTextToFillStyle (PCSTR FillStyleText)
 
VOID UiInitProgressBar (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
 
VOID UiIndicateProgress (VOID)
 
VOID UiSetProgressBarSubset (_In_ ULONG Floor, _In_ ULONG Ceiling)
 
VOID UiUpdateProgressBar (_In_ ULONG Percentage, _In_opt_ PCSTR ProgressText)
 
VOID UiSetProgressBarText (_In_ PCSTR ProgressText)
 
VOID UiDrawProgressBarCenter (_In_ PCSTR ProgressText)
 
VOID UiDrawProgressBar (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
 
static VOID UiEscapeString (PCHAR String)
 
VOID UiShowMessageBoxesInSection (IN ULONG_PTR SectionId)
 
VOID UiShowMessageBoxesInArgv (IN ULONG Argc, IN PCHAR Argv[])
 
BOOLEAN UiDisplayMenu (IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN BOOLEAN ShowBootOptions, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
 
VOID UiFadeInBackdrop (VOID)
 
VOID UiFadeOut (VOID)
 
BOOLEAN UiEditBox (PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
 

Variables

UCHAR UiStatusBarFgColor
 
UCHAR UiStatusBarBgColor
 
UCHAR UiBackdropFgColor
 
UCHAR UiBackdropBgColor
 
UCHAR UiBackdropFillStyle
 
UCHAR UiTitleBoxFgColor
 
UCHAR UiTitleBoxBgColor
 
UCHAR UiMessageBoxFgColor
 
UCHAR UiMessageBoxBgColor
 
UCHAR UiMenuFgColor
 
UCHAR UiMenuBgColor
 
UCHAR UiTextColor
 
UCHAR UiSelectedTextColor
 
UCHAR UiSelectedTextBgColor
 
UCHAR UiEditBoxTextColor
 
UCHAR UiEditBoxBgColor
 
BOOLEAN UiShowTime
 
BOOLEAN UiMenuBox
 
BOOLEAN UiCenterMenu
 
BOOLEAN UiUseSpecialEffects
 
CHAR UiTitleBoxTitleText [260] = "Boot Menu"
 
CHAR UiTimeText [260] = "[Time Remaining: %d]"
 
const PCSTR UiMonthNames [12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
 
ULONG UiScreenWidth
 
ULONG UiScreenHeight
 
UI_PROGRESS_BAR UiProgressBar = {{0}}
 
UIVTBL UiVtbl
 

Macro Definition Documentation

◆ TAG_UI_TEXT

#define TAG_UI_TEXT   'xTiU'

Definition at line 54 of file ui.c.

Function Documentation

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( UI  )

◆ UiDisplayMenu()

BOOLEAN UiDisplayMenu ( IN PCSTR  MenuHeader,
IN PCSTR MenuFooter  OPTIONAL,
IN BOOLEAN  ShowBootOptions,
IN PCSTR  MenuItemList[],
IN ULONG  MenuItemCount,
IN ULONG  DefaultMenuItem,
IN LONG  MenuTimeOut,
OUT PULONG  SelectedMenuItem,
IN BOOLEAN  CanEscape,
IN UiMenuKeyPressFilterCallback KeyPressFilter  OPTIONAL,
IN PVOID Context  OPTIONAL 
)

Definition at line 631 of file ui.c.

643 {
644  return UiVtbl.DisplayMenu(MenuHeader, MenuFooter, ShowBootOptions,
645  MenuItemList, MenuItemCount, DefaultMenuItem,
646  MenuTimeOut, SelectedMenuItem, CanEscape,
647  KeyPressFilter, Context);
648 }
UIVTBL UiVtbl
Definition: ui.c:70
BOOLEAN(* DisplayMenu)(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN BOOLEAN ShowBootOptions, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
Definition: ui.h:284

Referenced by DoOptionsMenu(), and RunLoader().

◆ UiDrawBackdrop()

VOID UiDrawBackdrop ( VOID  )

Definition at line 239 of file ui.c.

240 {
242 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* DrawBackdrop)(VOID)
Definition: ui.h:250

Referenced by DoOptionsMenu(), LoadAndBootWindows(), LoadReactOSSetup(), MiniTuiDrawMenu(), RunLoader(), TuiDrawMenu(), and UiUnInitialize().

◆ UiDrawBox()

VOID UiDrawBox ( ULONG  Left,
ULONG  Top,
ULONG  Right,
ULONG  Bottom,
UCHAR  VertStyle,
UCHAR  HorzStyle,
BOOLEAN  Fill,
BOOLEAN  Shadow,
UCHAR  Attr 
)

Definition at line 254 of file ui.c.

255 {
256  UiVtbl.DrawBox(Left, Top, Right, Bottom, VertStyle, HorzStyle, Fill, Shadow, Attr);
257 }
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:109
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* DrawBox)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: ui.h:253
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by TuiDrawMenuBox(), and UiInfoBox().

◆ UiDrawCenteredText()

VOID UiDrawCenteredText ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ PCSTR  TextString,
_In_ UCHAR  Attr 
)

Definition at line 281 of file ui.c.

288 {
289  UiVtbl.DrawCenteredText(Left, Top, Right, Bottom, TextString, Attr);
290 }
UIVTBL UiVtbl
Definition: ui.c:70
static LPHIST_ENTRY Bottom
Definition: history.c:54
VOID(* DrawCenteredText)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
Definition: ui.h:256
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by UiInfoBox().

◆ UiDrawProgressBar()

VOID UiDrawProgressBar ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ PCSTR  ProgressText 
)

Definition at line 514 of file ui.c.

520 {
521 #ifndef _M_ARM
522  UiVtbl.DrawProgressBar(Left, Top, Right, Bottom, ProgressText);
523 #else
524  MiniTuiDrawProgressBar(Left, Top, Right, Bottom, ProgressText);
525 #endif
526 }
VOID(* DrawProgressBar)(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
Definition: ui.h:265
UIVTBL UiVtbl
Definition: ui.c:70
VOID MiniTuiDrawProgressBar(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
Definition: minitui.c:178
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53

◆ UiDrawProgressBarCenter()

VOID UiDrawProgressBarCenter ( _In_ PCSTR  ProgressText)

Definition at line 503 of file ui.c.

505 {
506 #ifndef _M_ARM
507  UiVtbl.DrawProgressBarCenter(ProgressText);
508 #else
509  MiniTuiDrawProgressBarCenter(ProgressText);
510 #endif
511 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID MiniTuiDrawProgressBarCenter(_In_ PCSTR ProgressText)
Definition: minitui.c:153
VOID(* DrawProgressBarCenter)(_In_ PCSTR ProgressText)
Definition: ui.h:262

Referenced by LoadAndBootWindows(), LoadReactOSSetup(), and RamDiskLoadVirtualFile().

◆ UiDrawShadow()

VOID UiDrawShadow ( ULONG  Left,
ULONG  Top,
ULONG  Right,
ULONG  Bottom 
)

Definition at line 249 of file ui.c.

250 {
251  UiVtbl.DrawShadow(Left, Top, Right, Bottom);
252 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* DrawShadow)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: ui.h:252
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53

◆ UiDrawStatusText()

VOID UiDrawStatusText ( PCSTR  StatusText)

Definition at line 292 of file ui.c.

293 {
294  UiVtbl.DrawStatusText(StatusText);
295 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* DrawStatusText)(PCSTR StatusText)
Definition: ui.h:257

Referenced by LoadAndBootWindows(), LoadReactOSSetup(), NtLdrOutputLoadMsg(), TuiEditBox(), TuiMessageBoxCritical(), UiUnInitialize(), and WinLdrSetupEms().

◆ UiDrawText()

VOID UiDrawText ( _In_ ULONG  X,
_In_ ULONG  Y,
_In_ PCSTR  Text,
_In_ UCHAR  Attr 
)

Definition at line 260 of file ui.c.

265 {
266  UiVtbl.DrawText(X, Y, Text, Attr);
267 }
#define Y(I)
VOID(* DrawText)(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.h:254
UIVTBL UiVtbl
Definition: ui.c:70
char * Text
Definition: combotst.c:136

Referenced by DisplayBootTimeOptions(), TuiDrawMenu(), TuiDrawMenuItem(), TuiDrawMenuTimeout(), TuiEditBox(), and TuiMessageBoxCritical().

◆ UiDrawText2()

VOID UiDrawText2 ( _In_ ULONG  X,
_In_ ULONG  Y,
_In_opt_ ULONG  MaxNumChars,
_In_reads_or_z_(MaxNumChars) PCSTR  Text,
_In_ UCHAR  Attr 
)

Definition at line 270 of file ui.c.

276 {
277  UiVtbl.DrawText2(X, Y, MaxNumChars, Text, Attr);
278 }
#define Y(I)
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* DrawText2)(ULONG X, ULONG Y, ULONG MaxNumChars, PCSTR Text, UCHAR Attr)
Definition: ui.h:255
char * Text
Definition: combotst.c:136

Referenced by TuiEditBox().

◆ UiEditBox()

BOOLEAN UiEditBox ( PCSTR  MessageText,
PCHAR  EditTextBuffer,
ULONG  Length 
)

Definition at line 660 of file ui.c.

661 {
662  return UiVtbl.EditBox(MessageText, EditTextBuffer, Length);
663 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
UIVTBL UiVtbl
Definition: ui.c:70
BOOLEAN(* EditBox)(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.h:278

Referenced by DoOptionsMenu(), and EditCustomBootReactOS().

◆ UiEscapeString()

static VOID UiEscapeString ( PCHAR  String)
static

Definition at line 531 of file ui.c.

532 {
533  ULONG Idx;
534 
535  for (Idx=0; Idx<strlen(String); Idx++)
536  {
537  // Escape the new line characters
538  if (String[Idx] == '\\' && String[Idx+1] == 'n')
539  {
540  // Escape the character
541  String[Idx] = '\n';
542 
543  // Move the rest of the string up
544  strcpy(&String[Idx+1], &String[Idx+2]);
545  }
546  }
547 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
unsigned int ULONG
Definition: retypes.h:1

Referenced by UiShowMessageBoxesInArgv(), and UiShowMessageBoxesInSection().

◆ UiFadeInBackdrop()

VOID UiFadeInBackdrop ( VOID  )

Definition at line 650 of file ui.c.

651 {
653 }
VOID(* FadeInBackdrop)(VOID)
Definition: ui.h:281
UIVTBL UiVtbl
Definition: ui.c:70

Referenced by UiInitialize().

◆ UiFadeOut()

VOID UiFadeOut ( VOID  )

Definition at line 655 of file ui.c.

656 {
657  UiVtbl.FadeOut();
658 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* FadeOut)(VOID)
Definition: ui.h:282

◆ UiFillArea()

VOID UiFillArea ( ULONG  Left,
ULONG  Top,
ULONG  Right,
ULONG  Bottom,
CHAR  FillChar,
UCHAR  Attr 
)

Definition at line 244 of file ui.c.

245 {
246  UiVtbl.FillArea(Left, Top, Right, Bottom, FillChar, Attr);
247 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* FillArea)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: ui.h:251
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by TuiEditBox().

◆ UiIndicateProgress()

VOID UiIndicateProgress ( VOID  )

Definition at line 426 of file ui.c.

427 {
428  ULONG Percentage;
429 
430  /* Increase progress */
431  UiProgressBar.Indicator.Count++;
432 
433  /* Compute the new percentage - Don't go over 100% */
434  Percentage = 100 * UiProgressBar.Indicator.Count /
435  UiProgressBar.Indicator.Expected;
436  Percentage = min(Percentage, 99);
437 
438  if (Percentage != UiProgressBar.Indicator.Percentage)
439  {
440  /* Percentage has changed, update the progress bar */
441  UiProgressBar.Indicator.Percentage = Percentage;
442  UiUpdateProgressBar(Percentage, NULL);
443  }
444 }
struct _UI_PROGRESS_BAR::@174 Indicator
VOID UiUpdateProgressBar(_In_ ULONG Percentage, _In_opt_ PCSTR ProgressText)
Definition: ui.c:462
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:66
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1

Referenced by WinLdrLoadBootDrivers().

◆ UiInfoBox()

VOID UiInfoBox ( PCSTR  MessageText)

Definition at line 302 of file ui.c.

303 {
304  SIZE_T TextLength;
305  ULONG BoxWidth;
306  ULONG BoxHeight;
307  ULONG LineBreakCount;
308  SIZE_T Index;
309  SIZE_T LastIndex;
310  ULONG Left;
311  ULONG Top;
312  ULONG Right;
313  ULONG Bottom;
314 
315  TextLength = strlen(MessageText);
316 
317  // Count the new lines and the box width
318  LineBreakCount = 0;
319  BoxWidth = 0;
320  LastIndex = 0;
321  for (Index=0; Index<TextLength; Index++)
322  {
323  if (MessageText[Index] == '\n')
324  {
325  LastIndex = Index;
326  LineBreakCount++;
327  }
328  else
329  {
330  if ((Index - LastIndex) > BoxWidth)
331  {
332  BoxWidth = (ULONG)(Index - LastIndex);
333  }
334  }
335  }
336 
337  // Calc the box width & height
338  BoxWidth += 6;
339  BoxHeight = LineBreakCount + 4;
340 
341  // Calc the box coordinates
342  Left = (UiScreenWidth / 2) - (BoxWidth / 2);
343  Top =(UiScreenHeight / 2) - (BoxHeight / 2);
344  Right = (UiScreenWidth / 2) + (BoxWidth / 2);
345  Bottom = (UiScreenHeight / 2) + (BoxHeight / 2);
346 
347  // Draw the box
348  UiDrawBox(Left,
349  Top,
350  Right,
351  Bottom,
352  VERT,
353  HORZ,
354  TRUE,
355  TRUE,
357  );
358 
359  // Draw the text
360  UiDrawCenteredText(Left, Top, Right, Bottom, MessageText, ATTR(UiTextColor, UiMenuBgColor));
361 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRUE
Definition: types.h:120
#define HORZ
Definition: ui.h:343
ULONG UiScreenWidth
Definition: ui.c:56
VOID UiDrawCenteredText(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR TextString, _In_ UCHAR Attr)
Definition: ui.c:281
#define ATTR(cFore, cBack)
Definition: ui.h:314
UCHAR UiTextColor
Definition: ui.c:38
_In_ WDFCOLLECTION _In_ ULONG Index
VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: ui.c:254
ULONG UiScreenHeight
Definition: ui.c:57
UCHAR UiMenuBgColor
Definition: ui.c:37
ULONG_PTR SIZE_T
Definition: typedefs.h:80
static LPHIST_ENTRY Bottom
Definition: history.c:54
UCHAR UiMenuFgColor
Definition: ui.c:36
unsigned int ULONG
Definition: retypes.h:1
static LPHIST_ENTRY Top
Definition: history.c:53
#define VERT
Definition: ui.h:345

Referenced by UiUnInitialize().

◆ UiInitialize()

BOOLEAN UiInitialize ( BOOLEAN  ShowUi)

Definition at line 98 of file ui.c.

99 {
100  VIDEODISPLAYMODE UiDisplayMode; // Tells us if we are in text or graphics mode
101  BOOLEAN UiMinimal = FALSE; // Tells us if we are using a minimal console-like UI
102  ULONG_PTR SectionId;
103  ULONG Depth;
104  CHAR SettingText[260];
105 
106  if (!ShowUi)
107  {
108  if (!UiVtbl.Initialize())
109  {
111  return FALSE;
112  }
113  return TRUE;
114  }
115 
116  TRACE("Initializing User Interface.\n");
117  TRACE("Reading UI settings from [Display] section.\n");
118 
119  /* Open the [Display] section */
120  if (!IniOpenSection("Display", &SectionId))
121  SectionId = 0;
122 
123  /* Select the video mode */
124  SettingText[0] = '\0';
125  if ((SectionId != 0) && !IniReadSettingByName(SectionId, "DisplayMode", SettingText, sizeof(SettingText)))
126  {
127  SettingText[0] = '\0';
128  }
129  UiDisplayMode = MachVideoSetDisplayMode(SettingText, TRUE);
131 
132  /* Select the UI */
133  if ((SectionId != 0) && IniReadSettingByName(SectionId, "MinimalUI", SettingText, sizeof(SettingText)))
134  {
135  UiMinimal = (_stricmp(SettingText, "Yes") == 0);
136  }
137 
138  if (UiDisplayMode == VideoGraphicsMode)
139 #if 0 // We don't support a GUI mode yet.
140  UiVtbl = GuiVtbl;
141 #else
142  {
143  // Switch back to text mode.
145  UiDisplayMode = VideoTextMode;
146  }
147 #endif
148  else // if (UiDisplayMode == VideoTextMode)
149  UiVtbl = (UiMinimal ? MiniTuiVtbl : TuiVtbl);
150 
151  /* Load the UI and initialize its default settings */
152  if (!UiVtbl.Initialize())
153  {
155  return FALSE;
156  }
157 
158  /* Load the user UI settings */
159  if (SectionId != 0)
160  {
161  static const struct
162  {
163  PCSTR SettingName;
164  PVOID SettingVar;
165  SIZE_T SettingSize OPTIONAL; // Must be non-zero only for text buffers.
166  UCHAR SettingType; // 0: Text, 1: Yes/No, 2: Color, 3: Fill style
167  } Settings[] =
168  {
169  {"TitleText", &UiTitleBoxTitleText, sizeof(UiTitleBoxTitleText), 0},
170  {"TimeText" , &UiTimeText, sizeof(UiTimeText), 0},
171 
172  {"ShowTime" , &UiShowTime , 0, 1},
173  {"MenuBox" , &UiMenuBox , 0, 1},
174  {"CenterMenu" , &UiCenterMenu , 0, 1},
175  {"SpecialEffects", &UiUseSpecialEffects, 0, 1},
176 
177  {"BackdropColor" , &UiBackdropBgColor , 0, 2},
178  {"BackdropTextColor" , &UiBackdropFgColor , 0, 2},
179  {"StatusBarColor" , &UiStatusBarBgColor , 0, 2},
180  {"StatusBarTextColor" , &UiStatusBarFgColor , 0, 2},
181  {"TitleBoxColor" , &UiTitleBoxBgColor , 0, 2},
182  {"TitleBoxTextColor" , &UiTitleBoxFgColor , 0, 2},
183  {"MessageBoxColor" , &UiMessageBoxBgColor , 0, 2},
184  {"MessageBoxTextColor", &UiMessageBoxFgColor , 0, 2},
185  {"MenuColor" , &UiMenuBgColor , 0, 2},
186  {"MenuTextColor" , &UiMenuFgColor , 0, 2},
187  {"TextColor" , &UiTextColor , 0, 2},
188  {"SelectedColor" , &UiSelectedTextBgColor, 0, 2},
189  {"SelectedTextColor" , &UiSelectedTextColor , 0, 2},
190  {"EditBoxColor" , &UiEditBoxBgColor , 0, 2},
191  {"EditBoxTextColor" , &UiEditBoxTextColor , 0, 2},
192 
193  {"BackdropFillStyle", &UiBackdropFillStyle, 0, 3},
194  };
195  ULONG i;
196 
197  for (i = 0; i < RTL_NUMBER_OF(Settings); ++i)
198  {
199  if (!IniReadSettingByName(SectionId, Settings[i].SettingName, SettingText, sizeof(SettingText)))
200  continue;
201 
202  switch (Settings[i].SettingType)
203  {
204  case 0: // Text
205  RtlStringCbCopyA((PCHAR)Settings[i].SettingVar,
206  Settings[i].SettingSize, SettingText);
207  break;
208  case 1: // Yes/No
209  *(PBOOLEAN)Settings[i].SettingVar = (_stricmp(SettingText, "Yes") == 0);
210  break;
211  case 2: // Color
212  *(PUCHAR)Settings[i].SettingVar = UiTextToColor(SettingText);
213  break;
214  case 3: // Fill style
215  *(PUCHAR)Settings[i].SettingVar = UiTextToFillStyle(SettingText);
216  break;
217  default:
218  break;
219  }
220  }
221  }
222 
223  /* Draw the backdrop and fade it in if special effects are enabled */
225 
226  TRACE("UiInitialize() returning TRUE.\n");
227  return TRUE;
228 }
signed char * PCHAR
Definition: retypes.h:7
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:814
BOOLEAN UiShowTime
Definition: ui.c:44
const UIVTBL GuiVtbl
Definition: gui.c:85
UCHAR UiStatusBarFgColor
Definition: ui.c:27
const UIVTBL MiniTuiVtbl
Definition: minitui.c:249
#define TRUE
Definition: types.h:120
CHAR UiTimeText[260]
Definition: ui.c:50
UCHAR UiEditBoxTextColor
Definition: ui.c:41
#define MachVideoGetDisplaySize(W, H, D)
Definition: machine.h:96
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
UCHAR UiMessageBoxBgColor
Definition: ui.c:35
UCHAR UiTitleBoxFgColor
Definition: ui.c:32
BOOLEAN UiCenterMenu
Definition: ui.c:46
#define _stricmp
Definition: cat.c:22
UCHAR UiMessageBoxFgColor
Definition: ui.c:34
UCHAR UiBackdropFgColor
Definition: ui.c:29
uint32_t ULONG_PTR
Definition: typedefs.h:65
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:156
BOOLEAN UiMenuBox
Definition: ui.c:45
UCHAR UiTextToFillStyle(PCSTR FillStyleText)
Definition: ui.c:384
ULONG UiScreenWidth
Definition: ui.c:56
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
Definition: wdfdevice.h:2592
#define FALSE
Definition: types.h:117
VOID UiFadeInBackdrop(VOID)
Definition: ui.c:650
UCHAR UiTitleBoxBgColor
Definition: ui.c:33
UIVTBL UiVtbl
Definition: ui.c:70
UCHAR UiStatusBarBgColor
Definition: ui.c:28
unsigned char BOOLEAN
BOOLEAN UiUseSpecialEffects
Definition: ui.c:47
UCHAR UiTextColor
Definition: ui.c:38
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
Definition: inifile.c:147
#define TRACE(s)
Definition: solgame.cpp:4
BOOLEAN(* Initialize)(VOID)
Definition: ui.h:247
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR *SectionId)
Definition: inifile.c:25
UCHAR UiSelectedTextBgColor
Definition: ui.c:40
unsigned char UCHAR
Definition: xmlstorage.h:181
char * PBOOLEAN
Definition: retypes.h:11
UCHAR UiBackdropFillStyle
Definition: ui.c:31
UCHAR UiBackdropBgColor
Definition: ui.c:30
ULONG UiScreenHeight
Definition: ui.c:57
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
UCHAR UiMenuBgColor
Definition: ui.c:37
CHAR UiTitleBoxTitleText[260]
Definition: ui.c:49
ULONG_PTR SIZE_T
Definition: typedefs.h:80
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
UCHAR UiTextToColor(PCSTR ColorText)
Definition: ui.c:379
#define OPTIONAL
Definition: typedefs.h:41
#define NULL
Definition: types.h:112
#define MachVideoSetDisplayMode(Mode, Init)
Definition: machine.h:94
UCHAR UiMenuFgColor
Definition: ui.c:36
UCHAR UiSelectedTextColor
Definition: ui.c:39
unsigned int ULONG
Definition: retypes.h:1
const char * PCSTR
Definition: typedefs.h:52
const UIVTBL TuiVtbl
Definition: tui.c:1217
UCHAR UiEditBoxBgColor
Definition: ui.c:42

Referenced by BootMain(), RunLoader(), and UiResetForSOS().

◆ UiInitProgressBar()

VOID UiInitProgressBar ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ PCSTR  ProgressText 
)

Definition at line 392 of file ui.c.

398 {
399  /* Progress bar area */
400  UiProgressBar.Left = Left;
402  UiProgressBar.Right = Right;
404  // UiProgressBar.Width = Right - Left + 1;
405 
406  /* Set the progress bar ranges */
407  UiSetProgressBarSubset(0, 100);
408  UiProgressBar.Indicator.Count = 0;
409  UiProgressBar.Indicator.Expected = 25;
410  UiProgressBar.Indicator.Percentage = 0;
411 
412  /* Enable the progress bar */
414 
415  /* Initial drawing: set the "Loading..." text and the original position */
416 #ifndef _M_ARM
417  UiVtbl.SetProgressBarText(ProgressText);
419 #else
420  MiniTuiSetProgressBarText(ProgressText);
422 #endif
423 }
struct _UI_PROGRESS_BAR::@174 Indicator
#define TRUE
Definition: types.h:120
VOID MiniTuiTickProgressBar(_In_ ULONG SubPercentTimes100)
Definition: minitui.c:115
ULONG Right
Definition: ui.h:126
VOID(* SetProgressBarText)(_In_ PCSTR ProgressText)
Definition: ui.h:272
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:66
VOID(* TickProgressBar)(_In_ ULONG SubPercentTimes100)
Definition: ui.h:275
UIVTBL UiVtbl
Definition: ui.c:70
ULONG Top
Definition: ui.h:125
BOOLEAN Show
Definition: ui.h:129
ULONG Bottom
Definition: ui.h:127
static LPHIST_ENTRY Bottom
Definition: history.c:54
ULONG Left
Definition: ui.h:124
VOID UiSetProgressBarSubset(_In_ ULONG Floor, _In_ ULONG Ceiling)
Definition: ui.c:447
VOID MiniTuiSetProgressBarText(_In_ PCSTR ProgressText)
Definition: minitui.c:77
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by MiniTuiDrawProgressBar(), and TuiDrawProgressBar().

◆ UiMessageBox()

VOID UiMessageBox ( PCSTR  Format,
  ... 
)

Definition at line 363 of file ui.c.

364 {
365  CHAR Buffer[256];
366  va_list ap;
367 
368  va_start(ap, Format);
369  vsnprintf(Buffer, sizeof(Buffer) - sizeof(CHAR), Format, ap);
371  va_end(ap);
372 }
#define vsnprintf
Definition: tif_win32.c:406
char CHAR
Definition: xmlstorage.h:175
#define va_end(ap)
Definition: acmsvcex.h:90
UIVTBL UiVtbl
Definition: ui.c:70
char * va_list
Definition: acmsvcex.h:78
Definition: bufpool.h:45
VOID(* MessageBox)(PCSTR MessageText)
Definition: ui.h:259
va_start(ap, x)
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32

Referenced by AllocateAndInitLPB(), DiskError(), FileSystemError(), LoadAndBootWindows(), LoadAndBootWindowsCommon(), LoadReactOSSetup(), LoadWindowsCore(), MempAllocatePageTables(), MsgBoxPrint(), RamDiskLoadVirtualFile(), RunLoader(), UiShowMessageBoxesInArgv(), UiShowMessageBoxesInSection(), WinLdrInitSystemHive(), WinLdrLoadBootDrivers(), WinLdrLoadNLSData(), WinLdrScanSystemHive(), WinLdrSetupMachineDependent(), and WinLdrSetupMemoryLayout().

◆ UiMessageBoxCritical()

VOID UiMessageBoxCritical ( PCSTR  MessageText)

Definition at line 374 of file ui.c.

375 {
376  UiVtbl.MessageBoxCritical(MessageText);
377 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* MessageBoxCritical)(PCSTR MessageText)
Definition: ui.h:260

Referenced by BootMain(), IniFileInitialize(), KeBugCheckEx(), MmAllocateHighestMemoryBelowAddress(), MmAllocateMemoryAtAddress(), MmAllocateMemoryWithType(), and RunLoader().

◆ UiSetProgressBarSubset()

VOID UiSetProgressBarSubset ( _In_ ULONG  Floor,
_In_ ULONG  Ceiling 
)

Definition at line 447 of file ui.c.

450 {
451  /* Sanity checks */
452  ASSERT(Floor < Ceiling);
453  ASSERT(Ceiling <= 100);
454 
455  /* Update the progress bar state */
456  UiProgressBar.State.Floor = Floor * 100;
457  // UiProgressBar.State.Ceiling = Ceiling * 100;
458  UiProgressBar.State.Bias = Ceiling - Floor;
459 }
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:66
#define ASSERT(a)
Definition: mode.c:44
struct _UI_PROGRESS_BAR::@173 State

Referenced by LoadAndBootWindowsCommon(), and UiInitProgressBar().

◆ UiSetProgressBarText()

VOID UiSetProgressBarText ( _In_ PCSTR  ProgressText)

Definition at line 488 of file ui.c.

490 {
491  /* Make sure the progress bar is enabled */
492  if (!UiProgressBar.Show)
493  return;
494 
495 #ifndef _M_ARM
496  UiVtbl.SetProgressBarText(ProgressText);
497 #else
498  MiniTuiSetProgressBarText(ProgressText);
499 #endif
500 }
VOID(* SetProgressBarText)(_In_ PCSTR ProgressText)
Definition: ui.h:272
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:66
UIVTBL UiVtbl
Definition: ui.c:70
BOOLEAN Show
Definition: ui.h:129
VOID MiniTuiSetProgressBarText(_In_ PCSTR ProgressText)
Definition: minitui.c:77

Referenced by LoadAndBootWindowsCommon(), and UiUpdateProgressBar().

◆ UiShowMessageBoxesInArgv()

VOID UiShowMessageBoxesInArgv ( IN ULONG  Argc,
IN PCHAR  Argv[] 
)

Definition at line 594 of file ui.c.

597 {
598  ULONG LastIndex;
599  PCSTR ArgValue;
600  PCHAR MessageBoxText;
601  SIZE_T MessageBoxTextSize;
602 
603  /* Find all the message box settings and run them */
604  for (LastIndex = 0;
605  (ArgValue = GetNextArgumentValue(Argc, Argv, &LastIndex, "MessageBox")) != NULL;
606  ++LastIndex)
607  {
608  /* Get the real length of the MessageBox text */
609  MessageBoxTextSize = (strlen(ArgValue) + 1) * sizeof(CHAR);
610 
611  /* Allocate enough memory to hold the text */
612  MessageBoxText = FrLdrTempAlloc(MessageBoxTextSize, TAG_UI_TEXT);
613  if (!MessageBoxText)
614  continue;
615 
616  /* Get the MessageBox text */
617  strcpy(MessageBoxText, ArgValue);
618 
619  /* Fix it up */
620  UiEscapeString(MessageBoxText);
621 
622  /* Display it */
623  UiMessageBox(MessageBoxText);
624 
625  /* Free the memory */
626  FrLdrTempFree(MessageBoxText, TAG_UI_TEXT);
627  }
628 }
signed char * PCHAR
Definition: retypes.h:7
static VOID UiEscapeString(PCHAR String)
Definition: ui.c:531
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char CHAR
Definition: xmlstorage.h:175
PCHAR GetNextArgumentValue(IN ULONG Argc, IN PCHAR Argv[], IN OUT PULONG LastIndex OPTIONAL, IN PCHAR ArgumentName)
Definition: arcsupp.c:15
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: mm.h:188
#define TAG_UI_TEXT
Definition: ui.c:54
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define NULL
Definition: types.h:112
VOID UiMessageBox(PCSTR Format,...)
Definition: ui.c:363
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
unsigned int ULONG
Definition: retypes.h:1
const char * PCSTR
Definition: typedefs.h:52
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: mm.h:197

◆ UiShowMessageBoxesInSection()

VOID UiShowMessageBoxesInSection ( IN ULONG_PTR  SectionId)

Definition at line 550 of file ui.c.

552 {
553  ULONG Idx;
554  CHAR SettingName[80];
555  CHAR SettingValue[80];
556  PCHAR MessageBoxText;
557  ULONG MessageBoxTextSize;
558 
559  if (SectionId == 0)
560  return;
561 
562  /* Find all the message box settings and run them */
563  for (Idx = 0; Idx < IniGetNumSectionItems(SectionId); Idx++)
564  {
565  IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), SettingValue, sizeof(SettingValue));
566  if (_stricmp(SettingName, "MessageBox") != 0)
567  continue;
568 
569  /* Get the real length of the MessageBox text */
570  MessageBoxTextSize = IniGetSectionSettingValueSize(SectionId, Idx);
571  // if (MessageBoxTextSize <= 0)
572  // continue;
573 
574  /* Allocate enough memory to hold the text */
575  MessageBoxText = FrLdrTempAlloc(MessageBoxTextSize, TAG_UI_TEXT);
576  if (!MessageBoxText)
577  continue;
578 
579  /* Get the MessageBox text */
580  IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), MessageBoxText, MessageBoxTextSize);
581 
582  /* Fix it up */
583  UiEscapeString(MessageBoxText);
584 
585  /* Display it */
586  UiMessageBox(MessageBoxText);
587 
588  /* Free the memory */
589  FrLdrTempFree(MessageBoxText, TAG_UI_TEXT);
590  }
591 }
signed char * PCHAR
Definition: retypes.h:7
static VOID UiEscapeString(PCHAR String)
Definition: ui.c:531
char CHAR
Definition: xmlstorage.h:175
#define _stricmp
Definition: cat.c:22
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: mm.h:188
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:101
#define TAG_UI_TEXT
Definition: ui.c:54
VOID UiMessageBox(PCSTR Format,...)
Definition: ui.c:363
unsigned int ULONG
Definition: retypes.h:1
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
Definition: inifile.c:54
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
Definition: inifile.c:114
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: mm.h:197

Referenced by RunLoader().

◆ UiTextToColor()

UCHAR UiTextToColor ( PCSTR  ColorText)

Definition at line 379 of file ui.c.

380 {
381  return UiVtbl.TextToColor(ColorText);
382 }
UCHAR(* TextToColor)(PCSTR ColorText)
Definition: ui.h:279
UIVTBL UiVtbl
Definition: ui.c:70

Referenced by UiInitialize().

◆ UiTextToFillStyle()

UCHAR UiTextToFillStyle ( PCSTR  FillStyleText)

Definition at line 384 of file ui.c.

385 {
386  return UiVtbl.TextToFillStyle(FillStyleText);
387 }
UIVTBL UiVtbl
Definition: ui.c:70
UCHAR(* TextToFillStyle)(PCSTR FillStyleText)
Definition: ui.h:280

Referenced by UiInitialize().

◆ UiUnInitialize()

VOID UiUnInitialize ( PCSTR  BootText)

Definition at line 230 of file ui.c.

231 {
232  UiDrawBackdrop();
233  UiDrawStatusText(BootText);
234  UiInfoBox(BootText);
235 
237 }
VOID UiInfoBox(PCSTR MessageText)
Definition: ui.c:302
UIVTBL UiVtbl
Definition: ui.c:70
VOID UiDrawStatusText(PCSTR StatusText)
Definition: ui.c:292
VOID UiDrawBackdrop(VOID)
Definition: ui.c:239
VOID(* UnInitialize)(VOID)
Definition: ui.h:248

Referenced by RunLoader().

◆ UiUpdateDateTime()

VOID UiUpdateDateTime ( VOID  )

Definition at line 297 of file ui.c.

298 {
300 }
UIVTBL UiVtbl
Definition: ui.c:70
VOID(* UpdateDateTime)(VOID)
Definition: ui.h:258

◆ UiUpdateProgressBar()

VOID UiUpdateProgressBar ( _In_ ULONG  Percentage,
_In_opt_ PCSTR  ProgressText 
)

Definition at line 462 of file ui.c.

465 {
466  ULONG TotalProgress;
467 
468  /* Make sure the progress bar is enabled */
469  if (!UiProgressBar.Show)
470  return;
471 
472  /* Set the progress text if specified */
473  if (ProgressText)
474  UiSetProgressBarText(ProgressText);
475 
476  /* Compute the total progress and tick the progress bar */
477  TotalProgress = UiProgressBar.State.Floor + (Percentage * UiProgressBar.State.Bias);
478  // TotalProgress /= (100 * 100);
479 
480 #ifndef _M_ARM
481  UiVtbl.TickProgressBar(TotalProgress);
482 #else
483  MiniTuiTickProgressBar(TotalProgress);
484 #endif
485 }
VOID MiniTuiTickProgressBar(_In_ ULONG SubPercentTimes100)
Definition: minitui.c:115
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:66
VOID(* TickProgressBar)(_In_ ULONG SubPercentTimes100)
Definition: ui.h:275
UIVTBL UiVtbl
Definition: ui.c:70
BOOLEAN Show
Definition: ui.h:129
VOID UiSetProgressBarText(_In_ PCSTR ProgressText)
Definition: ui.c:488
struct _UI_PROGRESS_BAR::@173 State
unsigned int ULONG
Definition: retypes.h:1

Referenced by LoadAndBootWindows(), LoadAndBootWindowsCommon(), LoadModule(), LoadReactOSSetup(), RamDiskLoadVirtualFile(), and UiIndicateProgress().

Variable Documentation

◆ UiBackdropBgColor

UCHAR UiBackdropBgColor

◆ UiBackdropFgColor

UCHAR UiBackdropFgColor

◆ UiBackdropFillStyle

UCHAR UiBackdropFillStyle

◆ UiCenterMenu

◆ UiEditBoxBgColor

UCHAR UiEditBoxBgColor

Definition at line 42 of file ui.c.

Referenced by TuiEditBox(), TuiInitialize(), and UiInitialize().

◆ UiEditBoxTextColor

UCHAR UiEditBoxTextColor

Definition at line 41 of file ui.c.

Referenced by TuiEditBox(), TuiInitialize(), and UiInitialize().

◆ UiMenuBgColor

◆ UiMenuBox

◆ UiMenuFgColor

◆ UiMessageBoxBgColor

UCHAR UiMessageBoxBgColor

Definition at line 35 of file ui.c.

Referenced by TuiEditBox(), TuiInitialize(), TuiMessageBoxCritical(), and UiInitialize().

◆ UiMessageBoxFgColor

UCHAR UiMessageBoxFgColor

Definition at line 34 of file ui.c.

Referenced by TuiEditBox(), TuiInitialize(), TuiMessageBoxCritical(), and UiInitialize().

◆ UiMonthNames

const PCSTR UiMonthNames[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }

Definition at line 52 of file ui.c.

Referenced by TuiUpdateDateTime().

◆ UiProgressBar

◆ UiScreenHeight

◆ UiScreenWidth

◆ UiSelectedTextBgColor

UCHAR UiSelectedTextBgColor

Definition at line 40 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawMenuItem(), TuiInitialize(), and UiInitialize().

◆ UiSelectedTextColor

UCHAR UiSelectedTextColor

Definition at line 39 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawMenuItem(), TuiInitialize(), and UiInitialize().

◆ UiShowTime

BOOLEAN UiShowTime

Definition at line 44 of file ui.c.

Referenced by MiniTuiInitialize(), TuiInitialize(), TuiUpdateDateTime(), and UiInitialize().

◆ UiStatusBarBgColor

UCHAR UiStatusBarBgColor

Definition at line 28 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawStatusText(), TuiInitialize(), and UiInitialize().

◆ UiStatusBarFgColor

UCHAR UiStatusBarFgColor

Definition at line 27 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawStatusText(), TuiInitialize(), and UiInitialize().

◆ UiTextColor

◆ UiTimeText

CHAR UiTimeText[260] = "[Time Remaining: %d]"

Definition at line 50 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawMenuTimeout(), TuiInitialize(), and UiInitialize().

◆ UiTitleBoxBgColor

UCHAR UiTitleBoxBgColor

◆ UiTitleBoxFgColor

UCHAR UiTitleBoxFgColor

◆ UiTitleBoxTitleText

CHAR UiTitleBoxTitleText[260] = "Boot Menu"

Definition at line 49 of file ui.c.

Referenced by MiniTuiInitialize(), TuiDrawBackdrop(), TuiInitialize(), and UiInitialize().

◆ UiUseSpecialEffects

BOOLEAN UiUseSpecialEffects

◆ UiVtbl

UIVTBL UiVtbl
Initial value:
=
{
}
UCHAR NoUiTextToColor(PCSTR ColorText)
Definition: noui.c:139
VOID NoUiFadeOut(VOID)
Definition: noui.c:153
BOOLEAN NoUiInitialize(VOID)
Definition: noui.c:12
BOOLEAN NoUiDisplayMenu(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN BOOLEAN ShowBootOptions, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
Definition: noui.c:164
VOID NoUiDrawProgressBarCenter(_In_ PCSTR ProgressText)
Definition: noui.c:118
VOID NoUiDrawCenteredText(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR TextString, _In_ UCHAR Attr)
Definition: noui.c:61
VOID NoUiDrawStatusText(PCSTR StatusText)
Definition: noui.c:72
VOID NoUiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: noui.c:33
BOOLEAN NoUiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: noui.c:134
VOID NoUiTickProgressBar(_In_ ULONG SubPercentTimes100)
Definition: noui.c:112
VOID NoUiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: noui.c:29
VOID NoUiUpdateDateTime(VOID)
Definition: noui.c:77
UCHAR NoUiTextToFillStyle(PCSTR FillStyleText)
Definition: noui.c:144
VOID NoUiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: noui.c:25
VOID NoUiMessageBox(PCSTR MessageText)
Definition: noui.c:81
VOID NoUiDrawText2(_In_ ULONG X, _In_ ULONG Y, _In_opt_ ULONG MaxNumChars, _In_reads_or_z_(MaxNumChars) PCSTR Text, _In_ UCHAR Attr)
Definition: noui.c:48
VOID NoUiUnInitialize(VOID)
Definition: noui.c:17
VOID NoUiSetProgressBarText(_In_ PCSTR ProgressText)
Definition: noui.c:106
VOID NoUiDrawMenu(_In_ PUI_MENU_INFO MenuInfo)
Definition: noui.c:182
VOID NoUiFadeInBackdrop(VOID)
Definition: noui.c:149
VOID NoUiDrawText(_In_ ULONG X, _In_ ULONG Y, _In_ PCSTR Text, _In_ UCHAR Attr)
Definition: noui.c:38
VOID NoUiDrawBackdrop(VOID)
Definition: noui.c:21
VOID NoUiMessageBoxCritical(PCSTR MessageText)
Definition: noui.c:92
VOID NoUiDrawProgressBar(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
Definition: noui.c:124

Definition at line 70 of file ui.c.

Referenced by MiniTuiDrawMenu(), RunLoader(), TuiDisplayMenu(), TuiDrawMenu(), TuiProcessMenuKeyboardEvent(), UiDisplayMenu(), UiDrawBackdrop(), UiDrawBox(), UiDrawCenteredText(), UiDrawProgressBar(), UiDrawProgressBarCenter(), UiDrawShadow(), UiDrawStatusText(), UiDrawText(), UiDrawText2(), UiEditBox(), UiFadeInBackdrop(), UiFadeOut(), UiFillArea(), UiInitialize(), UiInitProgressBar(), UiMessageBox(), UiMessageBoxCritical(), UiResetForSOS(), UiSetProgressBarText(), UiTextToColor(), UiTextToFillStyle(), UiUnInitialize(), UiUpdateDateTime(), and UiUpdateProgressBar().