OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
GuiApp.h File Reference
#include "OpenCanopy.h"
#include "BmfLib.h"
#include <Library/OcBootManagementLib.h>

Go to the source code of this file.

Data Structures

struct  _BOOT_PICKER_GUI_CONTEXT
 

Macros

#define BOOT_CURSOR_OFFSET   4U
 
#define MAX_CURSOR_DIMENSION   144U
 
#define MIN_CURSOR_DIMENSION   BOOT_CURSOR_OFFSET
 
#define BOOT_ENTRY_DIMENSION   144U
 
#define BOOT_ENTRY_ICON_DIMENSION   APPLE_DISK_ICON_DIMENSION
 
#define BOOT_ENTRY_ICON_SPACE   ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2)
 
#define BOOT_ENTRY_LABEL_SPACE   4U
 
#define BOOT_ENTRY_LABEL_HEIGHT   12U
 
#define BOOT_ENTRY_LABEL_TEXT_OFFSET   2U
 
#define BOOT_ENTRY_SPACE   8U
 
#define BOOT_SELECTOR_WIDTH   144U
 
#define BOOT_SELECTOR_BACKGROUND_DIMENSION   BOOT_SELECTOR_WIDTH
 
#define BOOT_SELECTOR_BUTTON_WIDTH   BOOT_SELECTOR_WIDTH
 
#define BOOT_SELECTOR_BUTTON_HEIGHT   40U
 
#define BOOT_SELECTOR_BUTTON_SPACE   (BOOT_ENTRY_LABEL_SPACE + BOOT_ENTRY_LABEL_HEIGHT + 3)
 
#define BOOT_SELECTOR_HEIGHT   (BOOT_SELECTOR_BACKGROUND_DIMENSION + BOOT_SELECTOR_BUTTON_SPACE + BOOT_SELECTOR_BUTTON_HEIGHT)
 
#define BOOT_ENTRY_WIDTH   (BOOT_ENTRY_DIMENSION)
 
#define BOOT_ENTRY_HEIGHT   (BOOT_ENTRY_DIMENSION + BOOT_ENTRY_LABEL_SPACE + BOOT_ENTRY_LABEL_HEIGHT)
 
#define BOOT_SCROLL_BUTTON_DIMENSION   40U
 
#define BOOT_SCROLL_BUTTON_SPACE   40U
 
#define BOOT_ACTION_BUTTON_DIMENSION   128U
 
#define BOOT_ACTION_BUTTON_FOCUS_DIMENSION   144U
 
#define BOOT_ACTION_BUTTON_SPACE   36U
 
#define PASSWORD_LOCK_DIMENSION   144U
 
#define PASSWORD_ENTER_WIDTH   75U
 
#define PASSWORD_ENTER_HEIGHT   30U
 
#define PASSWORD_BOX_WIDTH   288U
 
#define PASSWORD_BOX_HEIGHT   30U
 
#define PASSWORD_DOT_DIMENSION   10U
 

Typedefs

typedef struct _BOOT_PICKER_GUI_CONTEXT BOOT_PICKER_GUI_CONTEXT
 

Enumerations

enum  LABEL_TARGET {
  LABEL_GENERIC_HDD , LABEL_APPLE , LABEL_APPLE_RECOVERY , LABEL_APPLE_TIME_MACHINE ,
  LABEL_WINDOWS , LABEL_OTHER , LABEL_TOOL , LABEL_RESET_NVRAM ,
  LABEL_SHELL , LABEL_SIP_IS_ENABLED , LABEL_SIP_IS_DISABLED , LABEL_FIRMWARE_SETTINGS ,
  LABEL_NETWORK_BOOT , LABEL_NUM_TOTAL
}
 
enum  ICON_TARGET {
  ICON_CURSOR , ICON_SELECTED , ICON_SELECTOR , ICON_SET_DEFAULT ,
  ICON_LEFT , ICON_RIGHT , ICON_SHUT_DOWN , ICON_RESTART ,
  ICON_BUTTON_FOCUS , ICON_PASSWORD , ICON_DOT , ICON_ENTER ,
  ICON_LOCK , ICON_NUM_SYS , ICON_GENERIC_HDD = ICON_NUM_SYS , ICON_NUM_MANDATORY ,
  ICON_APPLE = ICON_NUM_MANDATORY , ICON_APPLE_RECOVERY , ICON_APPLE_TIME_MACHINE , ICON_WINDOWS ,
  ICON_OTHER , ICON_TOOL , ICON_RESET_NVRAM , ICON_SHELL ,
  ICON_NUM_TOTAL
}
 
enum  ICON_TYPE { ICON_TYPE_BASE = 0 , ICON_TYPE_EXTERNAL = 1 , ICON_TYPE_HELD = 1 , ICON_TYPE_COUNT = 2 }
 
enum  { CanopyVoSelectedEntry , CanopyVoFocusPassword , CanopyVoFocusShutDown , CanopyVoFocusRestart }
 

