您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ConsoleControl.h 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*++
  2. Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
  3. This program and the accompanying materials
  4. are licensed and made available under the terms and conditions of the BSD License
  5. which accompanies this distribution. The full text of the license may be found at
  6. http://opensource.org/licenses/bsd-license.php
  7. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  9. Module Name:
  10. ConsoleControl.h
  11. Abstract:
  12. Abstraction of a Text mode or GOP/UGA screen
  13. --*/
  14. #ifndef __CONSOLE_CONTROL_H__
  15. #define __CONSOLE_CONTROL_H__
  16. FILE_LICENCE ( BSD3 );
  17. #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
  18. { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
  19. typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
  20. typedef enum {
  21. EfiConsoleControlScreenText,
  22. EfiConsoleControlScreenGraphics,
  23. EfiConsoleControlScreenMaxValue
  24. } EFI_CONSOLE_CONTROL_SCREEN_MODE;
  25. typedef
  26. EFI_STATUS
  27. (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
  28. IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
  29. OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
  30. OUT BOOLEAN *GopUgaExists, OPTIONAL
  31. OUT BOOLEAN *StdInLocked OPTIONAL
  32. )
  33. /*++
  34. Routine Description:
  35. Return the current video mode information. Also returns info about existence
  36. of Graphics Output devices or UGA Draw devices in system, and if the Std In
  37. device is locked. All the arguments are optional and only returned if a non
  38. NULL pointer is passed in.
  39. Arguments:
  40. This - Protocol instance pointer.
  41. Mode - Are we in text of grahics mode.
  42. GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
  43. StdInLocked - TRUE if StdIn device is keyboard locked
  44. Returns:
  45. EFI_SUCCESS - Mode information returned.
  46. --*/
  47. ;
  48. typedef
  49. EFI_STATUS
  50. (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
  51. IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
  52. IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
  53. )
  54. /*++
  55. Routine Description:
  56. Set the current mode to either text or graphics. Graphics is
  57. for Quiet Boot.
  58. Arguments:
  59. This - Protocol instance pointer.
  60. Mode - Mode to set the
  61. Returns:
  62. EFI_SUCCESS - Mode information returned.
  63. --*/
  64. ;
  65. typedef
  66. EFI_STATUS
  67. (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
  68. IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
  69. IN CHAR16 *Password
  70. )
  71. /*++
  72. Routine Description:
  73. Lock Std In devices until Password is typed.
  74. Arguments:
  75. This - Protocol instance pointer.
  76. Password - Password needed to unlock screen. NULL means unlock keyboard
  77. Returns:
  78. EFI_SUCCESS - Mode information returned.
  79. EFI_DEVICE_ERROR - Std In not locked
  80. --*/
  81. ;
  82. struct _EFI_CONSOLE_CONTROL_PROTOCOL {
  83. EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
  84. EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
  85. EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
  86. };
  87. extern EFI_GUID gEfiConsoleControlProtocolGuid;
  88. #endif