efipoint.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* Copyright (C) 2014 by John Cronin
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. * The above copyright notice and this permission notice shall be included in
  10. * all copies or substantial portions of the Software.
  11. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. * THE SOFTWARE.
  18. */
  19. #ifndef _EFI_POINT_H
  20. #define _EFI_POINT_H
  21. #define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
  22. { 0x31878c87, 0xb75, 0x11d5, { 0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
  23. INTERFACE_DECL(_EFI_SIMPLE_POINTER);
  24. typedef struct {
  25. INT32 RelativeMovementX;
  26. INT32 RelativeMovementY;
  27. INT32 RelativeMovementZ;
  28. BOOLEAN LeftButton;
  29. BOOLEAN RightButton;
  30. } EFI_SIMPLE_POINTER_STATE;
  31. typedef struct {
  32. UINT64 ResolutionX;
  33. UINT64 ResolutionY;
  34. UINT64 ResolutionZ;
  35. BOOLEAN LeftButton;
  36. BOOLEAN RightButton;
  37. } EFI_SIMPLE_POINTER_MODE;
  38. typedef
  39. EFI_STATUS
  40. (EFIAPI *EFI_SIMPLE_POINTER_RESET) (
  41. IN struct _EFI_SIMPLE_POINTER *This,
  42. IN BOOLEAN ExtendedVerification
  43. );
  44. typedef
  45. EFI_STATUS
  46. (EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) (
  47. IN struct _EFI_SIMPLE_POINTER *This,
  48. IN OUT EFI_SIMPLE_POINTER_STATE *State
  49. );
  50. typedef struct _EFI_SIMPLE_POINTER {
  51. EFI_SIMPLE_POINTER_RESET Reset;
  52. EFI_SIMPLE_POINTER_GET_STATE GetState;
  53. EFI_EVENT WaitForInput;
  54. EFI_SIMPLE_POINTER_MODE *Mode;
  55. } EFI_SIMPLE_POINTER_PROTOCOL;
  56. #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
  57. { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
  58. INTERFACE_DECL(_EFI_ABSOLUTE_POINTER_PROTOCOL);
  59. typedef struct {
  60. UINT64 AbsoluteMinX;
  61. UINT64 AbsoluteMinY;
  62. UINT64 AbsoluteMinZ;
  63. UINT64 AbsoluteMaxX;
  64. UINT64 AbsoluteMaxY;
  65. UINT64 AbsoluteMaxZ;
  66. UINT32 Attributes;
  67. } EFI_ABSOLUTE_POINTER_MODE;
  68. typedef struct {
  69. UINT64 CurrentX;
  70. UINT64 CurrentY;
  71. UINT64 CurrentZ;
  72. UINT32 ActiveButtons;
  73. } EFI_ABSOLUTE_POINTER_STATE;
  74. #define EFI_ABSP_SupportsAltActive 0x00000001
  75. #define EFI_ABSP_SupportsPressureAsZ 0x00000002
  76. #define EFI_ABSP_TouchActive 0x00000001
  77. #define EFI_ABS_AltActive 0x00000002
  78. typedef
  79. EFI_STATUS
  80. (EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (
  81. IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,
  82. IN BOOLEAN ExtendedVerification
  83. );
  84. typedef
  85. EFI_STATUS
  86. (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (
  87. IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,
  88. IN OUT EFI_ABSOLUTE_POINTER_STATE *State
  89. );
  90. typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
  91. EFI_ABSOLUTE_POINTER_RESET Reset;
  92. EFI_ABSOLUTE_POINTER_GET_STATE GetState;
  93. EFI_EVENT WaitForInput;
  94. EFI_ABSOLUTE_POINTER_MODE *Mode;
  95. } EFI_ABSOLUTE_POINTER_PROTOCOL;
  96. #endif