+++ /dev/null
-/** @file\r
-\r
- Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
-\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _GASKET_H_\r
-#define _GASKET_H_\r
-\r
-#include <Library/PeCoffLib.h>\r
-\r
-#include <Protocol/UgaDraw.h>\r
-#include <Protocol/SimpleTextIn.h>\r
-#include <Protocol/SimpleTextInEx.h>\r
-#include <Protocol/UnixUgaIo.h>\r
-\r
-\r
-//\r
-// Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
-//\r
-\r
-void\r
-EFIAPI\r
-GasketmsSleep (unsigned long Milliseconds);\r
-\r
-void\r
-EFIAPI\r
-Gasketexit (\r
- int status\r
- );\r
-\r
-void\r
-EFIAPI\r
-GasketSetTimer (\r
- UINT64 PeriodMs,\r
- VOID (*CallBack)(UINT64 DeltaMs)\r
- );\r
-\r
-void\r
-EFIAPI\r
-GasketGetLocalTime (\r
- EFI_TIME *Time\r
- );\r
-\r
-struct tm *\r
-EFIAPI\r
-Gasketgmtime (\r
- const time_t *clock\r
- );\r
-\r
-long\r
-EFIAPI\r
-GasketGetTimeZone (\r
- void\r
- );\r
-\r
-int\r
-EFIAPI\r
-GasketGetDayLight (\r
- void\r
- );\r
-\r
-\r
-int\r
-EFIAPI\r
-Gasketpoll (\r
- struct pollfd *pfd,\r
- unsigned int nfds,\r
- int timeout\r
- );\r
-\r
-long\r
-EFIAPI\r
-Gasketread (\r
- int fd,\r
- void *buf,\r
- int count);\r
-\r
-long\r
-EFIAPI\r
-Gasketwrite (\r
- int fd,\r
- const void *buf,\r
- int count\r
- );\r
-\r
-char *\r
-EFIAPI\r
-Gasketgetenv (\r
- const char *name\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketopen (\r
- const char *name,\r
- int flags,\r
- int mode\r
- );\r
-\r
-off_t\r
-EFIAPI\r
-Gasketlseek (\r
- int fd,\r
- off_t off,\r
- int whence\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketftruncate (\r
- int fd,\r
- long int len\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketclose (\r
- int fd\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketmkdir (\r
- const char *pathname,\r
- mode_t mode\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketrmdir (\r
- const char *pathname\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketunlink (\r
- const char *pathname\r
- );\r
-\r
-int\r
-EFIAPI\r
-GasketGetErrno (\r
- void\r
- );\r
-\r
-DIR *\r
-EFIAPI\r
-Gasketopendir (\r
- const char *pathname\r
- );\r
-\r
-void\r
-EFIAPI\r
-Gasketrewinddir (\r
- DIR *dir\r
- );\r
-\r
-struct dirent *\r
-EFIAPI\r
-Gasketreaddir (\r
- DIR *dir\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketclosedir (\r
- DIR *dir\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketstat (\r
- const char *path, \r
- STAT_FIX *buf)\r
- ;\r
-\r
-int\r
-EFIAPI\r
-Gasketstatfs (\r
- const char *path, \r
- struct statfs *buf\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketrename (\r
- const char *oldpath,\r
- const char *newpath\r
- );\r
-\r
-time_t\r
-EFIAPI\r
-Gasketmktime (\r
- struct tm *tm\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketfsync (\r
- int fd\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketchmod (\r
- const char *path,\r
- mode_t mode\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketutime (\r
- const char *filename,\r
- const struct utimbuf *buf\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gaskettcflush (\r
- int fildes,\r
- int queue_selector\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaCreate (\r
- struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,\r
- CONST CHAR16 *Title\r
- );\r
-\r
-void\r
-EFIAPI\r
-Gasketperror (\r
- __const char *__s\r
- );\r
-\r
-//\r
-// ... is always an int or pointer to device specific data structure\r
-//\r
-\r
-int\r
-EFIAPI\r
-Gasketioctl (\r
- int fd,\r
- unsigned long int __request,\r
- void *Arg\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketfcntl (\r
- int __fd,\r
- int __cmd,\r
- void *Arg\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketcfsetispeed (\r
- struct termios *__termios_p,\r
- speed_t __speed\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketcfsetospeed (\r
- struct termios *__termios_p,\r
- speed_t __speed\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gaskettcgetattr (\r
- int __fd,\r
- struct termios *__termios_p\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gaskettcsetattr (\r
- int __fd,\r
- int __optional_actions,\r
- __const struct termios *__termios_p\r
- );\r
-\r
-int\r
-EFIAPI\r
-Gasketsigaction (\r
- int sig,\r
- const struct sigaction *act,\r
- struct sigaction *oact\r
- );\r
-\r
-int \r
-EFIAPI \r
-Gasketgetifaddrs (\r
- struct ifaddrs **ifap\r
- );\r
-\r
-void \r
-EFIAPI \r
-Gasketfreeifaddrs (\r
- struct ifaddrs *ifap\r
- );\r
-\r
-int \r
-EFIAPI \r
-Gasketsocket (\r
- int domain, \r
- int type, \r
- int protocol\r
- );\r
-\r
-void \r
-EFIAPI \r
-GasketUnixEnableInterrupt (void);\r
-\r
-void \r
-EFIAPI \r
-GasketUnixDisableInterrupt (void);\r
-\r
-RETURN_STATUS\r
-EFIAPI\r
-GasketUnixPeCoffGetEntryPoint (\r
- IN VOID *Pe32Data,\r
- IN OUT VOID **EntryPoint\r
- );\r
-\r
-VOID\r
-EFIAPI\r
-GasketUnixPeCoffRelocateImageExtraAction (\r
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
- );\r
-\r
-VOID\r
-EFIAPI\r
-GasketUnixPeCoffUnloadImageExtraAction (\r
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
- );\r
-\r
-\r
-\r
-UINTN\r
-EFIAPI\r
-GasketVoid (\r
- void *api\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintn (\r
- void *api,\r
- UINTN a\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintnUintn (\r
- void *api,\r
- UINTN a,\r
- UINTN b\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintnUintnUintn (\r
- void *api,\r
- UINTN a,\r
- UINTN b,\r
- UINTN c\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintnUintnUintnUintn (\r
- void *api,\r
- UINTN a,\r
- UINTN b,\r
- UINTN c,\r
- UINTN d\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintn10Args (\r
- void *api,\r
- UINTN a,\r
- UINTN b,\r
- UINTN c,\r
- UINTN d,\r
- UINTN e,\r
- UINTN f,\r
- UINTN g,\r
- UINTN h,\r
- UINTN i,\r
- UINTN j\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUint64Uintn (\r
- void *api,\r
- UINT64 a,\r
- UINTN b);\r
-\r
-UINT64\r
-EFIAPI\r
-GasketUintnUint64Uintn (\r
- void *api,\r
- UINTN a,\r
- UINT64 b,\r
- UINTN c\r
- );\r
-\r
-UINTN\r
-EFIAPI\r
-GasketUintnUint16 (\r
- void *api,\r
- UINTN a,\r
- UINT16 b\r
- );\r
-\r
-typedef\r
-void\r
-(*CALL_BACK) (\r
- UINT64 Delta\r
- );\r
-\r
-UINTN\r
-ReverseGasketUint64 (\r
- CALL_BACK CallBack,\r
- UINT64 a\r
- );\r
-\r
-UINTN\r
-ReverseGasketUint64Uint64 (\r
- VOID *CallBack,\r
- VOID *Context,\r
- VOID *Key\r
- );\r
-\r
-//\r
-// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
-//\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaClose (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaSize (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- UINT32 Width,\r
- UINT32 Height\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaCheckKey (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaGetKey (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- EFI_KEY_DATA *key\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaKeySetState (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- EFI_KEY_TOGGLE_STATE *KeyToggleState\r
- );\r
- \r
-EFI_STATUS\r
-EFIAPI \r
-GasketUgaRegisterKeyNotify ( \r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
- IN UGA_REGISTER_KEY_NOTIFY_CALLBACK CallBack,\r
- IN VOID *Context\r
- );\r
- \r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaBlt (\r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
- IN EFI_UGA_BLT_OPERATION BltOperation,\r
- IN UGA_BLT_ARGS *Args\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-GasketUgaCheckPointer (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaGetPointerState (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
- EFI_SIMPLE_POINTER_STATE *state\r
- );\r
-\r
-\r
-//\r
-// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL C calls\r
-//\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaCreate (\r
- EFI_UNIX_UGA_IO_PROTOCOL **Uga,\r
- CONST CHAR16 *Title\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaClose (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaSize(\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- UINT32 Width,\r
- UINT32 Height\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaCheckKey(\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaGetKey (\r
- EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- EFI_KEY_DATA *key\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaRegisterKeyNotify (\r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
- IN UGA_REGISTER_KEY_NOTIFY_CALLBACK CallBack,\r
- IN VOID *Context\r
- );\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UgaBlt (\r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
- IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
- IN EFI_UGA_BLT_OPERATION BltOperation,\r
- IN UGA_BLT_ARGS *Args\r
- );\r
-\r
-EFI_STATUS \r
-EFIAPI\r
-UgaCheckPointer (\r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
- );\r
- \r
-EFI_STATUS\r
-EFIAPI\r
-UgaGetPointerState (\r
- IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
- IN EFI_SIMPLE_POINTER_STATE *State\r
- );\r
-\r
-\r
-#endif\r
-\r
-\r