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