mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-22 16:08:07 +01:00
Restoring the bridging header
This commit is contained in:
parent
da591d7cf6
commit
e4d1a403ad
@ -19,10 +19,23 @@
|
||||
#endif
|
||||
*/
|
||||
|
||||
//#import "NSWindowFix.h"
|
||||
//#import "ThemeImage.h"
|
||||
//#import "gfxutil.h"
|
||||
//#import "efidevp.h"
|
||||
#import "NSWindowFix.h"
|
||||
#import "ThemeImage.h"
|
||||
#import "gfxutil.h"
|
||||
#import "efidevp.h"
|
||||
|
||||
/*
|
||||
NOTE for developers:
|
||||
Unless edk2 headers are imported (as a UEFI application), below definitions runs in a clean enviroment
|
||||
and are totally disconnected from Clover. They are just duplicates to deserialize the SETTINGS_DATA structure
|
||||
(and until compatible).
|
||||
This was done to mantains compatibility across revisions. The tuple is in fact accessed by
|
||||
strings (using the Swift Mirror class) so that the app can access variables if the element really exist
|
||||
inside the SETTINGS_DATA structure, and w/o crash if an element get removed, like can happen in newer commits.
|
||||
This header is used to expose c (or objective-c) code to Swift and doesn't affect Clover bootloader in no way.
|
||||
|
||||
c++ code can also be imported, but only inside an obj-c Class.
|
||||
*/
|
||||
|
||||
#define VOID void
|
||||
#define CONST const
|
||||
@ -31,9 +44,7 @@ typedef signed char INT8;
|
||||
typedef unsigned char UINT8;
|
||||
typedef UINT8 BOOLEAN;
|
||||
typedef char CHAR8;
|
||||
#ifndef CHAR16
|
||||
typedef unsigned short CHAR16;
|
||||
#endif
|
||||
typedef short INT16;
|
||||
typedef unsigned short UINT16;
|
||||
typedef int INT32;
|
||||
@ -114,7 +125,8 @@ typedef enum {
|
||||
kTagTypeArray
|
||||
} TAG_TYPE;
|
||||
|
||||
typedef struct DEV_PROPERTY {
|
||||
typedef struct DEV_PROPERTY DEV_PROPERTY; //yyyy
|
||||
struct DEV_PROPERTY {
|
||||
UINT32 Device;
|
||||
EFI_DEVICE_PATH_PROTOCOL* DevicePath;
|
||||
CHAR8 *Key;
|
||||
@ -125,9 +137,10 @@ typedef struct DEV_PROPERTY {
|
||||
CHAR8 *Label;
|
||||
INPUT_ITEM MenuItem;
|
||||
TAG_TYPE ValueType;
|
||||
} DEV_PROPERTY;
|
||||
};
|
||||
|
||||
typedef struct KEXT_PATCH
|
||||
typedef struct KEXT_PATCH KEXT_PATCH;
|
||||
struct KEXT_PATCH
|
||||
{
|
||||
CHAR8 *Name;
|
||||
CHAR8 *Label;
|
||||
@ -141,7 +154,7 @@ typedef struct KEXT_PATCH
|
||||
CHAR8 *MatchOS;
|
||||
CHAR8 *MatchBuild;
|
||||
INPUT_ITEM MenuItem;
|
||||
} KEXT_PATCH;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
CHAR8 *Label;
|
||||
@ -209,27 +222,31 @@ typedef struct KERNEL_AND_KEXT_PATCHES
|
||||
|
||||
} KERNEL_AND_KEXT_PATCHES;
|
||||
|
||||
typedef struct ACPI_NAME_LIST {
|
||||
typedef struct ACPI_NAME_LIST ACPI_NAME_LIST;
|
||||
struct ACPI_NAME_LIST {
|
||||
ACPI_NAME_LIST *Next;
|
||||
CHAR8 *Name;
|
||||
} ACPI_NAME_LIST;
|
||||
};
|
||||
|
||||
typedef struct ACPI_DROP_TABLE
|
||||
typedef struct ACPI_DROP_TABLE ACPI_DROP_TABLE;
|
||||
struct ACPI_DROP_TABLE
|
||||
{
|
||||
ACPI_DROP_TABLE *Next;
|
||||
UINT32 Signature;
|
||||
UINT32 Length;
|
||||
UINT64 TableId;
|
||||
INPUT_ITEM MenuItem;
|
||||
} ACPI_DROP_TABLE;
|
||||
};
|
||||
|
||||
typedef struct RT_VARIABLES {
|
||||
typedef struct RT_VARIABLES RT_VARIABLES;
|
||||
struct RT_VARIABLES {
|
||||
// BOOLEAN Disabled;
|
||||
CHAR16 *Name;
|
||||
EFI_GUID VarGuid;
|
||||
} RT_VARIABLES;
|
||||
};
|
||||
|
||||
typedef struct CUSTOM_LOADER_ENTRY {
|
||||
typedef struct CUSTOM_LOADER_ENTRY CUSTOM_LOADER_ENTRY;
|
||||
struct CUSTOM_LOADER_ENTRY {
|
||||
CUSTOM_LOADER_ENTRY *Next;
|
||||
CUSTOM_LOADER_ENTRY *SubEntries;
|
||||
EG_IMAGE *Image;
|
||||
@ -252,9 +269,10 @@ typedef struct CUSTOM_LOADER_ENTRY {
|
||||
EG_IMAGE *CustomLogo;
|
||||
EG_PIXEL *BootBgColor;
|
||||
KERNEL_AND_KEXT_PATCHES KernelAndKextPatches; //zzzz
|
||||
} CUSTOM_LOADER_ENTRY;
|
||||
};
|
||||
|
||||
typedef struct CUSTOM_LEGACY_ENTRY {
|
||||
typedef struct CUSTOM_LEGACY_ENTRY CUSTOM_LEGACY_ENTRY;
|
||||
struct CUSTOM_LEGACY_ENTRY {
|
||||
CUSTOM_LEGACY_ENTRY *Next;
|
||||
EG_IMAGE *Image;
|
||||
EG_IMAGE *DriveImage;
|
||||
@ -267,9 +285,10 @@ typedef struct CUSTOM_LEGACY_ENTRY {
|
||||
UINT8 Flags;
|
||||
UINT8 Type;
|
||||
UINT8 VolumeType;
|
||||
} CUSTOM_LEGACY_ENTRY;
|
||||
};
|
||||
|
||||
typedef struct CUSTOM_TOOL_ENTRY {
|
||||
typedef struct CUSTOM_TOOL_ENTRY CUSTOM_TOOL_ENTRY;
|
||||
struct CUSTOM_TOOL_ENTRY {
|
||||
CUSTOM_TOOL_ENTRY *Next;
|
||||
EG_IMAGE *Image;
|
||||
CHAR16 *ImagePath;
|
||||
@ -281,7 +300,7 @@ typedef struct CUSTOM_TOOL_ENTRY {
|
||||
CHAR16 Hotkey;
|
||||
UINT8 Flags;
|
||||
UINT8 VolumeType;
|
||||
} CUSTOM_TOOL_ENTRY;
|
||||
};
|
||||
|
||||
// Set of Search & replace bytes for VideoBiosPatchBytes().
|
||||
typedef struct _VBIOS_PATCH_BYTES {
|
||||
|
Loading…
Reference in New Issue
Block a user