ReactOS 0.4.15-dev-8428-g6910fa6
gui.h
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
20#pragma once
21
22#define TITLE_BOX_CHAR_HEIGHT 5
23
24/* Graphical User Interface Functions ****************************************/
25
26VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
27VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
28VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
29VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr); // Draws a box around the area specified
30VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
31VOID GuiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
32VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
33VOID GuiUpdateDateTime(VOID); // Updates the date and time
34
35/* Saves the screen so that it can be restored later */
39GuiSaveScreen(VOID);
40
41/* Restores the screen from a previous save */
42VOID
45
46/* Displays a message box on the screen with an ok button */
47VOID
49 _In_ PCSTR MessageText);
50
51/* Displays a message box on the screen with an ok button using no system resources */
52VOID
54 _In_ PCSTR MessageText);
55
56VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled
57
58UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
59UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
60
61/* Menu Functions ************************************************************/
62
65 IN PCSTR MenuHeader,
66 IN PCSTR MenuFooter OPTIONAL,
67 IN BOOLEAN ShowBootOptions,
68 IN PCSTR MenuItemList[],
69 IN ULONG MenuItemCount,
70 IN ULONG DefaultMenuItem,
71 IN LONG MenuTimeOut,
72 OUT PULONG SelectedMenuItem,
73 IN BOOLEAN CanEscape,
76
77extern const UIVTBL GuiVtbl;
unsigned char BOOLEAN
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
VOID GuiDrawBackdrop(VOID)
Definition: gui.c:22
VOID GuiRestoreScreen(_In_opt_ __drv_freesMem(Mem) PUCHAR Buffer)
Definition: gui.c:63
UCHAR GuiTextToFillStyle(PCSTR FillStyleText)
Definition: gui.c:89
VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: gui.c:30
VOID GuiDrawStatusText(PCSTR StatusText)
Definition: gui.c:46
VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: gui.c:34
VOID GuiMessageBox(_In_ PCSTR MessageText)
Definition: gui.c:69
VOID GuiDrawProgressBar(ULONG Position, ULONG Range)
Definition: gui.c:80
const UIVTBL GuiVtbl
Definition: gui.c:94
VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr)
Definition: gui.c:26
VOID GuiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: gui.c:75
UCHAR GuiTextToColor(PCSTR ColorText)
Definition: gui.c:84
BOOLEAN GuiDisplayMenu(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 GuiUpdateDateTime(VOID)
Definition: gui.c:50
VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
Definition: gui.c:38
VOID GuiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PUCHAR Text, UCHAR Attr)
Definition: gui.c:42
BOOLEAN(* UiMenuKeyPressFilterCallback)(IN ULONG KeyPress, IN ULONG SelectedMenuItem, IN PVOID Context OPTIONAL)
Definition: ui.h:224
Definition: bufpool.h:45
char * Text
Definition: combotst.c:136
#define Y(I)
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:107
#define __drv_freesMem(kind)
Definition: driverspecs.h:272
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:257
#define _Ret_maybenull_
Definition: ms_sal.h:529
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: range.c:39
Definition: ui.h:249
static COORD Position
Definition: mouse.c:34
uint32_t * PULONG
Definition: typedefs.h:59
const char * PCSTR
Definition: typedefs.h:52
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
unsigned char UCHAR
Definition: xmlstorage.h:181