OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
GuiApp.h
Go to the documentation of this file.
1
8#ifndef GUI_APP_H
9#define GUI_APP_H
10
11#include "OpenCanopy.h"
12#include "BmfLib.h"
13
15
16#define BOOT_CURSOR_OFFSET 4U
17
18#define MAX_CURSOR_DIMENSION 144U
19#define MIN_CURSOR_DIMENSION BOOT_CURSOR_OFFSET
20
21#define BOOT_ENTRY_DIMENSION 144U
22#define BOOT_ENTRY_ICON_DIMENSION APPLE_DISK_ICON_DIMENSION
23#define BOOT_ENTRY_ICON_SPACE ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2)
24#define BOOT_ENTRY_LABEL_SPACE 4U
25#define BOOT_ENTRY_LABEL_HEIGHT 12U
26#define BOOT_ENTRY_LABEL_TEXT_OFFSET 2U
27
28#define BOOT_ENTRY_SPACE 8U
29
30#define BOOT_SELECTOR_WIDTH 144U
31#define BOOT_SELECTOR_BACKGROUND_DIMENSION BOOT_SELECTOR_WIDTH
32#define BOOT_SELECTOR_BUTTON_WIDTH BOOT_SELECTOR_WIDTH
33#define BOOT_SELECTOR_BUTTON_HEIGHT 40U
34#define BOOT_SELECTOR_BUTTON_SPACE (BOOT_ENTRY_LABEL_SPACE + BOOT_ENTRY_LABEL_HEIGHT + 3)
35#define BOOT_SELECTOR_HEIGHT (BOOT_SELECTOR_BACKGROUND_DIMENSION + BOOT_SELECTOR_BUTTON_SPACE + BOOT_SELECTOR_BUTTON_HEIGHT)
36
37#define BOOT_ENTRY_WIDTH (BOOT_ENTRY_DIMENSION)
38#define BOOT_ENTRY_HEIGHT (BOOT_ENTRY_DIMENSION + BOOT_ENTRY_LABEL_SPACE + BOOT_ENTRY_LABEL_HEIGHT)
39
40#define BOOT_SCROLL_BUTTON_DIMENSION 40U
41#define BOOT_SCROLL_BUTTON_SPACE 40U
42
43#define BOOT_ACTION_BUTTON_DIMENSION 128U
44#define BOOT_ACTION_BUTTON_FOCUS_DIMENSION 144U
45#define BOOT_ACTION_BUTTON_SPACE 36U
46
47#define PASSWORD_LOCK_DIMENSION 144U
48
49#define PASSWORD_ENTER_WIDTH 75U
50#define PASSWORD_ENTER_HEIGHT 30U
51
52#define PASSWORD_BOX_WIDTH 288U
53#define PASSWORD_BOX_HEIGHT 30U
54
55#define PASSWORD_DOT_DIMENSION 10U
56
73
101
108
109enum {
115
138
139EFI_STATUS
141 OUT GUI_DRAWING_CONTEXT *DrawContext,
142 IN BOOT_PICKER_GUI_CONTEXT *GuiContext
143 );
144
145VOID
147 IN OUT GUI_DRAWING_CONTEXT *DrawContext,
148 IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext
149 );
150
151EFI_STATUS
153 OUT GUI_DRAWING_CONTEXT *DrawContext,
154 IN BOOT_PICKER_GUI_CONTEXT *GuiContext,
155 IN GUI_CURSOR_GET_IMAGE GetCursorImage,
156 IN UINT8 NumBootEntries
157 );
158
159VOID
161 IN OUT GUI_DRAWING_CONTEXT *DrawContext,
162 IN BOOT_PICKER_GUI_CONTEXT *GuiContext,
163 IN UINT8 DefaultIndex
164 );
165
166EFI_STATUS
168 IN OC_PICKER_CONTEXT *Context,
169 IN BOOT_PICKER_GUI_CONTEXT *GuiContext,
170 IN OC_BOOT_ENTRY *Entry,
171 IN UINT8 EntryIndex
172 );
173
174VOID
176 IN OUT GUI_DRAWING_CONTEXT *DrawContext,
177 IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext
178 );
179
180CONST GUI_IMAGE *
182 IN BOOT_PICKER_GUI_CONTEXT *Context
183 );
184
185EFI_STATUS
187 IN BOOT_PICKER_GUI_CONTEXT *GuiContext,
188 IN OC_STORAGE_CONTEXT *Storage,
189 IN CHAR8 *FlavourName,
190 IN UINTN FlavourNameLen,
191 IN UINT32 IconTypeIndex,
192 IN BOOLEAN UseFlavourIcon,
193 OUT GUI_IMAGE *EntryIcon,
194 OUT BOOLEAN *CustomIcon
195 );
196
197#endif // GUI_APP_H
VOID BootPickerViewLateInitialize(IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN UINT8 DefaultIndex)
EFI_STATUS BootPickerEntriesSet(IN OC_PICKER_CONTEXT *Context, IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN OC_BOOT_ENTRY *Entry, IN UINT8 EntryIndex)
EFI_STATUS PasswordViewInitialize(OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext)
Definition Password.c:753
LABEL_TARGET
Definition GuiApp.h:57
@ LABEL_RESET_NVRAM
Definition GuiApp.h:65
@ LABEL_SHELL
Definition GuiApp.h:66
@ LABEL_APPLE
Definition GuiApp.h:59
@ LABEL_NUM_TOTAL
Definition GuiApp.h:71
@ LABEL_TOOL
Definition GuiApp.h:64
@ LABEL_OTHER
Definition GuiApp.h:63
@ LABEL_FIRMWARE_SETTINGS
Definition GuiApp.h:69
@ LABEL_SIP_IS_DISABLED
Definition GuiApp.h:68
@ LABEL_NETWORK_BOOT
Definition GuiApp.h:70
@ LABEL_GENERIC_HDD
Definition GuiApp.h:58
@ LABEL_APPLE_RECOVERY
Definition GuiApp.h:60
@ LABEL_APPLE_TIME_MACHINE
Definition GuiApp.h:61
@ LABEL_WINDOWS
Definition GuiApp.h:62
@ LABEL_SIP_IS_ENABLED
Definition GuiApp.h:67
VOID BootPickerViewDeinitialize(IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext)
ICON_TYPE
Definition GuiApp.h:102
@ ICON_TYPE_BASE
Definition GuiApp.h:103
@ ICON_TYPE_EXTERNAL
Definition GuiApp.h:104
@ ICON_TYPE_HELD
Definition GuiApp.h:105
@ ICON_TYPE_COUNT
Definition GuiApp.h:106
CONST GUI_IMAGE * InternalGetCursorImage(IN BOOT_PICKER_GUI_CONTEXT *Context)
Definition GuiApp.c:663
@ CanopyVoFocusRestart
Definition GuiApp.h:113
@ CanopyVoFocusShutDown
Definition GuiApp.h:112
@ CanopyVoSelectedEntry
Definition GuiApp.h:110
@ CanopyVoFocusPassword
Definition GuiApp.h:111
struct _BOOT_PICKER_GUI_CONTEXT BOOT_PICKER_GUI_CONTEXT
Definition OpenCanopy.h:19
ICON_TARGET
Definition GuiApp.h:74
@ ICON_APPLE_RECOVERY
Definition GuiApp.h:92
@ ICON_ENTER
Definition GuiApp.h:86
@ ICON_NUM_TOTAL
Definition GuiApp.h:99
@ ICON_SET_DEFAULT
Definition GuiApp.h:78
@ ICON_LOCK
Definition GuiApp.h:87
@ ICON_TOOL
Definition GuiApp.h:96
@ ICON_NUM_MANDATORY
Definition GuiApp.h:90
@ ICON_OTHER
Definition GuiApp.h:95
@ ICON_CURSOR
Definition GuiApp.h:75
@ ICON_APPLE
Definition GuiApp.h:91
@ ICON_DOT
Definition GuiApp.h:85
@ ICON_SELECTOR
Definition GuiApp.h:77
@ ICON_NUM_SYS
Definition GuiApp.h:88
@ ICON_GENERIC_HDD
Definition GuiApp.h:89
@ ICON_LEFT
Definition GuiApp.h:79
@ ICON_BUTTON_FOCUS
Definition GuiApp.h:83
@ ICON_RESTART
Definition GuiApp.h:82
@ ICON_WINDOWS
Definition GuiApp.h:94
@ ICON_APPLE_TIME_MACHINE
Definition GuiApp.h:93
@ ICON_SHELL
Definition GuiApp.h:98
@ ICON_RESET_NVRAM
Definition GuiApp.h:97
@ ICON_RIGHT
Definition GuiApp.h:80
@ ICON_SELECTED
Definition GuiApp.h:76
@ ICON_SHUT_DOWN
Definition GuiApp.h:81
@ ICON_PASSWORD
Definition GuiApp.h:84
EFI_STATUS BootPickerViewInitialize(OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN GUI_CURSOR_GET_IMAGE GetCursorImage, IN UINT8 NumBootEntries)
EFI_STATUS InternalGetFlavourIcon(IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN OC_STORAGE_CONTEXT *Storage, IN CHAR8 *FlavourName, IN UINTN FlavourNameLen, IN UINT32 IconTypeIndex, IN BOOLEAN UseFlavourIcon, OUT GUI_IMAGE *EntryIcon, OUT BOOLEAN *CustomIcon)
Definition GuiApp.c:287
VOID PasswordViewDeinitialize(IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext)
Definition Password.c:864
CONST GUI_IMAGE *(* GUI_CURSOR_GET_IMAGE)(IN BOOT_PICKER_GUI_CONTEXT *Context)
Definition OpenCanopy.h:136
CONST CHAR8 * Prefix
Definition GuiApp.h:122
GUI_IMAGE Labels[LABEL_NUM_TOTAL]
Definition GuiApp.h:119
OC_PICKER_CONTEXT * PickerContext
Definition GuiApp.h:136
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION BackgroundColor
Definition GuiApp.h:124
GUI_FONT_CONTEXT FontContext
Definition GuiApp.h:121
GUI_IMAGE Icons[ICON_NUM_TOTAL][ICON_TYPE_COUNT]
Definition GuiApp.h:118