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