]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
8a7d75b0 | 2 | Simple Pointer protocol from the UEFI 2.0 specification.\r |
d1f95000 | 3 | \r |
4 | Abstraction of a very simple pointer device like a mice or tracekballs.\r | |
5 | \r | |
4ca9b6c4 | 6 | Copyright (c) 2006 - 2008, Intel Corporation \r |
d1f95000 | 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 | |
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 | |
25 | typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;\r | |
26 | \r | |
27 | //\r | |
28 | // Data structures\r | |
29 | //\r | |
30 | typedef 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 | |
38 | typedef 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 | |
58 | typedef\r | |
59 | EFI_STATUS\r | |
8b13229b | 60 | (EFIAPI *EFI_SIMPLE_POINTER_RESET)(\r |
d1f95000 | 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 | |
79 | typedef\r | |
80 | EFI_STATUS\r | |
8b13229b | 81 | (EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(\r |
d1f95000 | 82 | IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r |
83 | IN OUT EFI_SIMPLE_POINTER_STATE *State\r | |
84 | );\r | |
85 | \r | |
4ca9b6c4 LG |
86 | /** \r |
87 | @par Protocol Description:\r | |
88 | The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer \r | |
89 | device that can use used as an input device from an application written \r | |
90 | to this specification. The services include the ability to reset the \r | |
91 | pointer device, retrieve get the state of the pointer device, and \r | |
92 | retrieve the capabilities of the pointer device.\r | |
93 | \r | |
94 | @param Reset\r | |
95 | Resets the pointer device. \r | |
96 | \r | |
97 | @param GetState\r | |
98 | Retrieves the current state of the pointer device. \r | |
99 | \r | |
100 | @param WaitForInput\r | |
101 | Event to use with WaitForEvent() to wait for input from the pointer device.\r | |
102 | \r | |
103 | @param Mode\r | |
104 | Pointer to EFI_SIMPLE_POINTER_MODE data. \r | |
105 | **/\r | |
d1f95000 | 106 | struct _EFI_SIMPLE_POINTER_PROTOCOL {\r |
107 | EFI_SIMPLE_POINTER_RESET Reset;\r | |
108 | EFI_SIMPLE_POINTER_GET_STATE GetState;\r | |
109 | EFI_EVENT WaitForInput;\r | |
110 | EFI_SIMPLE_POINTER_MODE *Mode;\r | |
111 | };\r | |
112 | \r | |
113 | extern EFI_GUID gEfiSimplePointerProtocolGuid;\r | |
114 | \r | |
115 | #endif\r |