ReactOS  0.4.13-dev-92-gf251225
ui.c
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 #ifndef _M_ARM
20 
21 #include <freeldr.h>
22 #include <debug.h>
23 
24 #define TAG_UI_TEXT 'xTiU'
25 
27 
28 ULONG UiScreenWidth; // Screen Width
29 ULONG UiScreenHeight; // Screen Height
30 
31 UCHAR UiStatusBarFgColor = COLOR_BLACK; // Status bar foreground color
32 UCHAR UiStatusBarBgColor = COLOR_CYAN; // Status bar background color
33 UCHAR UiBackdropFgColor = COLOR_WHITE; // Backdrop foreground color
34 UCHAR UiBackdropBgColor = COLOR_BLUE; // Backdrop background color
35 UCHAR UiBackdropFillStyle = MEDIUM_FILL; // Backdrop fill style
36 UCHAR UiTitleBoxFgColor = COLOR_WHITE; // Title box foreground color
37 UCHAR UiTitleBoxBgColor = COLOR_RED; // Title box background color
38 UCHAR UiMessageBoxFgColor = COLOR_WHITE; // Message box foreground color
39 UCHAR UiMessageBoxBgColor = COLOR_BLUE; // Message box background color
40 UCHAR UiMenuFgColor = COLOR_WHITE; // Menu foreground color
41 UCHAR UiMenuBgColor = COLOR_BLUE; // Menu background color
42 UCHAR UiTextColor = COLOR_YELLOW; // Normal text color
43 UCHAR UiSelectedTextColor = COLOR_BLACK; // Selected text color
44 UCHAR UiSelectedTextBgColor = COLOR_GRAY; // Selected text background color
45 UCHAR UiEditBoxTextColor = COLOR_WHITE; // Edit box text color
46 UCHAR UiEditBoxBgColor = COLOR_BLACK; // Edit box text background color
47 
48 CHAR UiTitleBoxTitleText[260] = "Boot Menu"; // Title box's title text
49 
50 BOOLEAN UiUseSpecialEffects = FALSE; // Tells us if we should use fade effects
51 BOOLEAN UiDrawTime = TRUE; // Tells us if we should draw the time
52 BOOLEAN UiCenterMenu = TRUE; // Tells us if we should use a centered or left-aligned menu
53 BOOLEAN UiMenuBox = TRUE; // Tells us if we should draw a box around the menu
54 CHAR UiTimeText[260] = "[Time Remaining: ] ";
55 
56 const CHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " };
57 
59 {
82 };
83 
85 {
86  VIDEODISPLAYMODE UiDisplayMode; // Tells us if we are in text or graphics mode
87  BOOLEAN UiMinimal = FALSE; // Tells us if we are using a minimal console-like UI
88  ULONG_PTR SectionId;
89  CHAR DisplayModeText[260];
90  CHAR SettingText[260];
91  ULONG Depth;
92 
93  if (!ShowGui)
94  {
95  if (!UiVtbl.Initialize())
96  {
98  return FALSE;
99  }
100  return TRUE;
101  }
102 
103  TRACE("Initializing User Interface.\n");
104  TRACE("Reading in UI settings from [Display] section.\n");
105 
106  DisplayModeText[0] = '\0';
107  if (IniOpenSection("Display", &SectionId))
108  {
109  if (!IniReadSettingByName(SectionId, "DisplayMode", DisplayModeText, sizeof(DisplayModeText)))
110  {
111  DisplayModeText[0] = '\0';
112  }
113  if (IniReadSettingByName(SectionId, "MinimalUI", SettingText, sizeof(SettingText)))
114  {
115  UiMinimal = (_stricmp(SettingText, "Yes") == 0 && strlen(SettingText) == 3);
116  }
117  }
118 
119  UiDisplayMode = MachVideoSetDisplayMode(DisplayModeText, TRUE);
121 
122  if (VideoTextMode == UiDisplayMode)
123  UiVtbl = (UiMinimal ? MiniTuiVtbl : TuiVtbl);
124  else
125  UiVtbl = GuiVtbl;
126 
127  if (!UiVtbl.Initialize())
128  {
130  return FALSE;
131  }
132 
133  if (IniOpenSection("Display", &SectionId))
134  {
135  if (IniReadSettingByName(SectionId, "TitleText", SettingText, sizeof(SettingText)))
136  {
137  strcpy(UiTitleBoxTitleText, SettingText);
138  }
139  if (IniReadSettingByName(SectionId, "TimeText", SettingText, sizeof(SettingText)))
140  {
141  strcpy(UiTimeText, SettingText);
142  }
143  if (IniReadSettingByName(SectionId, "StatusBarColor", SettingText, sizeof(SettingText)))
144  {
145  UiStatusBarBgColor = UiTextToColor(SettingText);
146  }
147  if (IniReadSettingByName(SectionId, "StatusBarTextColor", SettingText, sizeof(SettingText)))
148  {
149  UiStatusBarFgColor = UiTextToColor(SettingText);
150  }
151  if (IniReadSettingByName(SectionId, "BackdropTextColor", SettingText, sizeof(SettingText)))
152  {
153  UiBackdropFgColor = UiTextToColor(SettingText);
154  }
155  if (IniReadSettingByName(SectionId, "BackdropColor", SettingText, sizeof(SettingText)))
156  {
157  UiBackdropBgColor = UiTextToColor(SettingText);
158  }
159  if (IniReadSettingByName(SectionId, "BackdropFillStyle", SettingText, sizeof(SettingText)))
160  {
161  UiBackdropFillStyle = UiTextToFillStyle(SettingText);
162  }
163  if (IniReadSettingByName(SectionId, "TitleBoxTextColor", SettingText, sizeof(SettingText)))
164  {
165  UiTitleBoxFgColor = UiTextToColor(SettingText);
166  }
167  if (IniReadSettingByName(SectionId, "TitleBoxColor", SettingText, sizeof(SettingText)))
168  {
169  UiTitleBoxBgColor = UiTextToColor(SettingText);
170  }
171  if (IniReadSettingByName(SectionId, "MessageBoxTextColor", SettingText, sizeof(SettingText)))
172  {
173  UiMessageBoxFgColor = UiTextToColor(SettingText);
174  }
175  if (IniReadSettingByName(SectionId, "MessageBoxColor", SettingText, sizeof(SettingText)))
176  {
177  UiMessageBoxBgColor = UiTextToColor(SettingText);
178  }
179  if (IniReadSettingByName(SectionId, "MenuTextColor", SettingText, sizeof(SettingText)))
180  {
181  UiMenuFgColor = UiTextToColor(SettingText);
182  }
183  if (IniReadSettingByName(SectionId, "MenuColor", SettingText, sizeof(SettingText)))
184  {
185  UiMenuBgColor = UiTextToColor(SettingText);
186  }
187  if (IniReadSettingByName(SectionId, "TextColor", SettingText, sizeof(SettingText)))
188  {
189  UiTextColor = UiTextToColor(SettingText);
190  }
191  if (IniReadSettingByName(SectionId, "SelectedTextColor", SettingText, sizeof(SettingText)))
192  {
193  UiSelectedTextColor = UiTextToColor(SettingText);
194  }
195  if (IniReadSettingByName(SectionId, "SelectedColor", SettingText, sizeof(SettingText)))
196  {
197  UiSelectedTextBgColor = UiTextToColor(SettingText);
198  }
199  if (IniReadSettingByName(SectionId, "EditBoxTextColor", SettingText, sizeof(SettingText)))
200  {
201  UiEditBoxTextColor = UiTextToColor(SettingText);
202  }
203  if (IniReadSettingByName(SectionId, "EditBoxColor", SettingText, sizeof(SettingText)))
204  {
205  UiEditBoxBgColor = UiTextToColor(SettingText);
206  }
207  if (IniReadSettingByName(SectionId, "SpecialEffects", SettingText, sizeof(SettingText)))
208  {
209  UiUseSpecialEffects = (_stricmp(SettingText, "Yes") == 0 && strlen(SettingText) == 3);
210  }
211  if (IniReadSettingByName(SectionId, "ShowTime", SettingText, sizeof(SettingText)))
212  {
213  UiDrawTime = (_stricmp(SettingText, "Yes") == 0 && strlen(SettingText) == 3);
214  }
215  if (IniReadSettingByName(SectionId, "MenuBox", SettingText, sizeof(SettingText)))
216  {
217  UiMenuBox = (_stricmp(SettingText, "Yes") == 0 && strlen(SettingText) == 3);
218  }
219  if (IniReadSettingByName(SectionId, "CenterMenu", SettingText, sizeof(SettingText)))
220  {
221  UiCenterMenu = (_stricmp(SettingText, "Yes") == 0 && strlen(SettingText) == 3);
222  }
223  }
224 
225  // Draw the backdrop and fade it in if special effects are enabled
227 
228  TRACE("UiInitialize() returning TRUE.\n");
229  return TRUE;
230 }
231 
233 {
234  UiDrawBackdrop();
235  UiDrawStatusText(BootText);
236  UiInfoBox(BootText);
237 
239 }
240 
242 {
244 }
245 
246 VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */)
247 {
248  UiVtbl.FillArea(Left, Top, Right, Bottom, FillChar, Attr);
249 }
250 
252 {
253  UiVtbl.DrawShadow(Left, Top, Right, Bottom);
254 }
255 
256 VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
257 {
258  UiVtbl.DrawBox(Left, Top, Right, Bottom, VertStyle, HorzStyle, Fill, Shadow, Attr);
259 }
260 
262 {
263  UiVtbl.DrawText(X, Y, Text, Attr);
264 }
265 
267 {
268  UiVtbl.DrawText2(X, Y, MaxNumChars, Text, Attr);
269 }
270 
271 VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
272 {
273  UiVtbl.DrawCenteredText(Left, Top, Right, Bottom, TextString, Attr);
274 }
275 
277 {
278  UiVtbl.DrawStatusText(StatusText);
279 }
280 
282 {
284 }
285 
286 VOID UiInfoBox(PCSTR MessageText)
287 {
288  SIZE_T TextLength;
289  ULONG BoxWidth;
290  ULONG BoxHeight;
291  ULONG LineBreakCount;
292  SIZE_T Index;
293  SIZE_T LastIndex;
294  ULONG Left;
295  ULONG Top;
296  ULONG Right;
297  ULONG Bottom;
298 
299  TextLength = strlen(MessageText);
300 
301  // Count the new lines and the box width
302  LineBreakCount = 0;
303  BoxWidth = 0;
304  LastIndex = 0;
305  for (Index=0; Index<TextLength; Index++)
306  {
307  if (MessageText[Index] == '\n')
308  {
309  LastIndex = Index;
310  LineBreakCount++;
311  }
312  else
313  {
314  if ((Index - LastIndex) > BoxWidth)
315  {
316  BoxWidth = (ULONG)(Index - LastIndex);
317  }
318  }
319  }
320 
321  // Calc the box width & height
322  BoxWidth += 6;
323  BoxHeight = LineBreakCount + 4;
324 
325  // Calc the box coordinates
326  Left = (UiScreenWidth / 2) - (BoxWidth / 2);
327  Top =(UiScreenHeight / 2) - (BoxHeight / 2);
328  Right = (UiScreenWidth / 2) + (BoxWidth / 2);
329  Bottom = (UiScreenHeight / 2) + (BoxHeight / 2);
330 
331  // Draw the box
332  UiDrawBox(Left,
333  Top,
334  Right,
335  Bottom,
336  VERT,
337  HORZ,
338  TRUE,
339  TRUE,
341  );
342 
343  // Draw the text
344  UiDrawCenteredText(Left, Top, Right, Bottom, MessageText, ATTR(UiTextColor, UiMenuBgColor));
345 }
346 
348 {
349  CHAR Buffer[256];
350  va_list ap;
351 
352  va_start(ap, Format);
353  vsnprintf(Buffer, sizeof(Buffer) - sizeof(CHAR), Format, ap);
355  va_end(ap);
356 }
357 
359 {
360  UiVtbl.MessageBoxCritical(MessageText);
361 }
362 
364 {
365  return UiVtbl.TextToColor(ColorText);
366 }
367 
369 {
370  return UiVtbl.TextToFillStyle(FillStyleText);
371 }
372 
374 {
375  UiVtbl.DrawProgressBarCenter(Position, Range, ProgressText);
376 }
377 
379 {
380  UiVtbl.DrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
381 }
382 
384 {
385  ULONG Idx;
386  CHAR SettingName[80];
387  CHAR SettingValue[80];
388  PCHAR MessageBoxText;
389  ULONG MessageBoxTextSize;
390  ULONG_PTR SectionId;
391 
392  if (!IniOpenSection(SectionName, &SectionId))
393  {
394  return;
395  }
396 
397  //
398  // Find all the message box settings and run them
399  //
400  for (Idx=0; Idx<IniGetNumSectionItems(SectionId); Idx++)
401  {
402  IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), SettingValue, sizeof(SettingValue));
403 
404  if (_stricmp(SettingName, "MessageBox") == 0)
405  {
406  // Get the real length of the MessageBox text
407  MessageBoxTextSize = IniGetSectionSettingValueSize(SectionId, Idx);
408 
409  //if (MessageBoxTextSize > 0)
410  {
411  // Allocate enough memory to hold the text
412  MessageBoxText = FrLdrTempAlloc(MessageBoxTextSize, TAG_UI_TEXT);
413 
414  if (MessageBoxText)
415  {
416  // Get the MessageBox text
417  IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), MessageBoxText, MessageBoxTextSize);
418 
419  // Fix it up
420  UiEscapeString(MessageBoxText);
421 
422  // Display it
423  UiMessageBox(MessageBoxText);
424 
425  // Free the memory
426  FrLdrTempFree(MessageBoxText, TAG_UI_TEXT);
427  }
428  }
429  }
430  }
431 }
432 
434 {
435  ULONG Idx;
436 
437  for (Idx=0; Idx<strlen(String); Idx++)
438  {
439  // Escape the new line characters
440  if (String[Idx] == '\\' && String[Idx+1] == 'n')
441  {
442  // Escape the character
443  String[Idx] = '\n';
444 
445  // Move the rest of the string up
446  strcpy(&String[Idx+1], &String[Idx+2]);
447  }
448  }
449 }
450 
452 {
453  if (strlen(StringText) > MaxChars)
454  {
455  strcpy(&StringText[MaxChars - 3], "...");
456  }
457 }
458 
459 BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
460 {
461  return UiVtbl.DisplayMenu(MenuHeader, MenuFooter, ShowBootOptions, MenuItemList, MenuItemCount, DefaultMenuItem, MenuTimeOut, SelectedMenuItem, CanEscape, KeyPressFilter);
462 }
463 
465 {
467 }
468 
470 {
471  UiVtbl.FadeOut();
472 }
473 
474 BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
475 {
476  return UiVtbl.EditBox(MessageText, EditTextBuffer, Length);
477 }
478 
479 #else
480 BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
481 {
482  return FALSE;
483 }
484 #endif
signed char * PCHAR
Definition: retypes.h:7
#define vsnprintf
Definition: tif_win32.c:406
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:656
VOID UiEscapeString(PCHAR String)
Definition: ui.c:433
const UIVTBL GuiVtbl
Definition: gui.c:85
#define TRUE
Definition: types.h:120
UCHAR NoUiTextToColor(PCSTR ColorText)
Definition: noui.c:92
VOID NoUiFadeOut(VOID)
Definition: noui.c:106
#define COLOR_YELLOW
Definition: ui.h:179
VOID NoUiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: noui.c:36
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:109
#define COLOR_BLACK
Definition: ui.h:164
BOOLEAN NoUiInitialize(VOID)
Definition: noui.c:11
VOID UiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PCSTR Text, UCHAR Attr)
Definition: ui.c:266
BOOLEAN(* UiMenuKeyPressFilterCallback)(ULONG KeyPress)
Definition: ui.h:108
#define Y(I)
UCHAR UiStatusBarFgColor
Definition: ui.c:31
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.c:474
const UIVTBL MiniTuiVtbl
Definition: minitui.c:137
VOID(* DrawText)(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.h:126
CHAR UiTimeText[260]
Definition: ui.c:54
UCHAR UiEditBoxTextColor
Definition: ui.c:45
#define MachVideoGetDisplaySize(W, H, D)
Definition: machine.h:94
static COORD Position
Definition: mouse.c:34
char CHAR
Definition: xmlstorage.h:175
VOID UiInfoBox(PCSTR MessageText)
Definition: ui.c:286
VOID UiFadeOut(VOID)
Definition: ui.c:469
#define HORZ
Definition: ui.h:188
VOID NoUiDrawStatusText(PCSTR StatusText)
Definition: noui.c:48
VOID NoUiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: noui.c:32
BOOLEAN NoUiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: noui.c:87
UCHAR UiMessageBoxBgColor
Definition: ui.c:39
static WCHAR String[]
Definition: stringtable.c:55
UCHAR UiTitleBoxFgColor
Definition: ui.c:36
BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG *SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
Definition: ui.c:459
BOOLEAN UiCenterMenu
Definition: ui.c:52
BOOLEAN NoUiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG *SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
Definition: noui.c:116
VOID(* FadeInBackdrop)(VOID)
Definition: ui.h:138
VOID NoUiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: noui.c:28
#define _stricmp
Definition: cat.c:22
UCHAR UiMessageBoxFgColor
Definition: ui.c:38
const CHAR UiMonthNames[12][15]
Definition: ui.c:56
UCHAR UiBackdropFgColor
Definition: ui.c:33
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOLEAN UiMenuBox
Definition: ui.c:53
UCHAR UiTextToFillStyle(PCSTR FillStyleText)
Definition: ui.c:368
ULONG UiScreenWidth
Definition: ui.c:28
UCHAR(* TextToColor)(PCSTR ColorText)
Definition: ui.h:136
VOID NoUiUpdateDateTime(VOID)
Definition: noui.c:53
VOID UiShowMessageBoxesInSection(PCSTR SectionName)
Definition: ui.c:383
UCHAR NoUiTextToFillStyle(PCSTR FillStyleText)
Definition: noui.c:97
#define va_end(ap)
Definition: acmsvcex.h:90
BOOLEAN UiInitialize(BOOLEAN ShowGui)
Definition: ui.c:84
VOID(* DrawProgressBarCenter)(ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: ui.h:133
VOID NoUiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: noui.c:24
long LONG
Definition: pedump.c:60
VOID UiFadeInBackdrop(VOID)
Definition: ui.c:464
UCHAR UiTitleBoxBgColor
Definition: ui.c:37
UIVTBL UiVtbl
Definition: ui.c:58
UCHAR UiStatusBarBgColor
Definition: ui.c:32
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: mm.h:177
#define ATTR(cFore, cBack)
Definition: ui.h:152
unsigned char BOOLEAN
DBG_DEFAULT_CHANNEL(UI)
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN UiUseSpecialEffects
Definition: ui.c:50
BOOLEAN UiDrawTime
Definition: ui.c:51
char * va_list
Definition: acmsvcex.h:78
Definition: bufpool.h:45
#define COLOR_RED
Definition: ui.h:168
VOID(* DrawText2)(ULONG X, ULONG Y, ULONG MaxNumChars, PCSTR Text, UCHAR Attr)
Definition: ui.h:127
VOID(* MessageBox)(PCSTR MessageText)
Definition: ui.h:131
UCHAR UiTextColor
Definition: ui.c:42
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
Definition: inifile.c:147
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: ui.c:378
VOID NoUiMessageBox(PCSTR MessageText)
Definition: noui.c:57
VOID NoUiUnInitialize(VOID)
Definition: noui.c:16
VOID(* FillArea)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: ui.h:123
#define TRACE(s)
Definition: solgame.cpp:4
VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars)
Definition: ui.c:451
VOID UiUnInitialize(PCSTR BootText)
Definition: ui.c:232
BOOLEAN(* Initialize)(VOID)
Definition: ui.h:119
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR *SectionId)
Definition: inifile.c:25
VOID(* UpdateDateTime)(VOID)
Definition: ui.h:130
UCHAR UiSelectedTextBgColor
Definition: ui.c:44
VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: ui.c:256
VOID(* DrawShadow)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: ui.h:124
static const UCHAR Index[8]
Definition: usbohci.c:18
VOID(* DrawBox)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: ui.h:125
VOID UiDrawStatusText(PCSTR StatusText)
Definition: ui.c:276
#define COLOR_CYAN
Definition: ui.h:167
VOID NoUiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
Definition: noui.c:44
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: ui.c:373
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define COLOR_BLUE
Definition: ui.h:165
BOOLEAN(* EditBox)(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.h:135
VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
Definition: ui.c:271
VOID UiUpdateDateTime(VOID)
Definition: ui.c:281
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:101
unsigned char UCHAR
Definition: xmlstorage.h:181
UCHAR UiBackdropFillStyle
Definition: ui.c:35
UCHAR UiBackdropBgColor
Definition: ui.c:34
ULONG UiScreenHeight
Definition: ui.c:29
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
#define TAG_UI_TEXT
Definition: ui.c:24
#define COLOR_WHITE
Definition: ui.h:180
UCHAR UiMenuBgColor
Definition: ui.c:41
Definition: ui.h:117
Definition: range.c:43
VOID NoUiDrawMenu(PUI_MENU_INFO MenuInfo)
Definition: noui.c:122
CHAR UiTitleBoxTitleText[260]
Definition: ui.c:48
VOID NoUiFadeInBackdrop(VOID)
Definition: noui.c:102
VOID(* MessageBoxCritical)(PCSTR MessageText)
Definition: ui.h:132
ULONG_PTR SIZE_T
Definition: typedefs.h:78
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: ui.c:246
VOID NoUiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: noui.c:79
static LPHIST_ENTRY Bottom
Definition: history.c:54
VOID(* DrawStatusText)(PCSTR StatusText)
Definition: ui.h:129
VOID(* DrawProgressBar)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: ui.h:134
VOID NoUiDrawBackdrop(VOID)
Definition: noui.c:20
VOID NoUiMessageBoxCritical(PCSTR MessageText)
Definition: noui.c:68
UCHAR UiTextToColor(PCSTR ColorText)
Definition: ui.c:363
VOID(* DrawBackdrop)(VOID)
Definition: ui.h:122
#define va_start(ap, A)
Definition: acmsvcex.h:91
VOID UiMessageBox(PCSTR Format,...)
Definition: ui.c:347
VOID(* FadeOut)(VOID)
Definition: ui.h:139
BOOLEAN(* DisplayMenu)(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG *SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
Definition: ui.h:141
#define MachVideoSetDisplayMode(Mode, Init)
Definition: machine.h:92
VOID UiMessageBoxCritical(PCSTR MessageText)
Definition: ui.c:358
UCHAR UiMenuFgColor
Definition: ui.c:40
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
UCHAR UiSelectedTextColor
Definition: ui.c:43
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
VOID UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.c:261
unsigned int ULONG
Definition: retypes.h:1
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
Definition: inifile.c:54
const char * PCSTR
Definition: typedefs.h:51
VOID UiDrawBackdrop(VOID)
Definition: ui.c:241
VOID(* DrawCenteredText)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
Definition: ui.h:128
const UIVTBL TuiVtbl
Definition: tui.c:1044
UCHAR(* TextToFillStyle)(PCSTR FillStyleText)
Definition: ui.h:137
static LPHIST_ENTRY Top
Definition: history.c:53
#define VERT
Definition: ui.h:190
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
Definition: inifile.c:114
VOID(* UnInitialize)(VOID)
Definition: ui.h:120
#define MEDIUM_FILL
Definition: ui.h:158
VOID NoUiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: noui.c:83
char * Text
Definition: combotst.c:136
UCHAR UiEditBoxBgColor
Definition: ui.c:46
VOID NoUiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PCSTR Text, UCHAR Attr)
Definition: noui.c:40
VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: ui.c:251
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: mm.h:186