Functions

EFI_STATUS PasswordViewInitialize (OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext)
 
VOID PasswordViewDeinitialize (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext)
 
EFI_STATUS BootPickerViewInitialize (OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN GUI_CURSOR_GET_IMAGE GetCursorImage, IN UINT8 NumBootEntries)
 
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)
 
VOID BootPickerViewDeinitialize (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN OUT BOOT_PICKER_GUI_CONTEXT *GuiContext)
 
CONST GUI_IMAGEInternalGetCursorImage (IN BOOT_PICKER_GUI_CONTEXT *Context)
 
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)
 

Detailed Description

This file is part of OpenCanopy, OpenCore GUI.

Copyright (c) 2018-2019, Download-Fritz. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file GuiApp.h.

Macro Definition Documentation

◆ BOOT_ACTION_BUTTON_DIMENSION

#define BOOT_ACTION_BUTTON_DIMENSION   128U

Definition at line 43 of file GuiApp.h.

◆ BOOT_ACTION_BUTTON_FOCUS_DIMENSION

#define BOOT_ACTION_BUTTON_FOCUS_DIMENSION   144U

Definition at line 44 of file GuiApp.h.

◆ BOOT_ACTION_BUTTON_SPACE

#define BOOT_ACTION_BUTTON_SPACE   36U

Definition at line 45 of file GuiApp.h.

◆ BOOT_CURSOR_OFFSET

#define BOOT_CURSOR_OFFSET   4U

Definition at line 16 of file GuiApp.h.

◆ BOOT_ENTRY_DIMENSION

#define BOOT_ENTRY_DIMENSION   144U

Definition at line 21 of file GuiApp.h.

◆ BOOT_ENTRY_HEIGHT

Definition at line 38 of file GuiApp.h.

◆ BOOT_ENTRY_ICON_DIMENSION

#define BOOT_ENTRY_ICON_DIMENSION   APPLE_DISK_ICON_DIMENSION

Definition at line 22 of file GuiApp.h.

◆ BOOT_ENTRY_ICON_SPACE

#define BOOT_ENTRY_ICON_SPACE   ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2)

Definition at line 23 of file GuiApp.h.

◆ BOOT_ENTRY_LABEL_HEIGHT

#define BOOT_ENTRY_LABEL_HEIGHT   12U

Definition at line 25 of file GuiApp.h.

◆ BOOT_ENTRY_LABEL_SPACE

#define BOOT_ENTRY_LABEL_SPACE   4U

Definition at line 24 of file GuiApp.h.

◆ BOOT_ENTRY_LABEL_TEXT_OFFSET

#define BOOT_ENTRY_LABEL_TEXT_OFFSET   2U

Definition at line 26 of file GuiApp.h.

◆ BOOT_ENTRY_SPACE

#define BOOT_ENTRY_SPACE   8U

Definition at line 28 of file GuiApp.h.

◆ BOOT_ENTRY_WIDTH

#define BOOT_ENTRY_WIDTH   (BOOT_ENTRY_DIMENSION)

Definition at line 37 of file GuiApp.h.

◆ BOOT_SCROLL_BUTTON_DIMENSION

#define BOOT_SCROLL_BUTTON_DIMENSION   40U

Definition at line 40 of file GuiApp.h.

◆ BOOT_SCROLL_BUTTON_SPACE

#define BOOT_SCROLL_BUTTON_SPACE   40U

Definition at line 41 of file GuiApp.h.

◆ BOOT_SELECTOR_BACKGROUND_DIMENSION

#define BOOT_SELECTOR_BACKGROUND_DIMENSION   BOOT_SELECTOR_WIDTH

Definition at line 31 of file GuiApp.h.

◆ BOOT_SELECTOR_BUTTON_HEIGHT

#define BOOT_SELECTOR_BUTTON_HEIGHT   40U

Definition at line 33 of file GuiApp.h.

◆ BOOT_SELECTOR_BUTTON_SPACE

#define BOOT_SELECTOR_BUTTON_SPACE   (BOOT_ENTRY_LABEL_SPACE + BOOT_ENTRY_LABEL_HEIGHT + 3)

Definition at line 34 of file GuiApp.h.

◆ BOOT_SELECTOR_BUTTON_WIDTH

#define BOOT_SELECTOR_BUTTON_WIDTH   BOOT_SELECTOR_WIDTH

Definition at line 32 of file GuiApp.h.

◆ BOOT_SELECTOR_HEIGHT

Definition at line 35 of file GuiApp.h.

◆ BOOT_SELECTOR_WIDTH

#define BOOT_SELECTOR_WIDTH   144U

Definition at line 30 of file GuiApp.h.

◆ MAX_CURSOR_DIMENSION

#define MAX_CURSOR_DIMENSION   144U

Definition at line 18 of file GuiApp.h.

◆ MIN_CURSOR_DIMENSION

#define MIN_CURSOR_DIMENSION   BOOT_CURSOR_OFFSET

