OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <IndustryStandard/AppleIcon.h>
#include <IndustryStandard/AppleDiskLabel.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/BmpSupportLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/MtrrLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcCompressionLib.h>
#include <Library/OcCpuLib.h>
#include <Library/OcPngLib.h>
#include <Library/TimerLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include "OpenCanopy.h"
#include "GuiIo.h"
#include "GuiApp.h"
#include "Views/BootPicker.h"
#include "Blending.h"
Go to the source code of this file.
Data Structures | |
struct | GUI_DRAW_REQUEST |
Macros | |
#define | PIXEL_TO_UINT32(Pixel) |
Functions | |
BOOLEAN | GuiClipChildBounds (IN INT64 ChildOffset, IN UINT32 ChildLength, IN OUT UINT32 *ReqOffset, IN OUT UINT32 *ReqLength) |
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_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) |
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 | 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 | 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 | GuiOverlayPointer (IN OUT GUI_DRAWING_CONTEXT *DrawContext) |
STATIC UINT64 | InternalCpuDelayTsc (IN UINT64 Delay) |
VOID | GuiFlushScreen (IN OUT GUI_DRAWING_CONTEXT *DrawContext) |
VOID | GuiRedrawAndFlushScreen (IN OUT GUI_DRAWING_CONTEXT *DrawContext) |
EFI_STATUS | GuiLibConstruct (IN BOOT_PICKER_GUI_CONTEXT *GuiContext, IN INT32 CursorOffsetX, IN INT32 CursorOffsetY) |
VOID | GuiLibDestruct (VOID) |
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 | GuiGetBaseCoords (IN GUI_OBJ *This, IN GUI_DRAWING_CONTEXT *DrawContext, OUT INT64 *BaseX, OUT INT64 *BaseY) |
VOID | GuiDrawLoop (IN OUT GUI_DRAWING_CONTEXT *DrawContext) |
VOID | GuiClearScreen (IN OUT GUI_DRAWING_CONTEXT *DrawContext, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Pixel) |
STATIC INT32 | isin_S3 (IN INT32 x) |
UINT32 | GuiGetInterpolatedValue (IN CONST GUI_INTERPOLATION *Interpol, IN UINT64 CurrentTime) |
Variables | |
STATIC GUI_OUTPUT_CONTEXT * | mOutputContext = NULL |
GLOBAL_REMOVE_IF_UNREFERENCED GUI_POINTER_CONTEXT * | mPointerContext = NULL |
GLOBAL_REMOVE_IF_UNREFERENCED GUI_KEY_CONTEXT * | mKeyContext = NULL |
STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL * | mScreenBuffer = NULL |
STATIC UINT32 | mScreenBufferDelta = 0 |
STATIC UINT64 | mDeltaTscTarget = 0 |
STATIC UINT64 | mStartTsc = 0 |
STATIC UINT8 | mNumValidDrawReqs = 0 |
STATIC GUI_DRAW_REQUEST | mDrawRequests [6] |
STATIC UINT32 | mPointerOldDrawBaseX = 0 |
STATIC UINT32 | mPointerOldDrawBaseY = 0 |
STATIC UINT32 | mPointerOldDrawWidth = 0 |
STATIC UINT32 | mPointerOldDrawHeight = 0 |
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.c.
#define PIXEL_TO_UINT32 | ( | Pixel | ) |
Definition at line 69 of file OpenCanopy.c.
VOID GuiClearScreen | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext, |
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL * | Pixel ) |
Definition at line 1363 of file OpenCanopy.c.
BOOLEAN GuiClipChildBounds | ( | IN INT64 | ChildOffset, |
IN UINT32 | ChildLength, | ||
IN OUT UINT32 * | ReqOffset, | ||
IN OUT UINT32 * | ReqLength ) |
Definition at line 73 of file OpenCanopy.c.
VOID GuiDrawLoop | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext | ) |
Definition at line 1055 of file OpenCanopy.c.
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.
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.
VOID GuiFlushScreen | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext | ) |
Definition at line 750 of file OpenCanopy.c.
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.
UINT32 GuiGetInterpolatedValue | ( | IN CONST GUI_INTERPOLATION * | Interpol, |
IN UINT64 | CurrentTime ) |
Definition at line 1417 of file OpenCanopy.c.
EFI_STATUS GuiLibConstruct | ( | IN BOOT_PICKER_GUI_CONTEXT * | GuiContext, |
IN INT32 | CursorOffsetX, | ||
IN INT32 | CursorOffsetY ) |
Definition at line 846 of file OpenCanopy.c.
VOID GuiLibDestruct | ( | VOID | ) |
Definition at line 922 of file OpenCanopy.c.
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.
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.
VOID GuiOverlayPointer | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext | ) |
Definition at line 615 of file OpenCanopy.c.
VOID GuiRedrawAndFlushScreen | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext | ) |
Definition at line 833 of file OpenCanopy.c.
VOID GuiRequestDraw | ( | IN UINT32 | PosX, |
IN UINT32 | PosY, | ||
IN UINT32 | Width, | ||
IN UINT32 | Height ) |
Definition at line 475 of file OpenCanopy.c.
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.
VOID GuiViewDeinitialize | ( | IN OUT GUI_DRAWING_CONTEXT * | DrawContext, |
OUT BOOT_PICKER_GUI_CONTEXT * | GuiContext ) |
Definition at line 977 of file OpenCanopy.c.
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.
STATIC UINT64 InternalCpuDelayTsc | ( | IN UINT64 | Delay | ) |
Stalls the CPU for at least the given number of ticks.
Stalls the CPU for at least the given number of ticks. It's invoked by MicroSecondDelay() and NanoSecondDelay().
Delay | A period of time to delay in ticks. |
Definition at line 724 of file OpenCanopy.c.
STATIC INT32 isin_S3 | ( | IN INT32 | x | ) |
A sine approximation via a third-order approx.
x | Angle (with 2^15 units/circle) |
Definition at line 1387 of file OpenCanopy.c.
STATIC UINT64 mDeltaTscTarget = 0 |
Definition at line 54 of file OpenCanopy.c.
STATIC GUI_DRAW_REQUEST mDrawRequests[6] |
Definition at line 60 of file OpenCanopy.c.
GLOBAL_REMOVE_IF_UNREFERENCED GUI_KEY_CONTEXT* mKeyContext = NULL |
Definition at line 45 of file OpenCanopy.c.
STATIC UINT8 mNumValidDrawReqs = 0 |
Definition at line 59 of file OpenCanopy.c.
STATIC GUI_OUTPUT_CONTEXT* mOutputContext = NULL |
Definition at line 43 of file OpenCanopy.c.
GLOBAL_REMOVE_IF_UNREFERENCED GUI_POINTER_CONTEXT* mPointerContext = NULL |
Definition at line 44 of file OpenCanopy.c.
STATIC UINT32 mPointerOldDrawBaseX = 0 |
Definition at line 64 of file OpenCanopy.c.
STATIC UINT32 mPointerOldDrawBaseY = 0 |
Definition at line 65 of file OpenCanopy.c.
STATIC UINT32 mPointerOldDrawHeight = 0 |
Definition at line 67 of file OpenCanopy.c.
STATIC UINT32 mPointerOldDrawWidth = 0 |
Definition at line 66 of file OpenCanopy.c.
STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL* mScreenBuffer = NULL |
Definition at line 49 of file OpenCanopy.c.
STATIC UINT32 mScreenBufferDelta = 0 |
Definition at line 50 of file OpenCanopy.c.
STATIC UINT64 mStartTsc = 0 |
Definition at line 55 of file OpenCanopy.c.