OpenCore  1.0.4
OpenCore Bootloader
1.0.4
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OpenCanopy.h File Reference
#include <Library/OcBootManagementLib.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/SimpleTextIn.h>

Go to the source code of this file.

Data Structures

union  GUI_PTR_POSITION
 
struct  GUI_PTR_EVENT
 
struct  GUI_KEY_CONTEXT_
 
struct  GUI_ANIMATION
 
struct  GUI_OBJ_
 
struct  GUI_OBJ_CHILD_
 
struct  GUI_IMAGE
 
struct  GUI_SCREEN_CURSOR_
 
struct  GUI_VIEW_CONTEXT
 
struct  GUI_DRAWING_CONTEXT_
 
struct  GUI_INTERPOLATION
 

Typedefs

typedef struct GUI_OBJ_ GUI_OBJ
 
typedef struct GUI_DRAWING_CONTEXT_ GUI_DRAWING_CONTEXT
 
typedef OC_PICKER_KEY_INFO GUI_KEY_EVENT
 
typedef VOID(* GUI_OBJ_DRAW) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN UINT32 OffsetX, IN UINT32 OffsetY, IN UINT32 Width, IN UINT32 Height, IN UINT8 Opacity)
 
typedef GUI_OBJ *(* GUI_OBJ_PTR_EVENT) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN CONST GUI_PTR_EVENT *Event)
 
typedef VOID(* GUI_OBJ_KEY_EVENT) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN CONST GUI_KEY_EVENT *KeyEvent)
 
typedef VOID(* GUI_OBJ_FOCUS) (IN CONST GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOLEAN Focus)
 
typedef BOOLEAN(* GUI_ANIMATE) (IN BOOT_PICKER_GUI_CONTEXT *Context, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN UINT64 CurrentTime)
 
typedef struct GUI_OBJ_CHILD_ GUI_OBJ_CHILD
 
typedef struct GUI_SCREEN_CURSOR_ GUI_SCREEN_CURSOR
 
typedef CONST GUI_IMAGE *(* GUI_CURSOR_GET_IMAGE) (IN BOOT_PICKER_GUI_CONTEXT *Context)
 
typedef BOOLEAN(* GUI_EXIT_LOOP) (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context)
 

Enumerations

enum  { GuiPointerPrimaryDown , GuiPointerPrimaryUp , GuiPointerPrimaryDoubleClick }
 
enum  GUI_INTERPOL_TYPE { GuiInterpolTypeLinear , GuiInterpolTypeSmooth }
 

Functions

EFI_STATUS GuiPngToImage (OUT GUI_IMAGE *Image, IN VOID *ImageData, IN UINTN ImageDataSize, IN BOOLEAN PremultiplyAlpha)
 
EFI_STATUS GuiIcnsToImageIcon (OUT GUI_IMAGE *Image, IN VOID *IcnsImage, IN UINT32 IcnsImageSize, IN UINT8 Scale, IN UINT32 MatchWidth, IN UINT32 MatchHeight, IN BOOLEAN AllowLess)
 
EFI_STATUS GuiLabelToImage (OUT GUI_IMAGE *Image, IN VOID *RawData, IN UINT32 DataLength, IN UINT8 Scale, IN BOOLEAN Inverted)
 
VOID GuiObjDrawDelegate (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN UINT32 OffsetX, IN UINT32 OffsetY, IN UINT32 Width, IN UINT32 Height, IN UINT8 Opacity)
 
GUI_OBJGuiObjDelegatePtrEvent (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN CONST GUI_PTR_EVENT *Event)
 
BOOLEAN GuiClipChildBounds (IN INT64 ChildOffset, IN UINT32 ChildLength, IN OUT UINT32 *ReqOffset, IN OUT UINT32 *ReqLength)
 
VOID GuiDrawToBuffer (IN CONST GUI_IMAGE *Image, IN UINT8 Opacity, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN INT64 BaseX, IN INT64 BaseY, IN UINT32 OffsetX, IN UINT32 OffsetY, IN UINT32 Width, IN UINT32 Height)
 
VOID GuiDrawToBufferFill (IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Colour, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN UINT32 PosX, IN UINT32 PosY, IN UINT32 Width, IN UINT32 Height)
 
VOID GuiRequestDraw (IN UINT32 PosX, IN UINT32 PosY, IN UINT32 Width, IN UINT32 Height)
 
VOID GuiRequestDrawCrop (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN INT64 X, IN INT64 Y, IN UINT32 Width, IN UINT32 Height)
 
VOID GuiViewInitialize (OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN CONST GUI_VIEW_CONTEXT *ViewContext)
 
VOID GuiViewDeinitialize (IN OUT GUI_DRAWING_CONTEXT *DrawContext, OUT BOOT_PICKER_GUI_CONTEXT *GuiContext)
 
VOID GuiRedrawAndFlushScreen (IN OUT GUI_DRAWING_CONTEXT *DrawContext)
 
VOID GuiDrawLoop (IN OUT GUI_DRAWING_CONTEXT *DrawContext)
 
VOID GuiClearScreen (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Pixel)
 
