]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Simple Pointer protocol from the EFI 1.1 specification.\r | |
3 | \r | |
4 | Abstraction of a very simple pointer device like a mice or tracekballs.\r | |
5 | \r | |
6 | Copyright (c) 2006, 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 | Module Name: SimplePointer.h\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __SIMPLE_POINTER_H__\r | |
20 | #define __SIMPLE_POINTER_H__\r | |
21 | \r | |
22 | #define EFI_SIMPLE_POINTER_PROTOCOL_GUID \\r | |
23 | { \\r | |
24 | 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r | |
25 | }\r | |
26 | \r | |
27 | typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;\r | |
28 | \r | |
29 | //\r | |
30 | // Data structures\r | |
31 | //\r | |
32 | typedef struct {\r | |
33 | INT32 RelativeMovementX;\r | |
34 | INT32 RelativeMovementY;\r | |
35 | INT32 RelativeMovementZ;\r | |
36 | BOOLEAN LeftButton;\r | |
37 | BOOLEAN RightButton;\r | |
38 | } EFI_SIMPLE_POINTER_STATE;\r | |
39 | \r | |
40 | typedef struct {\r | |
41 | UINT64 ResolutionX;\r | |
42 | UINT64 ResolutionY;\r | |
43 | UINT64 ResolutionZ;\r | |
44 | BOOLEAN LeftButton;\r | |
45 | BOOLEAN RightButton;\r | |
46 | } EFI_SIMPLE_POINTER_MODE;\r | |
47 | \r | |
48 | /** \r | |
49 | Resets the pointer device hardware.\r | |
50 | \r | |
51 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r | |
52 | instance. \r | |
53 | @param ExtendedVerification Indicates that the driver may perform a more exhaustive\r | |
54 | verification operation of the device during reset. \r | |
55 | \r | |
56 | @retval EFI_SUCCESS The device was reset.\r | |
57 | @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. \r | |
58 | \r | |
59 | **/\r | |
60 | typedef\r | |
61 | EFI_STATUS\r | |
62 | (EFIAPI *EFI_SIMPLE_POINTER_RESET) (\r | |
63 | IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r | |
64 | IN BOOLEAN ExtendedVerification\r | |
65 | );\r | |
66 | \r | |
67 | /** \r | |
68 | Retrieves the current state of a pointer device.\r | |
69 | \r | |
70 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL\r | |
71 | instance. \r | |
72 | @param State A pointer to the state information on the pointer device.\r | |
73 | \r | |
74 | @retval EFI_SUCCESS The state of the pointer device was returned in State.\r | |
75 | @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to\r | |
76 | GetState(). \r | |
77 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's\r | |
78 | current state. \r | |
79 | \r | |
80 | **/\r | |
81 | typedef\r | |
82 | EFI_STATUS\r | |
83 | (EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) (\r | |
84 | IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r | |
85 | IN OUT EFI_SIMPLE_POINTER_STATE *State\r | |
86 | );\r | |
87 | \r | |
88 | struct _EFI_SIMPLE_POINTER_PROTOCOL {\r | |
89 | EFI_SIMPLE_POINTER_RESET Reset;\r | |
90 | EFI_SIMPLE_POINTER_GET_STATE GetState;\r | |
91 | EFI_EVENT WaitForInput;\r | |
92 | EFI_SIMPLE_POINTER_MODE *Mode;\r | |
93 | };\r | |
94 | \r | |
95 | extern EFI_GUID gEfiSimplePointerProtocolGuid;\r | |
96 | \r | |
97 | #endif\r |