/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
*
* 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/>.
*/
#include <grub/gfxmenu_view.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
{
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
int i;
#ifdef GRUB_MACHINE_PCBIOS
grub_dl_load ("vbe");
#endif
if (argc)
if (!mode)
mode = "auto";
if (err)
return err;
{
const char *str;
int texty;
if (!text_layer)
goto fail;
texty = 32;
grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
/* To convert Unicode characters into UTF-8 for this test, the following
command is useful:
echo -ne '\x00\x00\x26\x3A' | iconv -f UTF-32BE -t UTF-8 | od -t x1
This converts the Unicode character U+263A to UTF-8. */
/* Characters used:
Code point Description UTF-8 encoding
----------- ------------------------------ --------------
U+263A unfilled smiley face E2 98 BA
U+00A1 inverted exclamation point C2 A1
U+00A3 British pound currency symbol C2 A3
U+03C4 Greek tau CF 84
U+00E4 lowercase letter a with umlaut C3 A4
U+2124 set 'Z' symbol (integers) E2 84 A4
U+2287 subset symbol E2 8A 87
U+211D set 'R' symbol (real numbers) E2 84 9D */
str =
"Unicode test: happy\xE2\x98\xBA \xC2\xA3 5.00"
" \xC2\xA1\xCF\x84\xC3\xA4u! "
" \xE2\x84\xA4\xE2\x8A\x87\xE2\x84\x9D";
/* All characters in the string exist in the 'Fixed 20' (10x20) font. */
for (i = 0; i < 16; i++)
{
color = grub_video_map_color (i);
}
}
for (i = 0; i < 2; i++)
{
color = grub_video_map_rgb (0, 0, 0);
}
for (i = 0; i < 5; i++)
{
}
grub_getkey ();
for (i = 0; i < 16; i++)
return grub_errno;
fail:
return grub_errno;
}
#ifdef GRUB_MACHINE_PCBIOS
#endif
{
"[WxH]",
N_("Test video subsystem in mode WxH."));
#ifdef GRUB_MACHINE_PCBIOS
0, N_("Test video subsystem."));
#endif
}
{
#ifdef GRUB_MACHINE_PCBIOS
#endif
}