EFI_STATUS GuiLibConstruct (IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN INT32 CursorOffsetX, IN INT32 CursorOffsetY)
 
VOID GuiLibDestruct (VOID)
 
VOID GuiBlendPixel (IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackPixel, IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FrontPixel, IN UINT8 Opacity)
 
VOID GuiBlendPixelSolid (IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackPixel, IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FrontPixel)
 
VOID GuiBlendPixelOpaque (IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackPixel, IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FrontPixel, IN UINT8 Opacity)
 
EFI_STATUS GuiCreateHighlightedImage (OUT GUI_IMAGE *SelectedImage, IN CONST GUI_IMAGE *SourceImage, IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL *HighlightPixel)
 
UINT32 GuiGetInterpolatedValue (IN CONST GUI_INTERPOLATION *Interpol, IN UINT64 CurrentTime)
 
VOID GuiGetBaseCoords (IN GUI_OBJ *This, IN GUI_DRAWING_CONTEXT *DrawContext, OUT INT64 *BaseX, OUT INT64 *BaseY)
 

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 OpenCanopy.h.

Typedef Documentation

◆ GUI_ANIMATE

typedef BOOLEAN(* GUI_ANIMATE) (IN BOOT_PICKER_GUI_CONTEXT *Context, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN UINT64 CurrentTime)

Definition at line 92 of file OpenCanopy.h.

◆ GUI_CURSOR_GET_IMAGE

typedef CONST GUI_IMAGE *(* GUI_CURSOR_GET_IMAGE) (IN BOOT_PICKER_GUI_CONTEXT *Context)

Definition at line 135 of file OpenCanopy.h.

◆ GUI_DRAWING_CONTEXT

Definition at line 16 of file OpenCanopy.h.

◆ GUI_EXIT_LOOP

typedef BOOLEAN(* GUI_EXIT_LOOP) (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context)

Definition at line 141 of file OpenCanopy.h.

◆ GUI_KEY_EVENT

Definition at line 40 of file OpenCanopy.h.

◆ GUI_OBJ

typedef struct GUI_OBJ_ GUI_OBJ

Definition at line 15 of file OpenCanopy.h.

◆ GUI_OBJ_CHILD

typedef struct GUI_OBJ_CHILD_ GUI_OBJ_CHILD

Definition at line 105 of file OpenCanopy.h.

◆ GUI_OBJ_DRAW

typedef VOID(* GUI_OBJ_DRAW) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN UINT32 OffsetX, IN UINT32 OffsetY, IN UINT32 Width, IN UINT32 Height, IN UINT8 Opacity)

Definition at line 49 of file OpenCanopy.h.

◆ GUI_OBJ_FOCUS

typedef VOID(* GUI_OBJ_FOCUS) (IN CONST GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOLEAN Focus)

Definition at line 84 of file OpenCanopy.h.

◆ GUI_OBJ_KEY_EVENT

typedef VOID(* GUI_OBJ_KEY_EVENT) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN CONST GUI_KEY_EVENT *KeyEvent)

Definition at line 75 of file OpenCanopy.h.

◆ GUI_OBJ_PTR_EVENT

typedef GUI_OBJ *(* GUI_OBJ_PTR_EVENT) (IN OUT GUI_OBJ *This, IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN BOOT_PICKER_GUI_CONTEXT *Context, IN INT64 BaseX, IN INT64 BaseY, IN CONST GUI_PTR_EVENT *Event)

Definition at line 64 of file OpenCanopy.h.

◆ GUI_SCREEN_CURSOR

Definition at line 132 of file OpenCanopy.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GuiPointerPrimaryDown 
GuiPointerPrimaryUp 
GuiPointerPrimaryDoubleClick 

Definition at line 21 of file OpenCanopy.h.

◆ GUI_INTERPOL_TYPE

Enumerator
GuiInterpolTypeLinear 
GuiInterpolTypeSmooth 

Definition at line 347 of file OpenCanopy.h.

Function Documentation

◆ GuiBlendPixel()

VOID GuiBlendPixel ( IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BackPixel,
IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL * FrontPixel,
IN UINT8 Opacity )

Definition at line 126 of file Blending.c.

◆ GuiBlendPixelOpaque()

VOID GuiBlendPixelOpaque ( IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BackPixel,
IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL * FrontPixel,
IN UINT8 Opacity )

Definition at line 60 of file Blending.c.

◆ GuiBlendPixelSolid()

VOID GuiBlendPixelSolid ( IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BackPixel,
IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL * FrontPixel )

Definition at line 98 of file Blending.c.

◆ GuiClearScreen()

VOID GuiClearScreen ( IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL * Pixel )

Definition at line 1363 of file OpenCanopy.c.

◆ GuiClipChildBounds()

BOOLEAN GuiClipChildBounds ( IN INT64 ChildOffset,
IN UINT32 ChildLength,
IN OUT UINT32 * ReqOffset,
IN OUT UINT32 * ReqLength )

Definition at line 73 of file OpenCanopy.c.

◆ GuiCreateHighlightedImage()

