Go to the source code of this file.
|
static VOID | TuiCalcMenuBoxSize (_In_ PUI_MENU_INFO MenuInfo) |
|
static ULONG | TuiProcessMenuKeyboardEvent (_In_ PUI_MENU_INFO MenuInfo, _In_ UiMenuKeyPressFilterCallback KeyPressFilter) |
|
static VOID | TuiDrawMenuTimeout (_In_ PUI_MENU_INFO MenuInfo) |
|
BOOLEAN | TuiDisplayMenu (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 | TuiDrawMenu (_In_ PUI_MENU_INFO MenuInfo) |
|
VOID | TuiDrawMenuBox (_In_ PUI_MENU_INFO MenuInfo) |
|
VOID | TuiDrawMenuItem (_In_ PUI_MENU_INFO MenuInfo, _In_ ULONG MenuItemNumber) |
|
◆ TuiCalcMenuBoxSize()
Definition at line 155 of file tuimenu.c.
157{
162
163
166
167
169 {
170
172 {
175 }
176 }
177
178
180
181#ifndef _M_ARM
182
184 {
185
189 }
190 else
191#endif
192 {
193
196 }
197
198
201}
ACPI_SIZE strlen(const char *String)
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
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define TUI_TITLE_BOX_CHAR_HEIGHT
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
Referenced by TuiDisplayMenu().
◆ TuiDisplayMenu()
BOOLEAN TuiDisplayMenu |
( |
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 30 of file tuimenu.c.
42{
44 ULONG LastClockSecond;
45 ULONG CurrentClockSecond;
47
48
49
50
51
52
53
55 {
56
60
61
62
63
64
65 if (KeyPressFilter(KeyPress, DefaultMenuItem,
Context))
66 {
67
68 MenuTimeOut = -1;
69 }
70 }
71
72
73 if (!MenuTimeOut)
74 {
75
76 if (SelectedMenuItem) *SelectedMenuItem = DefaultMenuItem;
78 }
79
80
89
90
92
93
94#ifdef _M_ARM
95 UiDrawMenu(&MenuInformation);
96#else
98#endif
99
100
102
103
105 {
106
108
109
112
113
115 if (CurrentClockSecond != LastClockSecond)
116 {
117
118 LastClockSecond = CurrentClockSecond;
119
120#ifndef _M_ARM
121
123#endif
124
125
127 {
130 }
132 {
133
134#ifndef _M_ARM
136#endif
137 break;
138 }
139#ifndef _M_ARM
141#endif
142 }
143
144#ifndef _M_ARM
146#endif
147 }
148
149
152}
TIMEINFO * ArcGetTime(VOID)
VOID VideoCopyOffScreenBufferToVRAM(VOID)
VOID(* DrawMenu)(PUI_MENU_INFO MenuInfo)
VOID TuiUpdateDateTime(VOID)
◆ TuiDrawMenu()
Definition at line 204 of file tuimenu.c.
206{
208
209#ifndef _M_ARM
210
212#else
213
214
216 {
221 }
222
223#endif
224
225
227
228
230 {
232 }
233
234#ifndef _M_ARM
235
236
238
239#else
240
241
244 "Use \x18 and \x19 to move the highlight to your choice.",
248 "Press ENTER to choose.",
250
251
253 {
258 }
259
260#endif
261
262
264 {
266 }
267
268#ifndef _M_ARM
270#endif
271}
VOID DisplayBootTimeOptions(VOID)
VOID(* DrawStatusText)(PCSTR StatusText)
VOID UiDrawText(_In_ ULONG X, _In_ ULONG Y, _In_ PCSTR Text, _In_ UCHAR Attr)
#define ATTR(cFore, cBack)
VOID UiDrawBackdrop(VOID)
◆ TuiDrawMenuBox()
Definition at line 400 of file tuimenu.c.
402{
403#ifndef _M_ARM
404
406 {
416 }
417
418
420#endif
421
423}
VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Referenced by MiniTuiDrawMenu(), and TuiDrawMenu().
◆ TuiDrawMenuItem()
Definition at line 426 of file tuimenu.c.
429{
433 CHAR MenuLineText[80];
434
435
437 {
438#ifndef _M_ARM
439
441 {
444 "\xC7",
446 }
447#endif
448
449
453 0xC4);
454
455
458 MenuLineText,
460
461#ifndef _M_ARM
462
464 {
467 "\xB6",
469 }
470#endif
471
472
473 return;
474 }
475
476
478
479#ifndef _M_ARM
480
482 {
483
484
485
486
490 SpaceLeft = (SpaceTotal / 2) + 1;
491 SpaceRight = (SpaceTotal - SpaceLeft) + 1;
492 }
493 else
494#endif
495 {
496
497 SpaceLeft = 4;
498 SpaceRight = 0;
499 }
500
501
503 "%*s%s%*s",
504 SpaceLeft, "",
505 MenuInfo->MenuItemList[MenuItemNumber],
506 SpaceRight, "");
507
508 if (MenuItemNumber ==
MenuInfo->SelectedMenuItem)
509 {
510
512 }
513 else
514 {
515
517 }
518
519
522 MenuLineText,
523 Attribute);
524}
#define RtlFillMemory(Dest, Length, Fill)
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
#define RtlZeroMemory(Destination, Length)
UCHAR UiSelectedTextColor
UCHAR UiSelectedTextBgColor
Referenced by MiniTuiDrawMenu(), TuiDrawMenu(), and TuiProcessMenuKeyboardEvent().
◆ TuiDrawMenuTimeout()
How to pad/fill:
Center Box What to do: 0 0 or 1 Pad on the right with blanks. 1 0 Pad on the left with blanks. 1 1 Pad on the left with blanks + box bottom border.
Definition at line 274 of file tuimenu.c.
276{
278 CHAR MenuLineText[80];
279
280
281 if (
MenuInfo->MenuTimeRemaining >= 0)
282 {
283
284
287 {
288
289
290
293 }
295
297 {
298
299
301 "%.*s%d%s",
305 }
306 else
307 {
308
309
311 "%s %d",
314 }
315
317 }
318 else
319 {
320
322 }
323
333#ifndef _M_ARM
335 {
336
337
346
348 {
349
356
357
358
359 }
360
362 {
363
366 MenuLineText,
368 }
369 }
370 else
371#endif
372 {
374 {
375
378 MenuLineText,
380 }
381
382
383
388#ifndef _M_ARM
391#else
392 0,
394#endif
395 );
396 }
397}
char * strchr(const char *String, int ch)
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
VOID TuiDrawBoxBottomLine(_In_ ULONG Left, _In_ ULONG Bottom, _In_ ULONG Right, _In_ UCHAR VertStyle, _In_ UCHAR HorzStyle, _In_ UCHAR Attr)
UCHAR UiBackdropFillStyle
Referenced by TuiDisplayMenu(), TuiDrawMenuBox(), and TuiProcessMenuKeyboardEvent().
◆ TuiProcessMenuKeyboardEvent()
Definition at line 527 of file tuimenu.c.
530{
533
534
536 return 0;
537
538
539 if (
MenuInfo->MenuTimeRemaining != -1)
540 {
541
544 }
545
546
550
551
552
553
554
555 if (KeyPressFilter &&
557 {
558
559#ifdef _M_ARM
561#else
563#endif
564 return 0;
565 }
566
567
570 {
571
572 Selected =
MenuInfo->SelectedMenuItem;
574
575
576 if ((KeyEvent ==
KEY_UP) && (Selected > 0))
577 {
578
581 Selected--;
582
583
584 if ((Selected > 0) &&
586 {
588 }
589 }
590 else if ( ((KeyEvent ==
KEY_UP) && (Selected == 0)) ||
592 {
593
596 }
598 {
599
602 Selected++;
603
604
605 if ((Selected <
Count) &&
607 {
609 }
610 }
613 {
614
617 }
618
619
621#ifndef _M_ARM
623#endif
624 }
625
626
627 return KeyEvent;
628}
Referenced by TuiDisplayMenu().