|  | @@ -0,0 +1,207 @@
 | 
		
	
		
			
			|  | 1 | +/** @file
 | 
		
	
		
			
			|  | 2 | +  The file provides services that allow information about an
 | 
		
	
		
			
			|  | 3 | +  absolute pointer device to be retrieved.
 | 
		
	
		
			
			|  | 4 | +
 | 
		
	
		
			
			|  | 5 | +  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
 | 
		
	
		
			
			|  | 6 | +  This program and the accompanying materials
 | 
		
	
		
			
			|  | 7 | +  are licensed and made available under the terms and conditions of the BSD License
 | 
		
	
		
			
			|  | 8 | +  which accompanies this distribution.  The full text of the license may be found at
 | 
		
	
		
			
			|  | 9 | +  http://opensource.org/licenses/bsd-license.php
 | 
		
	
		
			
			|  | 10 | +
 | 
		
	
		
			
			|  | 11 | +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
		
	
		
			
			|  | 12 | +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
		
	
		
			
			|  | 13 | +
 | 
		
	
		
			
			|  | 14 | +**/
 | 
		
	
		
			
			|  | 15 | +
 | 
		
	
		
			
			|  | 16 | +#ifndef __ABSOLUTE_POINTER_H__
 | 
		
	
		
			
			|  | 17 | +#define __ABSOLUTE_POINTER_H__
 | 
		
	
		
			
			|  | 18 | +
 | 
		
	
		
			
			|  | 19 | +FILE_LICENCE ( BSD3 );
 | 
		
	
		
			
			|  | 20 | +
 | 
		
	
		
			
			|  | 21 | +
 | 
		
	
		
			
			|  | 22 | +#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
 | 
		
	
		
			
			|  | 23 | +  { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
 | 
		
	
		
			
			|  | 24 | +
 | 
		
	
		
			
			|  | 25 | +
 | 
		
	
		
			
			|  | 26 | +typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;
 | 
		
	
		
			
			|  | 27 | +
 | 
		
	
		
			
			|  | 28 | +
 | 
		
	
		
			
			|  | 29 | +//*******************************************************
 | 
		
	
		
			
			|  | 30 | +// EFI_ABSOLUTE_POINTER_MODE
 | 
		
	
		
			
			|  | 31 | +//*******************************************************
 | 
		
	
		
			
			|  | 32 | +
 | 
		
	
		
			
			|  | 33 | +
 | 
		
	
		
			
			|  | 34 | +/**
 | 
		
	
		
			
			|  | 35 | +  The following data values in the EFI_ABSOLUTE_POINTER_MODE
 | 
		
	
		
			
			|  | 36 | +  interface are read-only and are changed by using the appropriate
 | 
		
	
		
			
			|  | 37 | +  interface functions.
 | 
		
	
		
			
			|  | 38 | +**/
 | 
		
	
		
			
			|  | 39 | +typedef struct {
 | 
		
	
		
			
			|  | 40 | +  UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis
 | 
		
	
		
			
			|  | 41 | +  UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.
 | 
		
	
		
			
			|  | 42 | +  UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis
 | 
		
	
		
			
			|  | 43 | +  UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the
 | 
		
	
		
			
			|  | 44 | +                       ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis
 | 
		
	
		
			
			|  | 45 | +  UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the
 | 
		
	
		
			
			|  | 46 | +                       ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.
 | 
		
	
		
			
			|  | 47 | +  UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the
 | 
		
	
		
			
			|  | 48 | +                       ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis
 | 
		
	
		
			
			|  | 49 | +  UINT32 Attributes;   ///< The following bits are set as needed (or'd together) to indicate the
 | 
		
	
		
			
			|  | 50 | +                       ///< capabilities of the device supported. The remaining bits are undefined
 | 
		
	
		
			
			|  | 51 | +                       ///< and should be 0
 | 
		
	
		
			
			|  | 52 | +} EFI_ABSOLUTE_POINTER_MODE;
 | 
		
	
		
			
			|  | 53 | +
 | 
		
	
		
			
			|  | 54 | +///
 | 
		
	
		
			
			|  | 55 | +/// If set, indicates this device supports an alternate button input.
 | 
		
	
		
			
			|  | 56 | +///
 | 
		
	
		
			
			|  | 57 | +#define EFI_ABSP_SupportsAltActive    0x00000001
 | 
		
	
		
			
			|  | 58 | +
 | 
		
	
		
			
			|  | 59 | +///
 | 
		
	
		
			
			|  | 60 | +/// If set, indicates this device returns pressure data in parameter CurrentZ.
 | 
		
	
		
			
			|  | 61 | +///
 | 
		
	
		
			
			|  | 62 | +#define EFI_ABSP_SupportsPressureAsZ  0x00000002
 | 
		
	
		
			
			|  | 63 | +
 | 
		
	
		
			
			|  | 64 | +
 | 
		
	
		
			
			|  | 65 | +/**
 | 
		
	
		
			
			|  | 66 | +  This function resets the pointer device hardware. As part of
 | 
		
	
		
			
			|  | 67 | +  initialization process, the firmware/device will make a quick
 | 
		
	
		
			
			|  | 68 | +  but reasonable attempt to verify that the device is
 | 
		
	
		
			
			|  | 69 | +  functioning. If the ExtendedVerification flag is TRUE the
 | 
		
	
		
			
			|  | 70 | +  firmware may take an extended amount of time to verify the
 | 
		
	
		
			
			|  | 71 | +  device is operating on reset. Otherwise the reset operation is
 | 
		
	
		
			
			|  | 72 | +  to occur as quickly as possible. The hardware verification
 | 
		
	
		
			
			|  | 73 | +  process is not defined by this specification and is left up to
 | 
		
	
		
			
			|  | 74 | +  the platform firmware or driver to implement.
 | 
		
	
		
			
			|  | 75 | +
 | 
		
	
		
			
			|  | 76 | +  @param This                 A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
 | 
		
	
		
			
			|  | 77 | +                              instance.
 | 
		
	
		
			
			|  | 78 | +
 | 
		
	
		
			
			|  | 79 | +  @param ExtendedVerification Indicates that the driver may
 | 
		
	
		
			
			|  | 80 | +                              perform a more exhaustive
 | 
		
	
		
			
			|  | 81 | +                              verification operation of the
 | 
		
	
		
			
			|  | 82 | +                              device during reset.
 | 
		
	
		
			
			|  | 83 | +
 | 
		
	
		
			
			|  | 84 | +  @retval EFI_SUCCESS       The device was reset.
 | 
		
	
		
			
			|  | 85 | +
 | 
		
	
		
			
			|  | 86 | +  @retval EFI_DEVICE_ERROR  The device is not functioning
 | 
		
	
		
			
			|  | 87 | +                            correctly and could not be reset.
 | 
		
	
		
			
			|  | 88 | +
 | 
		
	
		
			
			|  | 89 | +**/
 | 
		
	
		
			
			|  | 90 | +typedef
 | 
		
	
		
			
			|  | 91 | +EFI_STATUS
 | 
		
	
		
			
			|  | 92 | +(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(
 | 
		
	
		
			
			|  | 93 | +  IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
 | 
		
	
		
			
			|  | 94 | +  IN BOOLEAN                       ExtendedVerification
 | 
		
	
		
			
			|  | 95 | +);
 | 
		
	
		
			
			|  | 96 | +
 | 
		
	
		
			
			|  | 97 | +///
 | 
		
	
		
			
			|  | 98 | +/// This bit is set if the touch sensor is active.
 | 
		
	
		
			
			|  | 99 | +///
 | 
		
	
		
			
			|  | 100 | +#define EFI_ABSP_TouchActive  0x00000001
 | 
		
	
		
			
			|  | 101 | +
 | 
		
	
		
			
			|  | 102 | +///
 | 
		
	
		
			
			|  | 103 | +/// This bit is set if the alt sensor, such as pen-side button, is active
 | 
		
	
		
			
			|  | 104 | +///
 | 
		
	
		
			
			|  | 105 | +#define EFI_ABS_AltActive     0x00000002
 | 
		
	
		
			
			|  | 106 | +
 | 
		
	
		
			
			|  | 107 | +
 | 
		
	
		
			
			|  | 108 | +/**
 | 
		
	
		
			
			|  | 109 | +  Definition of EFI_ABSOLUTE_POINTER_STATE.
 | 
		
	
		
			
			|  | 110 | +**/
 | 
		
	
		
			
			|  | 111 | +typedef struct {
 | 
		
	
		
			
			|  | 112 | +  ///
 | 
		
	
		
			
			|  | 113 | +  /// The unsigned position of the activation on the x axis. If the AboluteMinX
 | 
		
	
		
			
			|  | 114 | +  /// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are
 | 
		
	
		
			
			|  | 115 | +  /// both 0, then this pointer device does not support an x-axis, and this field
 | 
		
	
		
			
			|  | 116 | +  /// must be ignored.
 | 
		
	
		
			
			|  | 117 | +  ///
 | 
		
	
		
			
			|  | 118 | +  UINT64 CurrentX;
 | 
		
	
		
			
			|  | 119 | +
 | 
		
	
		
			
			|  | 120 | +  ///
 | 
		
	
		
			
			|  | 121 | +  /// The unsigned position of the activation on the y axis. If the AboluteMinY
 | 
		
	
		
			
			|  | 122 | +  /// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are
 | 
		
	
		
			
			|  | 123 | +  /// both 0, then this pointer device does not support an y-axis, and this field
 | 
		
	
		
			
			|  | 124 | +  /// must be ignored.
 | 
		
	
		
			
			|  | 125 | +  ///
 | 
		
	
		
			
			|  | 126 | +  UINT64 CurrentY;
 | 
		
	
		
			
			|  | 127 | +
 | 
		
	
		
			
			|  | 128 | +  ///
 | 
		
	
		
			
			|  | 129 | +  /// The unsigned position of the activation on the z axis, or the pressure
 | 
		
	
		
			
			|  | 130 | +  /// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the
 | 
		
	
		
			
			|  | 131 | +  /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device
 | 
		
	
		
			
			|  | 132 | +  /// does not support an z-axis, and this field must be ignored.
 | 
		
	
		
			
			|  | 133 | +  ///
 | 
		
	
		
			
			|  | 134 | +  UINT64 CurrentZ;
 | 
		
	
		
			
			|  | 135 | +
 | 
		
	
		
			
			|  | 136 | +  ///
 | 
		
	
		
			
			|  | 137 | +  /// Bits are set to 1 in this structure item to indicate that device buttons are
 | 
		
	
		
			
			|  | 138 | +  /// active.
 | 
		
	
		
			
			|  | 139 | +  ///
 | 
		
	
		
			
			|  | 140 | +  UINT32 ActiveButtons;
 | 
		
	
		
			
			|  | 141 | +} EFI_ABSOLUTE_POINTER_STATE;
 | 
		
	
		
			
			|  | 142 | +
 | 
		
	
		
			
			|  | 143 | +/**
 | 
		
	
		
			
			|  | 144 | +  The GetState() function retrieves the current state of a pointer
 | 
		
	
		
			
			|  | 145 | +  device. This includes information on the active state associated
 | 
		
	
		
			
			|  | 146 | +  with the pointer device and the current position of the axes
 | 
		
	
		
			
			|  | 147 | +  associated with the pointer device. If the state of the pointer
 | 
		
	
		
			
			|  | 148 | +  device has not changed since the last call to GetState(), then
 | 
		
	
		
			
			|  | 149 | +  EFI_NOT_READY is returned. If the state of the pointer device
 | 
		
	
		
			
			|  | 150 | +  has changed since the last call to GetState(), then the state
 | 
		
	
		
			
			|  | 151 | +  information is placed in State, and EFI_SUCCESS is returned. If
 | 
		
	
		
			
			|  | 152 | +  a device error occurs while attempting to retrieve the state
 | 
		
	
		
			
			|  | 153 | +  information, then EFI_DEVICE_ERROR is returned.
 | 
		
	
		
			
			|  | 154 | +
 | 
		
	
		
			
			|  | 155 | +
 | 
		
	
		
			
			|  | 156 | +  @param This   A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
 | 
		
	
		
			
			|  | 157 | +                instance.
 | 
		
	
		
			
			|  | 158 | +
 | 
		
	
		
			
			|  | 159 | +  @param State  A pointer to the state information on the
 | 
		
	
		
			
			|  | 160 | +                pointer device.
 | 
		
	
		
			
			|  | 161 | +
 | 
		
	
		
			
			|  | 162 | +  @retval EFI_SUCCESS       The state of the pointer device was
 | 
		
	
		
			
			|  | 163 | +                            returned in State.
 | 
		
	
		
			
			|  | 164 | +
 | 
		
	
		
			
			|  | 165 | +  @retval EFI_NOT_READY     The state of the pointer device has not
 | 
		
	
		
			
			|  | 166 | +                            changed since the last call to GetState().
 | 
		
	
		
			
			|  | 167 | +
 | 
		
	
		
			
			|  | 168 | +  @retval EFI_DEVICE_ERROR  A device error occurred while
 | 
		
	
		
			
			|  | 169 | +                            attempting to retrieve the pointer
 | 
		
	
		
			
			|  | 170 | +                            device's current state.
 | 
		
	
		
			
			|  | 171 | +
 | 
		
	
		
			
			|  | 172 | +**/
 | 
		
	
		
			
			|  | 173 | +typedef
 | 
		
	
		
			
			|  | 174 | +EFI_STATUS
 | 
		
	
		
			
			|  | 175 | +(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(
 | 
		
	
		
			
			|  | 176 | +  IN      EFI_ABSOLUTE_POINTER_PROTOCOL  *This,
 | 
		
	
		
			
			|  | 177 | +  IN OUT  EFI_ABSOLUTE_POINTER_STATE     *State
 | 
		
	
		
			
			|  | 178 | +);
 | 
		
	
		
			
			|  | 179 | +
 | 
		
	
		
			
			|  | 180 | +
 | 
		
	
		
			
			|  | 181 | +///
 | 
		
	
		
			
			|  | 182 | +/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
 | 
		
	
		
			
			|  | 183 | +/// for a pointer device that can be used as an input device from an
 | 
		
	
		
			
			|  | 184 | +/// application written to this specification. The services include
 | 
		
	
		
			
			|  | 185 | +/// the ability to: reset the pointer device, retrieve the state of
 | 
		
	
		
			
			|  | 186 | +/// the pointer device, and retrieve the capabilities of the pointer
 | 
		
	
		
			
			|  | 187 | +/// device. The service also provides certain data items describing the device.
 | 
		
	
		
			
			|  | 188 | +///
 | 
		
	
		
			
			|  | 189 | +struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
 | 
		
	
		
			
			|  | 190 | +  EFI_ABSOLUTE_POINTER_RESET      Reset;
 | 
		
	
		
			
			|  | 191 | +  EFI_ABSOLUTE_POINTER_GET_STATE  GetState;
 | 
		
	
		
			
			|  | 192 | +  ///
 | 
		
	
		
			
			|  | 193 | +  /// Event to use with WaitForEvent() to wait for input from the pointer device.
 | 
		
	
		
			
			|  | 194 | +  ///
 | 
		
	
		
			
			|  | 195 | +  EFI_EVENT                       WaitForInput;
 | 
		
	
		
			
			|  | 196 | +  ///
 | 
		
	
		
			
			|  | 197 | +  /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.
 | 
		
	
		
			
			|  | 198 | +  ///
 | 
		
	
		
			
			|  | 199 | +  EFI_ABSOLUTE_POINTER_MODE       *Mode;
 | 
		
	
		
			
			|  | 200 | +};
 | 
		
	
		
			
			|  | 201 | +
 | 
		
	
		
			
			|  | 202 | +
 | 
		
	
		
			
			|  | 203 | +extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
 | 
		
	
		
			
			|  | 204 | +
 | 
		
	
		
			
			|  | 205 | +
 | 
		
	
		
			
			|  | 206 | +#endif
 | 
		
	
		
			
			|  | 207 | +
 |