Definition at line 19 of file GuiApp.h.

◆ PASSWORD_BOX_HEIGHT

#define PASSWORD_BOX_HEIGHT   30U

Definition at line 53 of file GuiApp.h.

◆ PASSWORD_BOX_WIDTH

#define PASSWORD_BOX_WIDTH   288U

Definition at line 52 of file GuiApp.h.

◆ PASSWORD_DOT_DIMENSION

#define PASSWORD_DOT_DIMENSION   10U

Definition at line 55 of file GuiApp.h.

◆ PASSWORD_ENTER_HEIGHT

#define PASSWORD_ENTER_HEIGHT   30U

Definition at line 50 of file GuiApp.h.

◆ PASSWORD_ENTER_WIDTH

#define PASSWORD_ENTER_WIDTH   75U

Definition at line 49 of file GuiApp.h.

◆ PASSWORD_LOCK_DIMENSION

#define PASSWORD_LOCK_DIMENSION   144U

Definition at line 47 of file GuiApp.h.

Typedef Documentation

◆ BOOT_PICKER_GUI_CONTEXT

Definition at line 19 of file OpenCanopy.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CanopyVoSelectedEntry 
CanopyVoFocusPassword 
CanopyVoFocusShutDown 
CanopyVoFocusRestart 

Definition at line 109 of file GuiApp.h.

◆ ICON_TARGET

Enumerator
ICON_CURSOR 
ICON_SELECTED 
ICON_SELECTOR 
ICON_SET_DEFAULT 
ICON_LEFT 
ICON_RIGHT 
ICON_SHUT_DOWN 
ICON_RESTART 
ICON_BUTTON_FOCUS 
ICON_PASSWORD 
ICON_DOT 
ICON_ENTER 
ICON_LOCK 
ICON_NUM_SYS 
ICON_GENERIC_HDD 
ICON_NUM_MANDATORY 
ICON_APPLE 
ICON_APPLE_RECOVERY 
ICON_APPLE_TIME_MACHINE 
ICON_WINDOWS 
ICON_OTHER 
ICON_TOOL 
ICON_RESET_NVRAM 
ICON_SHELL 
ICON_NUM_TOTAL 

Definition at line 74 of file GuiApp.h.

◆ ICON_TYPE

enum ICON_TYPE
Enumerator
ICON_TYPE_BASE 
ICON_TYPE_EXTERNAL 
ICON_TYPE_HELD 
ICON_TYPE_COUNT 

Definition at line 102 of file GuiApp.h.

◆ LABEL_TARGET

Enumerator
LABEL_GENERIC_HDD 
LABEL_APPLE 
LABEL_APPLE_RECOVERY 
LABEL_APPLE_TIME_MACHINE 
LABEL_WINDOWS 
LABEL_OTHER 
LABEL_TOOL 
LABEL_RESET_NVRAM 
LABEL_SHELL 
LABEL_SIP_IS_ENABLED 
LABEL_SIP_IS_DISABLED 
LABEL_FIRMWARE_SETTINGS 
LABEL_NETWORK_BOOT 
LABEL_NUM_TOTAL 

Definition at line 57 of file GuiApp.h.

Function Documentation

◆ BootPickerEntriesSet()

EFI_STATUS BootPickerEntriesSet ( IN OC_PICKER_CONTEXT * Context,
IN BOOT_PICKER_GUI_CONTEXT * GuiContext,
IN OC_BOOT_ENTRY * Entry,
IN UINT8 EntryIndex )

Definition at line 1394 of file BootPicker.c.

◆ BootPickerViewDeinitialize()

VOID BootPickerViewDeinitialize ( IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN OUT BOOT_PICKER_GUI_CONTEXT * GuiContext )

Definition at line 2132 of file BootPicker.c.

◆ BootPickerViewInitialize()

EFI_STATUS BootPickerViewInitialize ( OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * GuiContext,
IN GUI_CURSOR_GET_IMAGE GetCursorImage,
IN UINT8 NumBootEntries )

Definition at line 1896 of file BootPicker.c.

◆ BootPickerViewLateInitialize()

VOID BootPickerViewLateInitialize ( IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * GuiContext,
IN UINT8 DefaultIndex )

Definition at line 2096 of file BootPicker.c.

◆ InternalGetCursorImage()

CONST GUI_IMAGE * InternalGetCursorImage ( IN BOOT_PICKER_GUI_CONTEXT * Context)

Definition at line 663 of file GuiApp.c.

◆ InternalGetFlavourIcon()

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 at line 287 of file GuiApp.c.

◆ PasswordViewDeinitialize()

VOID PasswordViewDeinitialize ( IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN OUT BOOT_PICKER_GUI_CONTEXT * GuiContext )

Definition at line 864 of file Password.c.

◆ PasswordViewInitialize()

EFI_STATUS PasswordViewInitialize ( OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * GuiContext )

Definition at line 753 of file Password.c.