EFI_STATUS GuiCreateHighlightedImage ( OUT GUI_IMAGE * SelectedImage,
IN CONST GUI_IMAGE * SourceImage,
IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL * HighlightPixel )

Definition at line 279 of file Images.c.

◆ GuiDrawLoop()

VOID GuiDrawLoop ( IN OUT GUI_DRAWING_CONTEXT * DrawContext)

Definition at line 1055 of file OpenCanopy.c.

◆ GuiDrawToBuffer()

VOID GuiDrawToBuffer ( IN CONST GUI_IMAGE * Image,
IN UINT8 Opacity,
IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN INT64 BaseX,
IN INT64 BaseY,
IN UINT32 OffsetX,
IN UINT32 OffsetY,
IN UINT32 Width,
IN UINT32 Height )

Definition at line 354 of file OpenCanopy.c.

◆ GuiDrawToBufferFill()

VOID GuiDrawToBufferFill ( IN CONST EFI_GRAPHICS_OUTPUT_BLT_PIXEL * Colour,
IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN UINT32 PosX,
IN UINT32 PosY,
IN UINT32 Width,
IN UINT32 Height )

Definition at line 276 of file OpenCanopy.c.

◆ GuiGetBaseCoords()

VOID GuiGetBaseCoords ( IN GUI_OBJ * This,
IN GUI_DRAWING_CONTEXT * DrawContext,
OUT INT64 * BaseX,
OUT INT64 * BaseY )

Definition at line 996 of file OpenCanopy.c.

◆ GuiGetInterpolatedValue()

UINT32 GuiGetInterpolatedValue ( IN CONST GUI_INTERPOLATION * Interpol,
IN UINT64 CurrentTime )

Definition at line 1417 of file OpenCanopy.c.

◆ GuiIcnsToImageIcon()

EFI_STATUS GuiIcnsToImageIcon ( OUT GUI_IMAGE * Image,
IN VOID * IcnsImage,
IN UINT32 IcnsImageSize,
IN UINT8 Scale,
IN UINT32 MatchWidth,
IN UINT32 MatchHeight,
IN BOOLEAN AllowLess )

Definition at line 46 of file Images.c.

◆ GuiLabelToImage()

EFI_STATUS GuiLabelToImage ( OUT GUI_IMAGE * Image,
IN VOID * RawData,
IN UINT32 DataLength,
IN UINT8 Scale,
IN BOOLEAN Inverted )

Definition at line 180 of file Images.c.

◆ GuiLibConstruct()

EFI_STATUS GuiLibConstruct ( IN BOOT_PICKER_GUI_CONTEXT * GuiContext,
IN INT32 CursorOffsetX,
IN INT32 CursorOffsetY )

Definition at line 846 of file OpenCanopy.c.

◆ GuiLibDestruct()

VOID GuiLibDestruct ( VOID )

Definition at line 922 of file OpenCanopy.c.

◆ GuiObjDelegatePtrEvent()

GUI_OBJ * GuiObjDelegatePtrEvent ( IN OUT GUI_OBJ * This,
IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * Context,
IN INT64 BaseX,
IN INT64 BaseY,
IN CONST GUI_PTR_EVENT * Event )

Definition at line 226 of file OpenCanopy.c.

◆ GuiObjDrawDelegate()

VOID GuiObjDrawDelegate ( IN OUT GUI_OBJ * This,
IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * Context,
IN INT64 BaseX,
IN INT64 BaseY,
IN UINT32 OffsetX,
IN UINT32 OffsetY,
IN UINT32 Width,
IN UINT32 Height,
IN UINT8 Opacity )

Definition at line 137 of file OpenCanopy.c.

◆ GuiPngToImage()

EFI_STATUS GuiPngToImage ( OUT GUI_IMAGE * Image,
IN VOID * ImageData,
IN UINTN ImageDataSize,
IN BOOLEAN PremultiplyAlpha )

Definition at line 238 of file Images.c.

◆ GuiRedrawAndFlushScreen()

VOID GuiRedrawAndFlushScreen ( IN OUT GUI_DRAWING_CONTEXT * DrawContext)

Definition at line 833 of file OpenCanopy.c.

◆ GuiRequestDraw()

VOID GuiRequestDraw ( IN UINT32 PosX,
IN UINT32 PosY,
IN UINT32 Width,
IN UINT32 Height )

Definition at line 475 of file OpenCanopy.c.

◆ GuiRequestDrawCrop()

VOID GuiRequestDrawCrop ( IN OUT GUI_DRAWING_CONTEXT * DrawContext,
IN INT64 X,
IN INT64 Y,
IN UINT32 Width,
IN UINT32 Height )

Definition at line 570 of file OpenCanopy.c.

◆ GuiViewDeinitialize()

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

Definition at line 977 of file OpenCanopy.c.

◆ GuiViewInitialize()

VOID GuiViewInitialize ( OUT GUI_DRAWING_CONTEXT * DrawContext,
IN BOOT_PICKER_GUI_CONTEXT * GuiContext,
IN CONST GUI_VIEW_CONTEXT * ViewContext )

Definition at line 943 of file OpenCanopy.c.