]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/Sec/Gasket.h
fix changing time daylight settings without changing the time.
[mirror_edk2.git] / UnixPkg / Sec / Gasket.h
index 16862c95bd28126b2803880fc3c44556200bf115..4c75d8abcc83ee30ba7f1b9d5d8b732e4c1e4df9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\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
@@ -19,6 +19,7 @@
 \r
 #include <Protocol/UgaDraw.h>\r
 #include <Protocol/SimpleTextIn.h>\r
+#include <Protocol/SimpleTextInEx.h>\r
 #include <Protocol/UnixUgaIo.h>\r
 \r
 \r
 // Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
 //\r
 \r
-void GasketmsSleep (unsigned long Milliseconds);\r
-void Gasketexit (int status);\r
-void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));\r
-void GasketGetLocalTime (EFI_TIME *Time);\r
-struct tm *Gasketgmtime (const time_t *clock);\r
-long GasketGetTimeZone (void);\r
-int GasketGetDayLight (void);\r
-int Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout);\r
-long Gasketread (int fd, void *buf, int count);\r
-long Gasketwrite (int fd, const void *buf, int count);\r
-char *Gasketgetenv (const char *name);\r
-int Gasketopen (const char *name, int flags, int mode);\r
-off_t Gasketlseek (int fd, off_t off, int whence);\r
-int Gasketftruncate (int fd, long int len);\r
-int Gasketclose (int fd);\r
-int Gasketmkdir (const char *pathname, mode_t mode);\r
-int Gasketrmdir (const char *pathname);\r
-int Gasketunlink (const char *pathname);\r
-int GasketGetErrno (void);\r
-DIR *Gasketopendir (const char *pathname);\r
-void Gasketrewinddir (DIR *dir);\r
-struct dirent *Gasketreaddir (DIR *dir);\r
-int Gasketclosedir (DIR *dir);\r
-int Gasketstat (const char *path, STAT_FIX *buf);\r
-int Gasketstatfs (const char *path, struct statfs *buf);\r
-int Gasketrename (const char *oldpath, const char *newpath);\r
-time_t Gasketmktime (struct tm *tm);\r
-int Gasketfsync (int fd);\r
-int Gasketchmod (const char *path, mode_t mode);\r
-int Gasketutime (const char *filename, const struct utimbuf *buf);\r
-int Gaskettcflush (int fildes, int queue_selector);\r
-EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);\r
-void Gasketperror (__const char *__s);\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
-int Gasketioctl (int fd, unsigned long int __request, void *Arg);\r
-int Gasketfcntl (int __fd, int __cmd, void *Arg);\r
 \r
-int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);\r
-int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);\r
-int Gaskettcgetattr (int __fd, struct termios *__termios_p); \r
-int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);\r
-int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);\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
-UINTN GasketVoid (void *api);\r
-UINTN GasketUintn (void *api, UINTN a);\r
-UINTN GasketUintnUintn (void *api, UINTN a, UINTN b);\r
-UINTN GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);\r
-UINTN GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);\r
-UINTN GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);\r
-UINTN GasketUint64Uintn (void *api, UINT64 a, UINTN b);\r
-UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);\r
-UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);\r
 \r
-UINTN ReverseGasketUint64 (void *api, UINT64 a);\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
-EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
-EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
-EFI_STATUS EFIAPI GasketUgaBlt (\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  UINTN                                   SourceX,\r
-   IN  UINTN                                   SourceY,\r
-   IN  UINTN                                   DestinationX,\r
-   IN  UINTN                                   DestinationY,\r
-   IN  UINTN                                   Width,\r
-   IN  UINTN                                   Height,\r
-   IN  UINTN                                   Delta OPTIONAL\r
+  IN  UGA_BLT_ARGS                            *Args\r
    );\r
 \r
-EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);\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\r
+// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL C calls\r
 //\r
-EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
-EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
-EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
-       IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
-       IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-       IN  UINTN                                   SourceX,\r
-       IN  UINTN                                   SourceY,\r
-       IN  UINTN                                   DestinationX,\r
-       IN  UINTN                                   DestinationY,\r
-       IN  UINTN                                   Width,\r
-       IN  UINTN                                   Height,\r
-       IN  UINTN                                   Delta OPTIONAL\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