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