Home | History | Annotate | Download | only in AbsolutePointer
      1 /*++
      2 
      3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 Module Name:
     13 
     14   AbsolutePointer.h
     15 
     16 Abstract:
     17 
     18   EFI_ABSOLUTE_POINTER_PROTOCOL from the UEFI 2.1 specification.
     19 
     20   This protocol specifies a simple method for accessing absolute pointer devices.
     21 
     22 --*/
     23 
     24 #ifndef __ABSOLUTE_POINTER_H__
     25 #define __ABSOLUTE_POINTER_H__
     26 
     27 #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
     28   { \
     29       0x8D59D32B, 0xC655, 0x4AE9, {0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43} \
     30   }
     31 
     32 EFI_FORWARD_DECLARATION (EFI_ABSOLUTE_POINTER_PROTOCOL);
     33 
     34 //
     35 // Data structures
     36 //
     37 
     38 typedef struct {
     39   UINT64 AbsoluteMinX;
     40   UINT64 AbsoluteMinY;
     41   UINT64 AbsoluteMinZ;
     42   UINT64 AbsoluteMaxX;
     43   UINT64 AbsoluteMaxY;
     44   UINT64 AbsoluteMaxZ;
     45   UINT32 Attributes;
     46 } EFI_ABSOLUTE_POINTER_MODE;
     47 
     48 typedef struct {
     49   UINT64 CurrentX;
     50   UINT64 CurrentY;
     51   UINT64 CurrentZ;
     52   UINT32 ActiveButtons;
     53 } EFI_ABSOLUTE_POINTER_STATE;
     54 
     55 #define EFI_ABSP_SupportsAltActive   0x00000001
     56 #define EFI_ABSP_SupportsPressureAsZ 0x00000002
     57 
     58 #define EFI_ABSP_TouchActive         0x00000001
     59 #define EFI_ABS_AltActive            0x00000002
     60 
     61 typedef
     62 EFI_STATUS
     63 (EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (
     64   IN EFI_ABSOLUTE_POINTER_PROTOCOL   *This,
     65   IN BOOLEAN                         ExtendedVerification
     66   )
     67 /*++
     68 
     69   Routine Description:
     70     Resets the pointer device hardware.
     71 
     72   Arguments:
     73     This                  - Protocol instance pointer.
     74     ExtendedVerification  - Driver may perform diagnostics on reset.
     75 
     76   Returns:
     77     EFI_SUCCESS           - The device was reset.
     78     EFI_DEVICE_ERROR      - The device is not functioning correctly and could
     79                             not be reset.
     80 
     81 --*/
     82 ;
     83 
     84 typedef
     85 EFI_STATUS
     86 (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (
     87   IN EFI_ABSOLUTE_POINTER_PROTOCOL   *This,
     88   IN OUT EFI_ABSOLUTE_POINTER_STATE  *State
     89   )
     90 /*++
     91 
     92   Routine Description:
     93     Retrieves the current state of a pointer device.
     94 
     95   Arguments:
     96     This                  - Protocol instance pointer.
     97     State                 - A pointer to the state information on the pointer device.
     98 
     99   Returns:
    100     EFI_SUCCESS           - The state of the pointer device was returned in State..
    101     EFI_NOT_READY         - The state of the pointer device has not changed since the last call to
    102                             GetState().
    103     EFI_DEVICE_ERROR      - A device error occurred while attempting to retrieve the pointer
    104                             device's current state.
    105 --*/
    106 ;
    107 
    108 struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
    109   EFI_ABSOLUTE_POINTER_RESET         Reset;
    110   EFI_ABSOLUTE_POINTER_GET_STATE     GetState;
    111   EFI_EVENT                          WaitForInput;
    112   EFI_ABSOLUTE_POINTER_MODE          *Mode;
    113 };
    114 
    115 extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
    116 
    117 #endif
    118