]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/SimplePointer.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Protocol / SimplePointer.h
1 /** @file
2 Simple Pointer protocol from the UEFI 2.0 specification.
3
4 Abstraction of a very simple pointer device like a mice or tracekballs.
5
6 Copyright (c) 2006 - 2008, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef __SIMPLE_POINTER_H__
18 #define __SIMPLE_POINTER_H__
19
20 #define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
21 { \
22 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
23 }
24
25 typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;
26
27 //
28 // Data structures
29 //
30 typedef struct {
31 INT32 RelativeMovementX;
32 INT32 RelativeMovementY;
33 INT32 RelativeMovementZ;
34 BOOLEAN LeftButton;
35 BOOLEAN RightButton;
36 } EFI_SIMPLE_POINTER_STATE;
37
38 typedef struct {
39 UINT64 ResolutionX;
40 UINT64 ResolutionY;
41 UINT64 ResolutionZ;
42 BOOLEAN LeftButton;
43 BOOLEAN RightButton;
44 } EFI_SIMPLE_POINTER_MODE;
45
46 /**
47 Resets the pointer device hardware.
48
49 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
50 instance.
51 @param ExtendedVerification Indicates that the driver may perform a more exhaustive
52 verification operation of the device during reset.
53
54 @retval EFI_SUCCESS The device was reset.
55 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.
56
57 **/
58 typedef
59 EFI_STATUS
60 (EFIAPI *EFI_SIMPLE_POINTER_RESET)(
61 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
62 IN BOOLEAN ExtendedVerification
63 );
64
65 /**
66 Retrieves the current state of a pointer device.
67
68 @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
69 instance.
70 @param State A pointer to the state information on the pointer device.
71
72 @retval EFI_SUCCESS The state of the pointer device was returned in State.
73 @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to
74 GetState().
75 @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's
76 current state.
77
78 **/
79 typedef
80 EFI_STATUS
81 (EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(
82 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
83 IN OUT EFI_SIMPLE_POINTER_STATE *State
84 );
85
86 /**
87 @par Protocol Description:
88 The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer
89 device that can use used as an input device from an application written
90 to this specification. The services include the ability to reset the
91 pointer device, retrieve get the state of the pointer device, and
92 retrieve the capabilities of the pointer device.
93
94 @param Reset
95 Resets the pointer device.
96
97 @param GetState
98 Retrieves the current state of the pointer device.
99
100 @param WaitForInput
101 Event to use with WaitForEvent() to wait for input from the pointer device.
102
103 @param Mode
104 Pointer to EFI_SIMPLE_POINTER_MODE data.
105 **/
106 struct _EFI_SIMPLE_POINTER_PROTOCOL {
107 EFI_SIMPLE_POINTER_RESET Reset;
108 EFI_SIMPLE_POINTER_GET_STATE GetState;
109 EFI_EVENT WaitForInput;
110 EFI_SIMPLE_POINTER_MODE *Mode;
111 };
112
113 extern EFI_GUID gEfiSimplePointerProtocolGuid;
114
115 #endif