uga_draw.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* uga_draw.h - definitions of the uga draw protocol */
  2. /*
  3. * GRUB -- GRand Unified Bootloader
  4. * Copyright (C) 2008 Free Software Foundation, Inc.
  5. *
  6. * GRUB is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * GRUB is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. /* The console control protocol is not a part of the EFI spec,
  20. but defined in Intel's Sample Implementation. */
  21. #ifndef GRUB_EFI_UGA_DRAW_HEADER
  22. #define GRUB_EFI_UGA_DRAW_HEADER 1
  23. #define GRUB_EFI_UGA_DRAW_GUID \
  24. { 0x982c298b, 0xf4fa, 0x41cb, { 0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 }}
  25. enum grub_efi_uga_blt_operation
  26. {
  27. GRUB_EFI_UGA_VIDEO_FILL,
  28. GRUB_EFI_UGA_VIDEO_TO_BLT,
  29. GRUB_EFI_UGA_BLT_TO_VIDEO,
  30. GRUB_EFI_UGA_VIDEO_TO_VIDEO,
  31. GRUB_EFI_UGA_BLT_MAX
  32. };
  33. struct grub_efi_uga_pixel
  34. {
  35. grub_uint8_t Blue;
  36. grub_uint8_t Green;
  37. grub_uint8_t Red;
  38. grub_uint8_t Reserved;
  39. };
  40. struct grub_efi_uga_draw_protocol
  41. {
  42. grub_efi_status_t
  43. (__grub_efi_api *get_mode) (struct grub_efi_uga_draw_protocol *this,
  44. grub_uint32_t *width,
  45. grub_uint32_t *height,
  46. grub_uint32_t *depth,
  47. grub_uint32_t *refresh_rate);
  48. grub_efi_status_t
  49. (__grub_efi_api *set_mode) (struct grub_efi_uga_draw_protocol *this,
  50. grub_uint32_t width,
  51. grub_uint32_t height,
  52. grub_uint32_t depth,
  53. grub_uint32_t refresh_rate);
  54. grub_efi_status_t
  55. (__grub_efi_api *blt) (struct grub_efi_uga_draw_protocol *this,
  56. struct grub_efi_uga_pixel *blt_buffer,
  57. enum grub_efi_uga_blt_operation blt_operation,
  58. grub_efi_uintn_t src_x,
  59. grub_efi_uintn_t src_y,
  60. grub_efi_uintn_t dest_x,
  61. grub_efi_uintn_t dest_y,
  62. grub_efi_uintn_t width,
  63. grub_efi_uintn_t height,
  64. grub_efi_uintn_t delta);
  65. };
  66. typedef struct grub_efi_uga_draw_protocol grub_efi_uga_draw_protocol_t;
  67. #endif /* ! GRUB_EFI_UGA_DRAW_HEADER */