]>
Commit | Line | Data |
---|---|---|
804405e7 | 1 | /*++ |
2 | ||
f9b8ab56 HT |
3 | Copyright (c) 2006, Tristan Gingold. All rights reserved.<BR> |
4 | This program and the accompanying materials | |
804405e7 | 5 | are licensed and made available under the terms and conditions of the |
6 | BSD License which accompanies this distribution. The full text of the | |
7 | license may be found at http://opensource.org/licenses/bsd-license.php | |
8 | ||
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
11 | ||
12 | Module Name: | |
13 | ||
14 | UnixUgaIo.h | |
15 | ||
16 | Abstract: | |
17 | ||
18 | --*/ | |
19 | ||
20 | #ifndef _UNIX_UGA_IO_H_ | |
21 | #define _UNIX_UGA_IO_H_ | |
22 | ||
2ff79f2e | 23 | #include <Protocol/SimplePointer.h> |
24 | #include <Protocol/SimpleTextIn.h> | |
25 | #include <Protocol/SimpleTextInEx.h> | |
26 | #include <Protocol/UgaDraw.h> | |
27 | ||
b9c8e50e | 28 | #define EFI_UNIX_UGA_IO_PROTOCOL_GUID {0xf2e5e2c6, 0x8985, 0x11db, {0xa1, 0x91, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } } |
804405e7 | 29 | |
804405e7 | 30 | typedef struct _EFI_UNIX_UGA_IO_PROTOCOL EFI_UNIX_UGA_IO_PROTOCOL; |
31 | ||
32 | typedef | |
33 | EFI_STATUS | |
2ff79f2e | 34 | (EFIAPI *UGAClose)( |
b9c8e50e | 35 | EFI_UNIX_UGA_IO_PROTOCOL *Uga |
36 | ); | |
804405e7 | 37 | |
38 | typedef | |
39 | EFI_STATUS | |
2ff79f2e | 40 | (EFIAPI *UGASize)( |
b9c8e50e | 41 | EFI_UNIX_UGA_IO_PROTOCOL *Uga, |
42 | UINT32 Width, | |
43 | UINT32 Height | |
44 | ); | |
804405e7 | 45 | |
46 | typedef | |
47 | EFI_STATUS | |
2ff79f2e | 48 | (EFIAPI *UGACheckKey)( |
b9c8e50e | 49 | EFI_UNIX_UGA_IO_PROTOCOL *Uga |
50 | ); | |
804405e7 | 51 | |
52 | typedef | |
53 | EFI_STATUS | |
2ff79f2e | 54 | (EFIAPI *UGAGetKey)( |
b9c8e50e | 55 | EFI_UNIX_UGA_IO_PROTOCOL *Uga, |
2ff79f2e | 56 | EFI_KEY_DATA *key |
57 | ); | |
58 | ||
59 | typedef | |
60 | EFI_STATUS | |
61 | (EFIAPI *UGAKeySetState) ( | |
62 | IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, | |
63 | IN EFI_KEY_TOGGLE_STATE *KeyToggleState | |
64 | ); | |
65 | ||
66 | ||
67 | typedef | |
68 | VOID | |
69 | (EFIAPI *UGA_REGISTER_KEY_NOTIFY_CALLBACK) ( | |
70 | IN VOID *Context, | |
71 | IN EFI_KEY_DATA *KeyData | |
72 | ); | |
73 | ||
74 | typedef | |
75 | EFI_STATUS | |
76 | (EFIAPI *UGARegisterKeyNotify) ( | |
77 | IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, | |
78 | IN UGA_REGISTER_KEY_NOTIFY_CALLBACK CallBack, | |
79 | IN VOID *Context | |
b9c8e50e | 80 | ); |
804405e7 | 81 | |
a4902ccc | 82 | |
83 | typedef struct { | |
2ac288f9 | 84 | UINTN SourceX; |
85 | UINTN SourceY; | |
86 | UINTN DestinationX; | |
87 | UINTN DestinationY; | |
88 | UINTN Width; | |
89 | UINTN Height; | |
90 | UINTN Delta; | |
a4902ccc | 91 | } UGA_BLT_ARGS; |
92 | ||
804405e7 | 93 | typedef |
94 | EFI_STATUS | |
2ff79f2e | 95 | (EFIAPI *UGABlt)( |
b9c8e50e | 96 | IN EFI_UNIX_UGA_IO_PROTOCOL *Uga, |
2ac288f9 | 97 | IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, |
98 | IN EFI_UGA_BLT_OPERATION BltOperation, | |
99 | IN UGA_BLT_ARGS *Args | |
100 | ); | |
804405e7 | 101 | |
2ff79f2e | 102 | typedef |
103 | BOOLEAN | |
104 | (EFIAPI *UGAIsKeyPressed) ( | |
105 | IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, | |
106 | IN EFI_KEY_DATA *KeyData | |
107 | ); | |
108 | ||
109 | typedef | |
110 | EFI_STATUS | |
111 | (EFIAPI *UGACheckPointer)( | |
112 | EFI_UNIX_UGA_IO_PROTOCOL *Uga | |
113 | ); | |
114 | ||
115 | typedef | |
116 | EFI_STATUS | |
117 | (EFIAPI *UGAGetPointerState)( | |
118 | EFI_UNIX_UGA_IO_PROTOCOL *Uga, | |
119 | EFI_SIMPLE_POINTER_STATE *state | |
120 | ); | |
121 | ||
804405e7 | 122 | struct _EFI_UNIX_UGA_IO_PROTOCOL { |
123 | VOID *Private; | |
124 | UGAClose UgaClose; | |
125 | UGASize UgaSize; | |
126 | UGACheckKey UgaCheckKey; | |
2ff79f2e | 127 | UGAKeySetState UgaKeySetState; |
804405e7 | 128 | UGAGetKey UgaGetKey; |
2ff79f2e | 129 | UGARegisterKeyNotify UgaRegisterKeyNotify; |
804405e7 | 130 | UGABlt UgaBlt; |
2ff79f2e | 131 | UGAIsKeyPressed UgaIsKeyPressed; |
132 | UGACheckPointer UgaCheckPointer; | |
133 | UGAGetPointerState UgaGetPointerState; | |
804405e7 | 134 | }; |
135 | ||
136 | ||
137 | extern EFI_GUID gEfiUnixUgaIoProtocolGuid; | |
138 | ||
139 | #endif |