]> git.proxmox.com Git - mirror_edk2.git/blame - StdLibPrivateInternalFiles/Include/Device/Console.h
StdLib: Add multi-byte character support. The normal "narrow" character set is now...
[mirror_edk2.git] / StdLibPrivateInternalFiles / Include / Device / Console.h
CommitLineData
b00771f5 1/** @file\r
2 Declarations and macros for the console abstraction.\r
3\r
a7a8363d 4 Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
b00771f5 5 This program and the accompanying materials are licensed and made available\r
6 under the terms and conditions of the BSD License which accompanies this\r
7 distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php.\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Depends on <kfile.h>, <Device/Device.h>, <Protocol/SimpleTextIn.h>, <Uefi/UefiBaseType.h>\r
14**/\r
15#ifndef _DEVICE_UEFI_CONSOLE_H\r
16#define _DEVICE_UEFI_CONSOLE_H\r
17\r
18#include <kfile.h>\r
19#include <Device/Device.h>\r
20\r
b00771f5 21/* The members Cookie through Abstraction, inclusive, are the same type and order\r
22 for all instance structures.\r
23\r
24 All instance structures must be a multiple of sizeof(UINTN) bytes long\r
25*/\r
26typedef struct {\r
27 UINT32 Cookie; ///< Special value identifying this as a valid ConInstance\r
28 UINT32 InstanceNum; ///< Which instance is this? Zero-based.\r
29 EFI_HANDLE Dev; ///< Pointer to either Input or Output Protocol.\r
30 DeviceNode *Parent; ///< Points to the parent Device Node.\r
31 struct fileops Abstraction; ///< Pointers to functions implementing this device's abstraction.\r
32 UINTN Reserved_1; // Ensure that next member starts on an 8-byte boundary\r
33 UINT64 NumRead; ///< Number of characters Read.\r
34 UINT64 NumWritten; ///< Number of characters Written.\r
35 EFI_INPUT_KEY UnGetKey; ///< One-key pushback, for poll().\r
a7a8363d 36 __mbstate_t CharState; ///< Character state for the byte stream passing through this device\r
b00771f5 37} ConInstance;\r
38\r
39__BEGIN_DECLS\r
40\r
41int\r
42EFIAPI\r
43da_ConOpen(\r
f766dd76 44 IN DeviceNode *DevNode,\r
b00771f5 45 IN struct __filedes *filp,\r
f766dd76 46 IN int DevInstance,\r
b00771f5 47 IN CHAR16 *Path,\r
f766dd76 48 IN CHAR16 *MPath\r
b00771f5 49);\r
50\r
51__END_DECLS\r
52\r
53#endif /* _DEVICE_UEFI_CONSOLE_H */\r