gnu-efi/inc/efiui.h

59 lines
1.4 KiB
C
Raw Normal View History

2013-01-31 01:25:25 +04:00
#ifndef _EFI_UI_H
#define _EFI_UI_H
/*++
Copyright (c) 200 Intel Corporation
Module Name:
EfiUi.h
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
Abstract:
2013-01-31 01:25:25 +04:00
Protocol used to build User Interface (UI) stuff.
This protocol is just data. It is a multi dimentional array.
For each string there is an array of UI_STRING_ENTRY. Each string
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
is for a different language translation of the same string. The list
is terminated by a NULL UiString. There can be any number of
2013-01-31 01:25:25 +04:00
UI_STRING_ENTRY arrays. A NULL array terminates the list. A NULL array
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
entry contains all zeros.
2013-01-31 01:25:25 +04:00
Thus the shortest possible EFI_UI_PROTOCOL has three UI_STRING_ENTRY.
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
The String, it's NULL terminator, and the NULL terminator for the entire
2013-01-31 01:25:25 +04:00
thing.
Revision History
--*/
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
#define EFI_UI_INTERFACE_PROTOCOL_GUID \
2013-01-31 01:25:25 +04:00
{ 0x32dd7981, 0x2d27, 0x11d4, {0xbc, 0x8b, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
#define EFI_UI_PROTOCOL EFI_UI_INTERFACE_PROTOCOL_GUID
2013-01-31 01:25:25 +04:00
typedef enum {
UiDeviceString,
UiVendorString,
UiMaxString
} UI_STRING_TYPE;
typedef struct {
ISO_639_2 *LangCode;
CHAR16 *UiString;
} UI_STRING_ENTRY;
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
#define EFI_UI_INTERFACE_PROTOCOL_VERSION 0x00010000
#define EFI_UI_VERSION EFI_UI_INTERFACE_PROTOCOL_VERSION
2013-01-31 01:25:25 +04:00
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
typedef struct _EFI_UI_INTERFACE_PROTOCOL {
2013-01-31 01:25:25 +04:00
UINT32 Version;
UI_STRING_ENTRY *Entry;
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
} EFI_UI_INTERFACE_PROTOCOL;
2013-01-31 01:25:25 +04:00
Update global protocol GUIDs definitions to match EDK2 This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
2016-08-18 15:42:11 +03:00
typedef struct _EFI_UI_INTERFACE_PROTOCOL _UI_INTERFACE;
typedef EFI_UI_INTERFACE_PROTOCOL UI_INTERFACE;
2013-01-31 01:25:25 +04:00
#endif