]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/SimplePointer.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / SimplePointer.h
... / ...
CommitLineData
1/** @file\r
2 Simple Pointer protocol from the UEFI 2.0 specification.\r
3\r
4 Abstraction of a very simple pointer device like a mice or tracekballs.\r
5\r
6 Copyright (c) 2006 - 2008, Intel Corporation \r
7 All rights reserved. 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
11\r
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
14\r
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
31 INT32 RelativeMovementX;\r
32 INT32 RelativeMovementY;\r
33 INT32 RelativeMovementZ;\r
34 BOOLEAN LeftButton;\r
35 BOOLEAN RightButton;\r
36} EFI_SIMPLE_POINTER_STATE;\r
37\r
38typedef struct {\r
39 UINT64 ResolutionX;\r
40 UINT64 ResolutionY;\r
41 UINT64 ResolutionZ;\r
42 BOOLEAN LeftButton;\r
43 BOOLEAN RightButton;\r
44} EFI_SIMPLE_POINTER_MODE;\r
45\r
46/** \r
47 Resets the pointer device hardware.\r
48 \r
49 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
50 instance. \r
51 @param ExtendedVerification Indicates that the driver may perform a more exhaustive\r
52 verification operation of the device during reset. \r
53 \r
54 @retval EFI_SUCCESS The device was reset.\r
55 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. \r
56 \r
57**/\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *EFI_SIMPLE_POINTER_RESET)(\r
61 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
62 IN BOOLEAN ExtendedVerification\r
63 );\r
64\r
65/** \r
66 Retrieves the current state of a pointer device.\r
67 \r
68 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r
69 instance. \r
70 @param State A pointer to the state information on the pointer device.\r
71 \r
72 @retval EFI_SUCCESS The state of the pointer device was returned in State.\r
73 @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to\r
74 GetState(). \r
75 @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's\r
76 current state. \r
77 \r
78**/\r
79typedef\r
80EFI_STATUS\r
81(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(\r
82 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
83 IN OUT EFI_SIMPLE_POINTER_STATE *State\r
84 );\r
85\r
86///\r
87/// The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer \r
88/// device that can use used as an input device from an application written \r
89/// to this specification. The services include the ability to reset the \r
90/// pointer device, retrieve get the state of the pointer device, and \r
91/// retrieve the capabilities of the pointer device.\r
92///\r
93struct _EFI_SIMPLE_POINTER_PROTOCOL {\r
94 EFI_SIMPLE_POINTER_RESET Reset;\r
95 EFI_SIMPLE_POINTER_GET_STATE GetState;\r
96 ///\r
97 /// Event to use with WaitForEvent() to wait for input from the pointer device.\r
98 ///\r
99 EFI_EVENT WaitForInput;\r
100 ///\r
101 /// Pointer to EFI_SIMPLE_POINTER_MODE data.\r
102 ///\r
103 EFI_SIMPLE_POINTER_MODE *Mode;\r
104};\r
105\r
106extern EFI_GUID gEfiSimplePointerProtocolGuid;\r
107\r
108#endif\r