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