]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SimplePointer.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / SimplePointer.h
CommitLineData
d1f95000 1/** @file\r
8a7d75b0 2 Simple Pointer protocol from the UEFI 2.0 specification.\r
d1f95000 3\r
630b4187 4 Abstraction of a very simple pointer device like a mouse or trackball.\r
d1f95000 5\r
9095d37b
LG
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
7 This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
d1f95000 11\r
9095d37b
LG
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
d1f95000 14\r
d1f95000 15**/\r
16\r
17#ifndef __SIMPLE_POINTER_H__\r
18#define __SIMPLE_POINTER_H__\r
19\r
20#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \\r
21 { \\r
22 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
23 }\r
24\r
25typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;\r
26\r
27//\r
28// Data structures\r
29//\r
30typedef struct {\r
992f22b9
LG
31 ///\r
32 /// The signed distance in counts that the pointer device has been moved along the x-axis.\r
33 ///\r
d1f95000 34 INT32 RelativeMovementX;\r
992f22b9
LG
35 ///\r
36 /// The signed distance in counts that the pointer device has been moved along the y-axis.\r
37 ///\r
d1f95000 38 INT32 RelativeMovementY;\r
992f22b9
LG
39 ///\r
40 /// The signed distance in counts that the pointer device has been moved along the z-axis.\r
41 ///\r
d1f95000 42 INT32 RelativeMovementZ;\r
992f22b9
LG
43 ///\r
44 /// If TRUE, then the left button of the pointer device is being\r
45 /// pressed. If FALSE, then the left button of the pointer device is not being pressed.\r
46 ///\r
d1f95000 47 BOOLEAN LeftButton;\r
992f22b9
LG
48 ///\r
49 /// If TRUE, then the right button of the pointer device is being\r
50 /// pressed. If FALSE, then the right button of the pointer device is not being pressed.\r
51 ///\r
d1f95000 52 BOOLEAN RightButton;\r
53} EFI_SIMPLE_POINTER_STATE;\r
54\r
55typedef struct {\r
992f22b9
LG
56 ///\r
57 /// The resolution of the pointer device on the x-axis in counts/mm.\r
58 /// If 0, then the pointer device does not support an x-axis.\r
59 ///\r
d1f95000 60 UINT64 ResolutionX;\r
992f22b9
LG
61 ///\r
62 /// The resolution of the pointer device on the y-axis in counts/mm.\r
63 /// If 0, then the pointer device does not support an x-axis.\r
64 ///\r
d1f95000 65 UINT64 ResolutionY;\r
992f22b9
LG
66 ///\r
67 /// The resolution of the pointer device on the z-axis in counts/mm.\r
68 /// If 0, then the pointer device does not support an x-axis.\r
69 ///\r
d1f95000 70 UINT64 ResolutionZ;\r
992f22b9
LG
71 ///\r
72 /// TRUE if a left button is present on the pointer device. Otherwise FALSE.\r
73 ///\r
d1f95000 74 BOOLEAN LeftButton;\r
992f22b9
LG
75 ///\r
76 /// TRUE if a right button is present on the pointer device. Otherwise FALSE.\r
77 ///\r
d1f95000 78 BOOLEAN RightButton;\r
79} EFI_SIMPLE_POINTER_MODE;\r
80\r
9095d37b 81/**\r
d1f95000 82 Resets the pointer device hardware.\r
9095d37b 83\r
d1f95000 84 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
9095d37b 85 instance.\r
d1f95000 86 @param ExtendedVerification Indicates that the driver may perform a more exhaustive\r
9095d37b
LG
87 verification operation of the device during reset.\r
88\r
d1f95000 89 @retval EFI_SUCCESS The device was reset.\r
9095d37b
LG
90 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.\r
91\r
d1f95000 92**/\r
93typedef\r
94EFI_STATUS\r
8b13229b 95(EFIAPI *EFI_SIMPLE_POINTER_RESET)(\r
d1f95000 96 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
97 IN BOOLEAN ExtendedVerification\r
98 );\r
99\r
9095d37b 100/**\r
d1f95000 101 Retrieves the current state of a pointer device.\r
9095d37b 102\r
d1f95000 103 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
9095d37b 104 instance.\r
d1f95000 105 @param State A pointer to the state information on the pointer device.\r
9095d37b 106\r
d1f95000 107 @retval EFI_SUCCESS The state of the pointer device was returned in State.\r
108 @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to\r
9095d37b 109 GetState().\r
d1f95000 110 @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's\r
9095d37b
LG
111 current state.\r
112\r
d1f95000 113**/\r
114typedef\r
115EFI_STATUS\r
8b13229b 116(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(\r
d1f95000 117 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
118 IN OUT EFI_SIMPLE_POINTER_STATE *State\r
119 );\r
120\r
44717a39 121///\r
9095d37b
LG
122/// The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer\r
123/// device that can use used as an input device from an application written\r
124/// to this specification. The services include the ability to reset the\r
125/// pointer device, retrieve get the state of the pointer device, and\r
44717a39 126/// retrieve the capabilities of the pointer device.\r
127///\r
d1f95000 128struct _EFI_SIMPLE_POINTER_PROTOCOL {\r
129 EFI_SIMPLE_POINTER_RESET Reset;\r
130 EFI_SIMPLE_POINTER_GET_STATE GetState;\r
1f08a159 131 ///\r
132 /// Event to use with WaitForEvent() to wait for input from the pointer device.\r
133 ///\r
d1f95000 134 EFI_EVENT WaitForInput;\r
44717a39 135 ///\r
136 /// Pointer to EFI_SIMPLE_POINTER_MODE data.\r
137 ///\r
d1f95000 138 EFI_SIMPLE_POINTER_MODE *Mode;\r
139};\r
140\r
141extern EFI_GUID gEfiSimplePointerProtocolGuid;\r
142\r
143#endif\r