]> code.delx.au - refind/blobdiff - refind/global.h
TianoCore build support; new use_graphics_for refind.conf token
[refind] / refind / global.h
index dccac51b40e469bb0400554c29273c4f0a19a735..905f79adf1e2019079b6deacfaaba51c90476b0b 100644 (file)
 #ifndef __GLOBAL_H_
 #define __GLOBAL_H_
 
-#include "efi.h"
-#include "efilib.h"
+#ifdef __MAKEWITH_GNUEFI
+#include <efi.h>
+#include <efilib.h>
+#else
+#include "../include/tiano_includes.h"
+#endif
 
 #include "libeg.h"
 
 #define REFIT_DEBUG (0)
 
+// Tag classifications; used in various ways.
 #define TAG_ABOUT    (1)
-#define TAG_RESET    (2)
+#define TAG_REBOOT   (2)
 #define TAG_SHUTDOWN (3)
 #define TAG_TOOL     (4)
 #define TAG_LOADER   (5)
 #define TAG_LEGACY   (6)
+#define TAG_EXIT     (7)
+#define TAG_SHELL    (8)
+#define TAG_GPTSYNC  (9)
+#define NUM_TOOLS    (9)
 
 #define NUM_SCAN_OPTIONS 10
 
+#define DEFAULT_ICONS_DIR L"icons"
+
+// OS bit codes; used in GlobalConfig.GraphicsOn
+#define GRAPHICS_FOR_OSX        1
+#define GRAPHICS_FOR_LINUX      2
+#define GRAPHICS_FOR_ELILO      4
+#define GRAPHICS_FOR_GRUB       8
+#define GRAPHICS_FOR_WINDOWS   16
+
 //
 // global definitions
 //
@@ -85,6 +103,7 @@ typedef struct {
    EFI_HANDLE          DeviceHandle;
    EFI_FILE            *RootDir;
    CHAR16              *VolName;
+   EG_IMAGE            *VolIconImage;
    EG_IMAGE            *VolBadgeImage;
    UINTN               DiskKind;
    BOOLEAN             IsAppleLegacy;
@@ -98,6 +117,7 @@ typedef struct {
    EFI_BLOCK_IO        *WholeDiskBlockIO;
    EFI_DEVICE_PATH     *WholeDiskDevicePath;
    MBR_PARTITION_INFO  *MbrPartitionTable;
+   BOOLEAN             IsReadable;
 } REFIT_VOLUME;
 
 typedef struct _refit_menu_entry {
@@ -144,14 +164,22 @@ typedef struct {
 
 typedef struct {
    BOOLEAN     TextOnly;
+   BOOLEAN     ScanAllLinux;
+   UINTN       RequestedScreenWidth;
+   UINTN       RequestedScreenHeight;
    UINTN       Timeout;
-   UINTN       DisableFlags;
    UINTN       HideUIFlags;
-   BOOLEAN     Quiet;
+   UINTN       MaxTags;     // max. number of OS entries to show simultaneously in graphics mode
+   UINTN       GraphicsFor;
    CHAR16      *BannerFileName;
    CHAR16      *SelectionSmallFileName;
    CHAR16      *SelectionBigFileName;
    CHAR16      *DefaultSelection;
+   CHAR16      *AlsoScan;
+   CHAR16      *DontScan;
+   CHAR16      *DriverDirs;
+   CHAR16      *IconsDir;
+   UINTN       ShowTools[NUM_TOOLS];
    CHAR8       ScanFor[NUM_SCAN_OPTIONS]; // codes of types of loaders for which to scan
 } REFIT_CONFIG;