summaryrefslogtreecommitdiffstats
path: root/include/grub/efi/uga_draw.h
blob: a31f2672e31729fbf97e6c1ae32ebc3e8c6cfd8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* uga_draw.h - definitions of the uga draw protocol */
/*
 *  GRUB  --  GRand Unified Bootloader
 *  Copyright (C) 2008  Free Software Foundation, Inc.
 *
 *  GRUB is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  GRUB is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 */

/* The console control protocol is not a part of the EFI spec,
   but defined in Intel's Sample Implementation.  */

#ifndef GRUB_EFI_UGA_DRAW_HEADER
#define GRUB_EFI_UGA_DRAW_HEADER	1

#define GRUB_EFI_UGA_DRAW_GUID \
  { 0x982c298b, 0xf4fa, 0x41cb, { 0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 }}

enum grub_efi_uga_blt_operation
{
  GRUB_EFI_UGA_VIDEO_FILL,
  GRUB_EFI_UGA_VIDEO_TO_BLT,
  GRUB_EFI_UGA_BLT_TO_VIDEO,
  GRUB_EFI_UGA_VIDEO_TO_VIDEO,
  GRUB_EFI_UGA_BLT_MAX
};

struct grub_efi_uga_pixel
{
  grub_uint8_t Blue;
  grub_uint8_t Green;
  grub_uint8_t Red;
  grub_uint8_t Reserved;
};

struct grub_efi_uga_draw_protocol
{
  grub_efi_status_t
  (*get_mode) (struct grub_efi_uga_draw_protocol *this,
	       grub_uint32_t *width,
	       grub_uint32_t *height,
	       grub_uint32_t *depth,
	       grub_uint32_t *refresh_rate);

  grub_efi_status_t
  (*set_mode) (struct grub_efi_uga_draw_protocol *this,
	       grub_uint32_t width,
	       grub_uint32_t height,
	       grub_uint32_t depth,
	       grub_uint32_t refresh_rate);

  grub_efi_status_t
  (*blt) (struct grub_efi_uga_draw_protocol *this,
	  struct grub_efi_uga_pixel *blt_buffer,
	  enum grub_efi_uga_blt_operation blt_operation,
	  grub_efi_uintn_t src_x,
	  grub_efi_uintn_t src_y,
	  grub_efi_uintn_t dest_x,
	  grub_efi_uintn_t dest_y,
	  grub_efi_uintn_t width,
	  grub_efi_uintn_t height,
	  grub_efi_uintn_t delta);
};
typedef struct grub_efi_uga_draw_protocol grub_efi_uga_draw_protocol_t;

#endif /* ! GRUB_EFI_UGA_DRAW_HEADER */