]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SimplePointer.h
MdePkg: Apply uncrustify changes
[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 6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
d1f95000 8\r
d1f95000 9**/\r
10\r
11#ifndef __SIMPLE_POINTER_H__\r
12#define __SIMPLE_POINTER_H__\r
13\r
14#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \\r
15 { \\r
16 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
17 }\r
18\r
2f88bd3a 19typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;\r
d1f95000 20\r
21//\r
22// Data structures\r
23//\r
24typedef struct {\r
992f22b9
LG
25 ///\r
26 /// The signed distance in counts that the pointer device has been moved along the x-axis.\r
27 ///\r
2f88bd3a 28 INT32 RelativeMovementX;\r
992f22b9
LG
29 ///\r
30 /// The signed distance in counts that the pointer device has been moved along the y-axis.\r
31 ///\r
2f88bd3a 32 INT32 RelativeMovementY;\r
992f22b9
LG
33 ///\r
34 /// The signed distance in counts that the pointer device has been moved along the z-axis.\r
35 ///\r
2f88bd3a 36 INT32 RelativeMovementZ;\r
992f22b9
LG
37 ///\r
38 /// If TRUE, then the left button of the pointer device is being\r
39 /// pressed. If FALSE, then the left button of the pointer device is not being pressed.\r
40 ///\r
2f88bd3a 41 BOOLEAN LeftButton;\r
992f22b9
LG
42 ///\r
43 /// If TRUE, then the right button of the pointer device is being\r
44 /// pressed. If FALSE, then the right button of the pointer device is not being pressed.\r
45 ///\r
2f88bd3a 46 BOOLEAN RightButton;\r
d1f95000 47} EFI_SIMPLE_POINTER_STATE;\r
48\r
49typedef struct {\r
992f22b9
LG
50 ///\r
51 /// The resolution of the pointer device on the x-axis in counts/mm.\r
52 /// If 0, then the pointer device does not support an x-axis.\r
53 ///\r
2f88bd3a 54 UINT64 ResolutionX;\r
992f22b9
LG
55 ///\r
56 /// The resolution of the pointer device on the y-axis in counts/mm.\r
57 /// If 0, then the pointer device does not support an x-axis.\r
58 ///\r
2f88bd3a 59 UINT64 ResolutionY;\r
992f22b9
LG
60 ///\r
61 /// The resolution of the pointer device on the z-axis in counts/mm.\r
62 /// If 0, then the pointer device does not support an x-axis.\r
63 ///\r
2f88bd3a 64 UINT64 ResolutionZ;\r
992f22b9
LG
65 ///\r
66 /// TRUE if a left button is present on the pointer device. Otherwise FALSE.\r
67 ///\r
2f88bd3a 68 BOOLEAN LeftButton;\r
992f22b9
LG
69 ///\r
70 /// TRUE if a right button is present on the pointer device. Otherwise FALSE.\r
71 ///\r
2f88bd3a 72 BOOLEAN RightButton;\r
d1f95000 73} EFI_SIMPLE_POINTER_MODE;\r
74\r
9095d37b 75/**\r
d1f95000 76 Resets the pointer device hardware.\r
9095d37b 77\r
d1f95000 78 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
9095d37b 79 instance.\r
d1f95000 80 @param ExtendedVerification Indicates that the driver may perform a more exhaustive\r
9095d37b
LG
81 verification operation of the device during reset.\r
82\r
d1f95000 83 @retval EFI_SUCCESS The device was reset.\r
9095d37b
LG
84 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.\r
85\r
d1f95000 86**/\r
87typedef\r
88EFI_STATUS\r
8b13229b 89(EFIAPI *EFI_SIMPLE_POINTER_RESET)(\r
d1f95000 90 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
91 IN BOOLEAN ExtendedVerification\r
92 );\r
93\r
9095d37b 94/**\r
d1f95000 95 Retrieves the current state of a pointer device.\r
9095d37b 96\r
d1f95000 97 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
9095d37b 98 instance.\r
d1f95000 99 @param State A pointer to the state information on the pointer device.\r
9095d37b 100\r
d1f95000 101 @retval EFI_SUCCESS The state of the pointer device was returned in State.\r
102 @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to\r
9095d37b 103 GetState().\r
d1f95000 104 @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's\r
9095d37b
LG
105 current state.\r
106\r
d1f95000 107**/\r
108typedef\r
109EFI_STATUS\r
8b13229b 110(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(\r
d1f95000 111 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
ff95c0fc 112 OUT EFI_SIMPLE_POINTER_STATE *State\r
d1f95000 113 );\r
114\r
44717a39 115///\r
9095d37b
LG
116/// The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer\r
117/// device that can use used as an input device from an application written\r
118/// to this specification. The services include the ability to reset the\r
119/// pointer device, retrieve get the state of the pointer device, and\r
44717a39 120/// retrieve the capabilities of the pointer device.\r
121///\r
d1f95000 122struct _EFI_SIMPLE_POINTER_PROTOCOL {\r
2f88bd3a
MK
123 EFI_SIMPLE_POINTER_RESET Reset;\r
124 EFI_SIMPLE_POINTER_GET_STATE GetState;\r
1f08a159 125 ///\r
126 /// Event to use with WaitForEvent() to wait for input from the pointer device.\r
127 ///\r
2f88bd3a 128 EFI_EVENT WaitForInput;\r
44717a39 129 ///\r
130 /// Pointer to EFI_SIMPLE_POINTER_MODE data.\r
131 ///\r
2f88bd3a 132 EFI_SIMPLE_POINTER_MODE *Mode;\r
d1f95000 133};\r
134\r
2f88bd3a 135extern EFI_GUID gEfiSimplePointerProtocolGuid;\r
d1f95000 136\r
137#endif\r