]> code.delx.au - refind/commitdiff
Added EfiLib/AbsolutePointer.h file to support building new touch
authorsrs5694 <srs5694@users.sourceforge.net>
Mon, 3 Oct 2016 18:54:46 +0000 (14:54 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Mon, 3 Oct 2016 18:54:46 +0000 (14:54 -0400)
screen support with GNU-EFI.

EfiLib/AbsolutePointer.h [new file with mode: 0644]

diff --git a/EfiLib/AbsolutePointer.h b/EfiLib/AbsolutePointer.h
new file mode 100644 (file)
index 0000000..a4efea2
--- /dev/null
@@ -0,0 +1,205 @@
+/** @file\r
+  The file provides services that allow information about an\r
+  absolute pointer device to be retrieved.\r
+  \r
+  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+**/\r
+\r
+#ifndef __ABSOLUTE_POINTER_H__\r
+#define __ABSOLUTE_POINTER_H__\r
+\r
+\r
+#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \\r
+  { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }\r
+\r
+\r
+typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;\r
+\r
+\r
+//*******************************************************\r
+// EFI_ABSOLUTE_POINTER_MODE\r
+//*******************************************************\r
+\r
+\r
+/**\r
+  The following data values in the EFI_ABSOLUTE_POINTER_MODE\r
+  interface are read-only and are changed by using the appropriate\r
+  interface functions.\r
+**/\r
+typedef struct {\r
+  UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis\r
+  UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.\r
+  UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis\r
+  UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the \r
+                       ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis\r
+  UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the \r
+                       ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.\r
+  UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the \r
+                       ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis\r
+  UINT32 Attributes;   ///< The following bits are set as needed (or'd together) to indicate the \r
+                       ///< capabilities of the device supported. The remaining bits are undefined \r
+                       ///< and should be 0\r
+} EFI_ABSOLUTE_POINTER_MODE;\r
+\r
+///\r
+/// If set, indicates this device supports an alternate button input. \r
+/// \r
+#define EFI_ABSP_SupportsAltActive    0x00000001\r
+\r
+///\r
+/// If set, indicates this device returns pressure data in parameter CurrentZ.\r
+/// \r
+#define EFI_ABSP_SupportsPressureAsZ  0x00000002\r
+\r
+\r
+/**\r
+  This function resets the pointer device hardware. As part of\r
+  initialization process, the firmware/device will make a quick\r
+  but reasonable attempt to verify that the device is\r
+  functioning. If the ExtendedVerification flag is TRUE the\r
+  firmware may take an extended amount of time to verify the\r
+  device is operating on reset. Otherwise the reset operation is\r
+  to occur as quickly as possible. The hardware verification\r
+  process is not defined by this specification and is left up to\r
+  the platform firmware or driver to implement.\r
+\r
+  @param This                 A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r
+                              instance.\r
+\r
+  @param ExtendedVerification Indicates that the driver may\r
+                              perform a more exhaustive\r
+                              verification operation of the\r
+                              device during reset.\r
+\r
+  @retval EFI_SUCCESS       The device was reset.\r
+  \r
+  @retval EFI_DEVICE_ERROR  The device is not functioning\r
+                            correctly and could not be reset.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(\r
+  IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r
+  IN BOOLEAN                       ExtendedVerification\r
+);\r
+\r
+///\r
+/// This bit is set if the touch sensor is active.\r
+///\r
+#define EFI_ABSP_TouchActive  0x00000001 \r
+\r
+///\r
+/// This bit is set if the alt sensor, such as pen-side button, is active\r
+/// \r
+#define EFI_ABS_AltActive     0x00000002\r
+\r
+\r
+/**\r
+  Definition of EFI_ABSOLUTE_POINTER_STATE.\r
+**/\r
+typedef struct {\r
+  ///\r
+  /// The unsigned position of the activation on the x axis. If the AboluteMinX \r
+  /// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are \r
+  /// both 0, then this pointer device does not support an x-axis, and this field\r
+  /// must be ignored.\r
+  ///\r
+  UINT64 CurrentX;\r
+  \r
+  ///\r
+  /// The unsigned position of the activation on the y axis. If the AboluteMinY \r
+  /// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are \r
+  /// both 0, then this pointer device does not support an y-axis, and this field\r
+  /// must be ignored.  \r
+  ///\r
+  UINT64 CurrentY;\r
+  \r
+  ///\r
+  /// The unsigned position of the activation on the z axis, or the pressure \r
+  /// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the \r
+  /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device \r
+  /// does not support an z-axis, and this field must be ignored.  \r
+  ///\r
+  UINT64 CurrentZ;\r
+  \r
+  ///\r
+  /// Bits are set to 1 in this structure item to indicate that device buttons are\r
+  /// active.\r
+  ///\r
+  UINT32 ActiveButtons;\r
+} EFI_ABSOLUTE_POINTER_STATE;\r
+\r
+/**\r
+  The GetState() function retrieves the current state of a pointer\r
+  device. This includes information on the active state associated\r
+  with the pointer device and the current position of the axes\r
+  associated with the pointer device. If the state of the pointer\r
+  device has not changed since the last call to GetState(), then\r
+  EFI_NOT_READY is returned. If the state of the pointer device\r
+  has changed since the last call to GetState(), then the state\r
+  information is placed in State, and EFI_SUCCESS is returned. If\r
+  a device error occurs while attempting to retrieve the state\r
+  information, then EFI_DEVICE_ERROR is returned.\r
+\r
+\r
+  @param This   A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r
+                instance.\r
+\r
+  @param State  A pointer to the state information on the\r
+                pointer device.\r
+\r
+  @retval EFI_SUCCESS       The state of the pointer device was\r
+                            returned in State.\r
+\r
+  @retval EFI_NOT_READY     The state of the pointer device has not\r
+                            changed since the last call to GetState().\r
+\r
+  @retval EFI_DEVICE_ERROR  A device error occurred while\r
+                            attempting to retrieve the pointer\r
+                            device's current state.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(\r
+  IN      EFI_ABSOLUTE_POINTER_PROTOCOL  *This,\r
+  IN OUT  EFI_ABSOLUTE_POINTER_STATE     *State\r
+);\r
+\r
+\r
+///\r
+/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services\r
+/// for a pointer device that can be used as an input device from an\r
+/// application written to this specification. The services include\r
+/// the ability to: reset the pointer device, retrieve the state of\r
+/// the pointer device, and retrieve the capabilities of the pointer\r
+/// device. The service also provides certain data items describing the device.\r
+///\r
+struct _EFI_ABSOLUTE_POINTER_PROTOCOL {\r
+  EFI_ABSOLUTE_POINTER_RESET      Reset;\r
+  EFI_ABSOLUTE_POINTER_GET_STATE  GetState;\r
+  ///\r
+  /// Event to use with WaitForEvent() to wait for input from the pointer device.  \r
+  ///\r
+  EFI_EVENT                       WaitForInput;\r
+  ///\r
+  /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.\r
+  ///\r
+  EFI_ABSOLUTE_POINTER_MODE       *Mode;\r
+};\r
+\r
+\r
+extern EFI_GUID gEfiAbsolutePointerProtocolGuid;\r
+\r
+\r
+#endif\r
+\r