1342742Stsoome/* $FreeBSD: stable/11/stand/efi/include/efipoint.h 346482 2019-04-21 04:26:02Z kevans $ */ 2342742Stsoome/* Copyright (C) 2014 by John Cronin 3342742Stsoome * 4342742Stsoome * Permission is hereby granted, free of charge, to any person obtaining a copy 5342742Stsoome * of this software and associated documentation files (the "Software"), to deal 6342742Stsoome * in the Software without restriction, including without limitation the rights 7342742Stsoome * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8342742Stsoome * copies of the Software, and to permit persons to whom the Software is 9342742Stsoome * furnished to do so, subject to the following conditions: 10342742Stsoome 11342742Stsoome * The above copyright notice and this permission notice shall be included in 12342742Stsoome * all copies or substantial portions of the Software. 13342742Stsoome 14342742Stsoome * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15342742Stsoome * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16342742Stsoome * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17342742Stsoome * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18342742Stsoome * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19342742Stsoome * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20342742Stsoome * THE SOFTWARE. 21342742Stsoome */ 22342742Stsoome 23342742Stsoome#ifndef _EFI_POINT_H 24342742Stsoome#define _EFI_POINT_H 25342742Stsoome 26342742Stsoome#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \ 27342742Stsoome { 0x31878c87, 0xb75, 0x11d5, { 0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } } 28342742Stsoome 29342742StsoomeINTERFACE_DECL(_EFI_SIMPLE_POINTER); 30342742Stsoome 31342742Stsoometypedef struct { 32342742Stsoome INT32 RelativeMovementX; 33342742Stsoome INT32 RelativeMovementY; 34342742Stsoome INT32 RelativeMovementZ; 35342742Stsoome BOOLEAN LeftButton; 36342742Stsoome BOOLEAN RightButton; 37342742Stsoome} EFI_SIMPLE_POINTER_STATE; 38342742Stsoome 39342742Stsoometypedef struct { 40342742Stsoome UINT64 ResolutionX; 41342742Stsoome UINT64 ResolutionY; 42342742Stsoome UINT64 ResolutionZ; 43342742Stsoome BOOLEAN LeftButton; 44342742Stsoome BOOLEAN RightButton; 45342742Stsoome} EFI_SIMPLE_POINTER_MODE; 46342742Stsoome 47342742Stsoometypedef 48342742StsoomeEFI_STATUS 49342742Stsoome(EFIAPI *EFI_SIMPLE_POINTER_RESET) ( 50342742Stsoome IN struct _EFI_SIMPLE_POINTER *This, 51342742Stsoome IN BOOLEAN ExtendedVerification 52342742Stsoome); 53342742Stsoome 54342742Stsoometypedef 55342742StsoomeEFI_STATUS 56342742Stsoome(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) ( 57342742Stsoome IN struct _EFI_SIMPLE_POINTER *This, 58342742Stsoome IN OUT EFI_SIMPLE_POINTER_STATE *State 59342742Stsoome); 60342742Stsoome 61342742Stsoometypedef struct _EFI_SIMPLE_POINTER { 62342742Stsoome EFI_SIMPLE_POINTER_RESET Reset; 63342742Stsoome EFI_SIMPLE_POINTER_GET_STATE GetState; 64342742Stsoome EFI_EVENT WaitForInput; 65342742Stsoome EFI_SIMPLE_POINTER_MODE *Mode; 66342742Stsoome} EFI_SIMPLE_POINTER_PROTOCOL; 67342742Stsoome 68342742Stsoome#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \ 69342742Stsoome { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } } 70342742Stsoome 71342742StsoomeINTERFACE_DECL(_EFI_ABSOLUTE_POINTER_PROTOCOL); 72342742Stsoome 73342742Stsoometypedef struct { 74342742Stsoome UINT64 AbsoluteMinX; 75342742Stsoome UINT64 AbsoluteMinY; 76342742Stsoome UINT64 AbsoluteMinZ; 77342742Stsoome UINT64 AbsoluteMaxX; 78342742Stsoome UINT64 AbsoluteMaxY; 79342742Stsoome UINT64 AbsoluteMaxZ; 80342742Stsoome UINT32 Attributes; 81342742Stsoome} EFI_ABSOLUTE_POINTER_MODE; 82342742Stsoome 83342742Stsoometypedef struct { 84342742Stsoome UINT64 CurrentX; 85342742Stsoome UINT64 CurrentY; 86342742Stsoome UINT64 CurrentZ; 87342742Stsoome UINT32 ActiveButtons; 88342742Stsoome} EFI_ABSOLUTE_POINTER_STATE; 89342742Stsoome 90342742Stsoome#define EFI_ABSP_SupportsAltActive 0x00000001 91342742Stsoome#define EFI_ABSP_SupportsPressureAsZ 0x00000002 92342742Stsoome#define EFI_ABSP_TouchActive 0x00000001 93342742Stsoome#define EFI_ABS_AltActive 0x00000002 94342742Stsoome 95342742Stsoometypedef 96342742StsoomeEFI_STATUS 97342742Stsoome(EFIAPI *EFI_ABSOLUTE_POINTER_RESET) ( 98342742Stsoome IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This, 99342742Stsoome IN BOOLEAN ExtendedVerification 100342742Stsoome); 101342742Stsoome 102342742Stsoometypedef 103342742StsoomeEFI_STATUS 104342742Stsoome(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) ( 105342742Stsoome IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This, 106342742Stsoome IN OUT EFI_ABSOLUTE_POINTER_STATE *State 107342742Stsoome); 108342742Stsoome 109342742Stsoometypedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL { 110342742Stsoome EFI_ABSOLUTE_POINTER_RESET Reset; 111342742Stsoome EFI_ABSOLUTE_POINTER_GET_STATE GetState; 112342742Stsoome EFI_EVENT WaitForInput; 113342742Stsoome EFI_ABSOLUTE_POINTER_MODE *Mode; 114342742Stsoome} EFI_ABSOLUTE_POINTER_PROTOCOL; 115342742Stsoome 116342742Stsoome#endif 117