grub/term/gfxterm.c

967 lines
26 KiB
C
Raw Normal View History

2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/*
* GRUB -- GRand Unified Bootloader
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
* Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
*
2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> Migrate to GNU General Public License Version 3. * COPYING: Replaced with the plain text version of GPLv3. * config.guess: Updated from gnulib. * config.sub: Likewise. * geninit.sh: Output a GPLv3 copyright notice. * geninitheader.sh: Likewise. * genmodsrc.sh: Likewise. * gensymlist.sh.in: Likewise. * boot/i386/pc/boot.S: Upgraded to GPLv3. * boot/i386/pc/diskboot.S: Likewise. * boot/i386/pc/pxeboot.S: Likewise. * commands/blocklist.c: Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/echo.c: Likewise. * commands/help.c: Likewise. * commands/ls.c: Likewise. * commands/search.c: Likewise. * commands/terminal.c: Likewise. * commands/test.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/reboot.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/halt.c: Likewise. * commands/ieee1275/reboot.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * disk/lvm.c: Likewise. * disk/raid.c: Likewise. * disk/efi/efidisk.c: Likewise. * disk/i386/pc/biosdisk.c: Likewise. * disk/ieee1275/ofdisk.c: Likewise. * font/manager.c: Likewise. * fs/affs.c: Likewise. * fs/ext2.c: Likewise. * fs/fat.c: Likewise. * fs/fshelp.c: Likewise. * fs/hfs.c: Likewise. * fs/hfsplus.c: Likewise. * fs/iso9660.c: Likewise. * fs/jfs.c: Likewise. * fs/minix.c: Likewise. * fs/sfs.c: Likewise. * fs/ufs.c: Likewise. * fs/xfs.c: Likewise. * hello/hello.c: Likewise. * include/grub/acorn_filecore.h: Likewise. * include/grub/arg.h: Likewise. * include/grub/bitmap.h: Likewise. * include/grub/boot.h: Likewise. * include/grub/cache.h: Likewise. * include/grub/device.h: Likewise. * include/grub/disk.h: Likewise. * include/grub/dl.h: Likewise. * include/grub/elfload.h: Likewise. * include/grub/env.h: Likewise. * include/grub/err.h: Likewise. * include/grub/file.h: Likewise. * include/grub/font.h: Likewise. * include/grub/fs.h: Likewise. * include/grub/fshelp.h: Likewise. * include/grub/gzio.h: Likewise. * include/grub/hfs.h: Likewise. * include/grub/kernel.h: Likewise. * include/grub/loader.h: Likewise. * include/grub/lvm.h: Likewise. * include/grub/misc.h: Likewise. * include/grub/mm.h: Likewise. * include/grub/net.h: Likewise. * include/grub/normal.h: Likewise. * include/grub/parser.h: Likewise. * include/grub/partition.h: Likewise. * include/grub/pc_partition.h: Likewise. * include/grub/raid.h: Likewise. * include/grub/rescue.h: Likewise. * include/grub/script.h: Likewise. * include/grub/setjmp.h: Likewise. * include/grub/symbol.h: Likewise. * include/grub/term.h: Likewise. * include/grub/terminfo.h: Likewise. * include/grub/tparm.h: Likewise. * include/grub/types.h: Likewise. * include/grub/video.h: Likewise. * include/grub/efi/api.h: Likewise. * include/grub/efi/chainloader.h: Likewise. * include/grub/efi/console.h: Likewise. * include/grub/efi/console_control.h: Likewise. * include/grub/efi/disk.h: Likewise. * include/grub/efi/efi.h: Likewise. * include/grub/efi/pe32.h: Likewise. * include/grub/efi/time.h: Likewise. * include/grub/i386/linux.h: Likewise. * include/grub/i386/setjmp.h: Likewise. * include/grub/i386/types.h: Likewise. * include/grub/i386/efi/kernel.h: Likewise. * include/grub/i386/efi/loader.h: Likewise. * include/grub/i386/efi/time.h: Likewise. * include/grub/i386/pc/biosdisk.h: Likewise. * include/grub/i386/pc/boot.h: Likewise. * include/grub/i386/pc/chainloader.h: Likewise. * include/grub/i386/pc/console.h: Likewise. * include/grub/i386/pc/init.h: Likewise. * include/grub/i386/pc/kernel.h: Likewise. * include/grub/i386/pc/loader.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * include/grub/i386/pc/multiboot.h: Likewise. * include/grub/i386/pc/serial.h: Likewise. * include/grub/i386/pc/time.h: Likewise. * include/grub/i386/pc/vbe.h: Likewise. * include/grub/i386/pc/vbeblit.h: Likewise. * include/grub/i386/pc/vbefill.h: Likewise. * include/grub/i386/pc/vbeutil.h: Likewise. * include/grub/i386/pc/vga.h: Likewise. * include/grub/ieee1275/ieee1275.h: Likewise. * include/grub/ieee1275/ofdisk.h: Likewise. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/powerpc/setjmp.h: Likewise. * include/grub/powerpc/types.h: Likewise. * include/grub/powerpc/ieee1275/biosdisk.h: Likewise. * include/grub/powerpc/ieee1275/console.h: Likewise. * include/grub/powerpc/ieee1275/ieee1275.h: Likewise. * include/grub/powerpc/ieee1275/kernel.h: Likewise. * include/grub/powerpc/ieee1275/loader.h: Likewise. * include/grub/powerpc/ieee1275/multiboot.h: Likewise. * include/grub/powerpc/ieee1275/time.h: Likewise. * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/grub/sparc64/libgcc.h: Likewise. * include/grub/sparc64/setjmp.h: Likewise. * include/grub/sparc64/types.h: Likewise. * include/grub/sparc64/ieee1275/console.h: Likewise. * include/grub/sparc64/ieee1275/ieee1275.h: Likewise. * include/grub/sparc64/ieee1275/kernel.h: Likewise. * include/grub/sparc64/ieee1275/time.h: Likewise. * include/grub/util/biosdisk.h: Likewise. * include/grub/util/getroot.h: Likewise. * include/grub/util/lvm.h: Likewise. * include/grub/util/misc.h: Likewise. * include/grub/util/raid.h: Likewise. * include/grub/util/resolve.h: Likewise. * io/gzio.c: Likewise. * kern/device.c: Likewise. * kern/disk.c: Likewise. * kern/dl.c: Likewise. * kern/elf.c: Likewise. * kern/env.c: Likewise. * kern/err.c: Likewise. * kern/file.c: Likewise. * kern/fs.c: Likewise. * kern/loader.c: Likewise. * kern/main.c: Likewise. * kern/misc.c: Likewise. * kern/mm.c: Likewise. * kern/parser.c: Likewise. * kern/partition.c: Likewise. * kern/rescue.c: Likewise. * kern/term.c: Likewise. * kern/efi/efi.c: Likewise. * kern/efi/init.c: Likewise. * kern/efi/mm.c: Likewise. * kern/i386/dl.c: Likewise. * kern/i386/efi/init.c: Likewise. * kern/i386/efi/startup.S: Likewise. * kern/i386/pc/init.c: Likewise. * kern/i386/pc/lzo1x.S: Likewise. * kern/i386/pc/startup.S: Likewise. * kern/ieee1275/ieee1275.c: Likewise. * kern/powerpc/cache.S: Likewise. * kern/powerpc/dl.c: Likewise. * kern/powerpc/ieee1275/cmain.c: Likewise. * kern/powerpc/ieee1275/crt0.S: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * kern/sparc64/cache.S: Likewise. * kern/sparc64/dl.c: Likewise. * kern/sparc64/ieee1275/init.c: Likewise. * kern/sparc64/ieee1275/openfw.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/efi/linux_normal.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/i386/pc/linux_normal.c: Likewise. * loader/i386/pc/multiboot.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * normal/arg.c: Likewise. * normal/cmdline.c: Likewise. * normal/command.c: Likewise. * normal/completion.c: Likewise. * normal/execute.c: Likewise. * normal/function.c: Likewise. * normal/lexer.c: Likewise. * normal/main.c: Likewise. * normal/menu.c: Likewise. * normal/menu_entry.c: Likewise. * normal/misc.c: Likewise. * normal/parser.y: Likewise. * normal/script.c: Likewise. * normal/i386/setjmp.S: Likewise. * normal/powerpc/setjmp.S: Likewise. * normal/sparc64/setjmp.S: Likewise. * partmap/acorn.c: Likewise. * partmap/amiga.c: Likewise. * partmap/apple.c: Likewise. * partmap/gpt.c: Likewise. * partmap/pc.c: Likewise. * partmap/sun.c: Likewise. * term/gfxterm.c: Likewise. * term/terminfo.c: Likewise. * term/efi/console.c: Likewise. * term/i386/pc/console.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/i386/pc/vesafb.c: Likewise. * term/i386/pc/vga.c: Likewise. * term/ieee1275/ofconsole.c: Likewise. * util/biosdisk.c: Likewise. * util/console.c: Likewise. * util/genmoddep.c: Likewise. * util/getroot.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-probe.c: Likewise. * util/lvm.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise. * util/resolve.c: Likewise. * util/update-grub.in: Likewise. * util/update-grub_lib.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/grub.d/10_hurd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/i386/efi/grub-install.in: Likewise. * util/i386/efi/grub-mkimage.c: Likewise. * util/i386/pc/grub-install.in: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/i386/pc/grub-mkrescue.in: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/i386/pc/misc.c: Likewise. * util/powerpc/ieee1275/grub-install.in: Likewise. * util/powerpc/ieee1275/grub-mkimage.c: Likewise. * util/powerpc/ieee1275/misc.c: Likewise. * video/bitmap.c: Likewise. * video/video.c: Likewise. * video/i386/pc/vbe.c: Likewise. * video/i386/pc/vbeblit.c: Likewise. * video/i386/pc/vbefill.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * video/readers/tga.c: Likewise.
2007-07-21 23:32:33 +00:00
* GRUB is free software: you can redistribute it and/or modify
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
* it under the terms of the GNU General Public License as published by
2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> Migrate to GNU General Public License Version 3. * COPYING: Replaced with the plain text version of GPLv3. * config.guess: Updated from gnulib. * config.sub: Likewise. * geninit.sh: Output a GPLv3 copyright notice. * geninitheader.sh: Likewise. * genmodsrc.sh: Likewise. * gensymlist.sh.in: Likewise. * boot/i386/pc/boot.S: Upgraded to GPLv3. * boot/i386/pc/diskboot.S: Likewise. * boot/i386/pc/pxeboot.S: Likewise. * commands/blocklist.c: Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/echo.c: Likewise. * commands/help.c: Likewise. * commands/ls.c: Likewise. * commands/search.c: Likewise. * commands/terminal.c: Likewise. * commands/test.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/reboot.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/halt.c: Likewise. * commands/ieee1275/reboot.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * disk/lvm.c: Likewise. * disk/raid.c: Likewise. * disk/efi/efidisk.c: Likewise. * disk/i386/pc/biosdisk.c: Likewise. * disk/ieee1275/ofdisk.c: Likewise. * font/manager.c: Likewise. * fs/affs.c: Likewise. * fs/ext2.c: Likewise. * fs/fat.c: Likewise. * fs/fshelp.c: Likewise. * fs/hfs.c: Likewise. * fs/hfsplus.c: Likewise. * fs/iso9660.c: Likewise. * fs/jfs.c: Likewise. * fs/minix.c: Likewise. * fs/sfs.c: Likewise. * fs/ufs.c: Likewise. * fs/xfs.c: Likewise. * hello/hello.c: Likewise. * include/grub/acorn_filecore.h: Likewise. * include/grub/arg.h: Likewise. * include/grub/bitmap.h: Likewise. * include/grub/boot.h: Likewise. * include/grub/cache.h: Likewise. * include/grub/device.h: Likewise. * include/grub/disk.h: Likewise. * include/grub/dl.h: Likewise. * include/grub/elfload.h: Likewise. * include/grub/env.h: Likewise. * include/grub/err.h: Likewise. * include/grub/file.h: Likewise. * include/grub/font.h: Likewise. * include/grub/fs.h: Likewise. * include/grub/fshelp.h: Likewise. * include/grub/gzio.h: Likewise. * include/grub/hfs.h: Likewise. * include/grub/kernel.h: Likewise. * include/grub/loader.h: Likewise. * include/grub/lvm.h: Likewise. * include/grub/misc.h: Likewise. * include/grub/mm.h: Likewise. * include/grub/net.h: Likewise. * include/grub/normal.h: Likewise. * include/grub/parser.h: Likewise. * include/grub/partition.h: Likewise. * include/grub/pc_partition.h: Likewise. * include/grub/raid.h: Likewise. * include/grub/rescue.h: Likewise. * include/grub/script.h: Likewise. * include/grub/setjmp.h: Likewise. * include/grub/symbol.h: Likewise. * include/grub/term.h: Likewise. * include/grub/terminfo.h: Likewise. * include/grub/tparm.h: Likewise. * include/grub/types.h: Likewise. * include/grub/video.h: Likewise. * include/grub/efi/api.h: Likewise. * include/grub/efi/chainloader.h: Likewise. * include/grub/efi/console.h: Likewise. * include/grub/efi/console_control.h: Likewise. * include/grub/efi/disk.h: Likewise. * include/grub/efi/efi.h: Likewise. * include/grub/efi/pe32.h: Likewise. * include/grub/efi/time.h: Likewise. * include/grub/i386/linux.h: Likewise. * include/grub/i386/setjmp.h: Likewise. * include/grub/i386/types.h: Likewise. * include/grub/i386/efi/kernel.h: Likewise. * include/grub/i386/efi/loader.h: Likewise. * include/grub/i386/efi/time.h: Likewise. * include/grub/i386/pc/biosdisk.h: Likewise. * include/grub/i386/pc/boot.h: Likewise. * include/grub/i386/pc/chainloader.h: Likewise. * include/grub/i386/pc/console.h: Likewise. * include/grub/i386/pc/init.h: Likewise. * include/grub/i386/pc/kernel.h: Likewise. * include/grub/i386/pc/loader.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * include/grub/i386/pc/multiboot.h: Likewise. * include/grub/i386/pc/serial.h: Likewise. * include/grub/i386/pc/time.h: Likewise. * include/grub/i386/pc/vbe.h: Likewise. * include/grub/i386/pc/vbeblit.h: Likewise. * include/grub/i386/pc/vbefill.h: Likewise. * include/grub/i386/pc/vbeutil.h: Likewise. * include/grub/i386/pc/vga.h: Likewise. * include/grub/ieee1275/ieee1275.h: Likewise. * include/grub/ieee1275/ofdisk.h: Likewise. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/powerpc/setjmp.h: Likewise. * include/grub/powerpc/types.h: Likewise. * include/grub/powerpc/ieee1275/biosdisk.h: Likewise. * include/grub/powerpc/ieee1275/console.h: Likewise. * include/grub/powerpc/ieee1275/ieee1275.h: Likewise. * include/grub/powerpc/ieee1275/kernel.h: Likewise. * include/grub/powerpc/ieee1275/loader.h: Likewise. * include/grub/powerpc/ieee1275/multiboot.h: Likewise. * include/grub/powerpc/ieee1275/time.h: Likewise. * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/grub/sparc64/libgcc.h: Likewise. * include/grub/sparc64/setjmp.h: Likewise. * include/grub/sparc64/types.h: Likewise. * include/grub/sparc64/ieee1275/console.h: Likewise. * include/grub/sparc64/ieee1275/ieee1275.h: Likewise. * include/grub/sparc64/ieee1275/kernel.h: Likewise. * include/grub/sparc64/ieee1275/time.h: Likewise. * include/grub/util/biosdisk.h: Likewise. * include/grub/util/getroot.h: Likewise. * include/grub/util/lvm.h: Likewise. * include/grub/util/misc.h: Likewise. * include/grub/util/raid.h: Likewise. * include/grub/util/resolve.h: Likewise. * io/gzio.c: Likewise. * kern/device.c: Likewise. * kern/disk.c: Likewise. * kern/dl.c: Likewise. * kern/elf.c: Likewise. * kern/env.c: Likewise. * kern/err.c: Likewise. * kern/file.c: Likewise. * kern/fs.c: Likewise. * kern/loader.c: Likewise. * kern/main.c: Likewise. * kern/misc.c: Likewise. * kern/mm.c: Likewise. * kern/parser.c: Likewise. * kern/partition.c: Likewise. * kern/rescue.c: Likewise. * kern/term.c: Likewise. * kern/efi/efi.c: Likewise. * kern/efi/init.c: Likewise. * kern/efi/mm.c: Likewise. * kern/i386/dl.c: Likewise. * kern/i386/efi/init.c: Likewise. * kern/i386/efi/startup.S: Likewise. * kern/i386/pc/init.c: Likewise. * kern/i386/pc/lzo1x.S: Likewise. * kern/i386/pc/startup.S: Likewise. * kern/ieee1275/ieee1275.c: Likewise. * kern/powerpc/cache.S: Likewise. * kern/powerpc/dl.c: Likewise. * kern/powerpc/ieee1275/cmain.c: Likewise. * kern/powerpc/ieee1275/crt0.S: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * kern/sparc64/cache.S: Likewise. * kern/sparc64/dl.c: Likewise. * kern/sparc64/ieee1275/init.c: Likewise. * kern/sparc64/ieee1275/openfw.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/efi/linux_normal.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/i386/pc/linux_normal.c: Likewise. * loader/i386/pc/multiboot.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * normal/arg.c: Likewise. * normal/cmdline.c: Likewise. * normal/command.c: Likewise. * normal/completion.c: Likewise. * normal/execute.c: Likewise. * normal/function.c: Likewise. * normal/lexer.c: Likewise. * normal/main.c: Likewise. * normal/menu.c: Likewise. * normal/menu_entry.c: Likewise. * normal/misc.c: Likewise. * normal/parser.y: Likewise. * normal/script.c: Likewise. * normal/i386/setjmp.S: Likewise. * normal/powerpc/setjmp.S: Likewise. * normal/sparc64/setjmp.S: Likewise. * partmap/acorn.c: Likewise. * partmap/amiga.c: Likewise. * partmap/apple.c: Likewise. * partmap/gpt.c: Likewise. * partmap/pc.c: Likewise. * partmap/sun.c: Likewise. * term/gfxterm.c: Likewise. * term/terminfo.c: Likewise. * term/efi/console.c: Likewise. * term/i386/pc/console.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/i386/pc/vesafb.c: Likewise. * term/i386/pc/vga.c: Likewise. * term/ieee1275/ofconsole.c: Likewise. * util/biosdisk.c: Likewise. * util/console.c: Likewise. * util/genmoddep.c: Likewise. * util/getroot.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-probe.c: Likewise. * util/lvm.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise. * util/resolve.c: Likewise. * util/update-grub.in: Likewise. * util/update-grub_lib.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/grub.d/10_hurd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/i386/efi/grub-install.in: Likewise. * util/i386/efi/grub-mkimage.c: Likewise. * util/i386/pc/grub-install.in: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/i386/pc/grub-mkrescue.in: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/i386/pc/misc.c: Likewise. * util/powerpc/ieee1275/grub-install.in: Likewise. * util/powerpc/ieee1275/grub-mkimage.c: Likewise. * util/powerpc/ieee1275/misc.c: Likewise. * video/bitmap.c: Likewise. * video/video.c: Likewise. * video/i386/pc/vbe.c: Likewise. * video/i386/pc/vbeblit.c: Likewise. * video/i386/pc/vbefill.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * video/readers/tga.c: Likewise.
2007-07-21 23:32:33 +00:00
* the Free Software Foundation, either version 3 of the License, or
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
* (at your option) any later version.
*
2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> Migrate to GNU General Public License Version 3. * COPYING: Replaced with the plain text version of GPLv3. * config.guess: Updated from gnulib. * config.sub: Likewise. * geninit.sh: Output a GPLv3 copyright notice. * geninitheader.sh: Likewise. * genmodsrc.sh: Likewise. * gensymlist.sh.in: Likewise. * boot/i386/pc/boot.S: Upgraded to GPLv3. * boot/i386/pc/diskboot.S: Likewise. * boot/i386/pc/pxeboot.S: Likewise. * commands/blocklist.c: Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/echo.c: Likewise. * commands/help.c: Likewise. * commands/ls.c: Likewise. * commands/search.c: Likewise. * commands/terminal.c: Likewise. * commands/test.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/reboot.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/halt.c: Likewise. * commands/ieee1275/reboot.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * disk/lvm.c: Likewise. * disk/raid.c: Likewise. * disk/efi/efidisk.c: Likewise. * disk/i386/pc/biosdisk.c: Likewise. * disk/ieee1275/ofdisk.c: Likewise. * font/manager.c: Likewise. * fs/affs.c: Likewise. * fs/ext2.c: Likewise. * fs/fat.c: Likewise. * fs/fshelp.c: Likewise. * fs/hfs.c: Likewise. * fs/hfsplus.c: Likewise. * fs/iso9660.c: Likewise. * fs/jfs.c: Likewise. * fs/minix.c: Likewise. * fs/sfs.c: Likewise. * fs/ufs.c: Likewise. * fs/xfs.c: Likewise. * hello/hello.c: Likewise. * include/grub/acorn_filecore.h: Likewise. * include/grub/arg.h: Likewise. * include/grub/bitmap.h: Likewise. * include/grub/boot.h: Likewise. * include/grub/cache.h: Likewise. * include/grub/device.h: Likewise. * include/grub/disk.h: Likewise. * include/grub/dl.h: Likewise. * include/grub/elfload.h: Likewise. * include/grub/env.h: Likewise. * include/grub/err.h: Likewise. * include/grub/file.h: Likewise. * include/grub/font.h: Likewise. * include/grub/fs.h: Likewise. * include/grub/fshelp.h: Likewise. * include/grub/gzio.h: Likewise. * include/grub/hfs.h: Likewise. * include/grub/kernel.h: Likewise. * include/grub/loader.h: Likewise. * include/grub/lvm.h: Likewise. * include/grub/misc.h: Likewise. * include/grub/mm.h: Likewise. * include/grub/net.h: Likewise. * include/grub/normal.h: Likewise. * include/grub/parser.h: Likewise. * include/grub/partition.h: Likewise. * include/grub/pc_partition.h: Likewise. * include/grub/raid.h: Likewise. * include/grub/rescue.h: Likewise. * include/grub/script.h: Likewise. * include/grub/setjmp.h: Likewise. * include/grub/symbol.h: Likewise. * include/grub/term.h: Likewise. * include/grub/terminfo.h: Likewise. * include/grub/tparm.h: Likewise. * include/grub/types.h: Likewise. * include/grub/video.h: Likewise. * include/grub/efi/api.h: Likewise. * include/grub/efi/chainloader.h: Likewise. * include/grub/efi/console.h: Likewise. * include/grub/efi/console_control.h: Likewise. * include/grub/efi/disk.h: Likewise. * include/grub/efi/efi.h: Likewise. * include/grub/efi/pe32.h: Likewise. * include/grub/efi/time.h: Likewise. * include/grub/i386/linux.h: Likewise. * include/grub/i386/setjmp.h: Likewise. * include/grub/i386/types.h: Likewise. * include/grub/i386/efi/kernel.h: Likewise. * include/grub/i386/efi/loader.h: Likewise. * include/grub/i386/efi/time.h: Likewise. * include/grub/i386/pc/biosdisk.h: Likewise. * include/grub/i386/pc/boot.h: Likewise. * include/grub/i386/pc/chainloader.h: Likewise. * include/grub/i386/pc/console.h: Likewise. * include/grub/i386/pc/init.h: Likewise. * include/grub/i386/pc/kernel.h: Likewise. * include/grub/i386/pc/loader.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * include/grub/i386/pc/multiboot.h: Likewise. * include/grub/i386/pc/serial.h: Likewise. * include/grub/i386/pc/time.h: Likewise. * include/grub/i386/pc/vbe.h: Likewise. * include/grub/i386/pc/vbeblit.h: Likewise. * include/grub/i386/pc/vbefill.h: Likewise. * include/grub/i386/pc/vbeutil.h: Likewise. * include/grub/i386/pc/vga.h: Likewise. * include/grub/ieee1275/ieee1275.h: Likewise. * include/grub/ieee1275/ofdisk.h: Likewise. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/powerpc/setjmp.h: Likewise. * include/grub/powerpc/types.h: Likewise. * include/grub/powerpc/ieee1275/biosdisk.h: Likewise. * include/grub/powerpc/ieee1275/console.h: Likewise. * include/grub/powerpc/ieee1275/ieee1275.h: Likewise. * include/grub/powerpc/ieee1275/kernel.h: Likewise. * include/grub/powerpc/ieee1275/loader.h: Likewise. * include/grub/powerpc/ieee1275/multiboot.h: Likewise. * include/grub/powerpc/ieee1275/time.h: Likewise. * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/grub/sparc64/libgcc.h: Likewise. * include/grub/sparc64/setjmp.h: Likewise. * include/grub/sparc64/types.h: Likewise. * include/grub/sparc64/ieee1275/console.h: Likewise. * include/grub/sparc64/ieee1275/ieee1275.h: Likewise. * include/grub/sparc64/ieee1275/kernel.h: Likewise. * include/grub/sparc64/ieee1275/time.h: Likewise. * include/grub/util/biosdisk.h: Likewise. * include/grub/util/getroot.h: Likewise. * include/grub/util/lvm.h: Likewise. * include/grub/util/misc.h: Likewise. * include/grub/util/raid.h: Likewise. * include/grub/util/resolve.h: Likewise. * io/gzio.c: Likewise. * kern/device.c: Likewise. * kern/disk.c: Likewise. * kern/dl.c: Likewise. * kern/elf.c: Likewise. * kern/env.c: Likewise. * kern/err.c: Likewise. * kern/file.c: Likewise. * kern/fs.c: Likewise. * kern/loader.c: Likewise. * kern/main.c: Likewise. * kern/misc.c: Likewise. * kern/mm.c: Likewise. * kern/parser.c: Likewise. * kern/partition.c: Likewise. * kern/rescue.c: Likewise. * kern/term.c: Likewise. * kern/efi/efi.c: Likewise. * kern/efi/init.c: Likewise. * kern/efi/mm.c: Likewise. * kern/i386/dl.c: Likewise. * kern/i386/efi/init.c: Likewise. * kern/i386/efi/startup.S: Likewise. * kern/i386/pc/init.c: Likewise. * kern/i386/pc/lzo1x.S: Likewise. * kern/i386/pc/startup.S: Likewise. * kern/ieee1275/ieee1275.c: Likewise. * kern/powerpc/cache.S: Likewise. * kern/powerpc/dl.c: Likewise. * kern/powerpc/ieee1275/cmain.c: Likewise. * kern/powerpc/ieee1275/crt0.S: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * kern/sparc64/cache.S: Likewise. * kern/sparc64/dl.c: Likewise. * kern/sparc64/ieee1275/init.c: Likewise. * kern/sparc64/ieee1275/openfw.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/efi/linux_normal.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/i386/pc/linux_normal.c: Likewise. * loader/i386/pc/multiboot.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * normal/arg.c: Likewise. * normal/cmdline.c: Likewise. * normal/command.c: Likewise. * normal/completion.c: Likewise. * normal/execute.c: Likewise. * normal/function.c: Likewise. * normal/lexer.c: Likewise. * normal/main.c: Likewise. * normal/menu.c: Likewise. * normal/menu_entry.c: Likewise. * normal/misc.c: Likewise. * normal/parser.y: Likewise. * normal/script.c: Likewise. * normal/i386/setjmp.S: Likewise. * normal/powerpc/setjmp.S: Likewise. * normal/sparc64/setjmp.S: Likewise. * partmap/acorn.c: Likewise. * partmap/amiga.c: Likewise. * partmap/apple.c: Likewise. * partmap/gpt.c: Likewise. * partmap/pc.c: Likewise. * partmap/sun.c: Likewise. * term/gfxterm.c: Likewise. * term/terminfo.c: Likewise. * term/efi/console.c: Likewise. * term/i386/pc/console.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/i386/pc/vesafb.c: Likewise. * term/i386/pc/vga.c: Likewise. * term/ieee1275/ofconsole.c: Likewise. * util/biosdisk.c: Likewise. * util/console.c: Likewise. * util/genmoddep.c: Likewise. * util/getroot.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-probe.c: Likewise. * util/lvm.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise. * util/resolve.c: Likewise. * util/update-grub.in: Likewise. * util/update-grub_lib.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/grub.d/10_hurd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/i386/efi/grub-install.in: Likewise. * util/i386/efi/grub-mkimage.c: Likewise. * util/i386/pc/grub-install.in: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/i386/pc/grub-mkrescue.in: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/i386/pc/misc.c: Likewise. * util/powerpc/ieee1275/grub-install.in: Likewise. * util/powerpc/ieee1275/grub-mkimage.c: Likewise. * util/powerpc/ieee1275/misc.c: Likewise. * video/bitmap.c: Likewise. * video/video.c: Likewise. * video/i386/pc/vbe.c: Likewise. * video/i386/pc/vbeblit.c: Likewise. * video/i386/pc/vbefill.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * video/readers/tga.c: Likewise.
2007-07-21 23:32:33 +00:00
* GRUB is distributed in the hope that it will be useful,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
* 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
2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> Migrate to GNU General Public License Version 3. * COPYING: Replaced with the plain text version of GPLv3. * config.guess: Updated from gnulib. * config.sub: Likewise. * geninit.sh: Output a GPLv3 copyright notice. * geninitheader.sh: Likewise. * genmodsrc.sh: Likewise. * gensymlist.sh.in: Likewise. * boot/i386/pc/boot.S: Upgraded to GPLv3. * boot/i386/pc/diskboot.S: Likewise. * boot/i386/pc/pxeboot.S: Likewise. * commands/blocklist.c: Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/echo.c: Likewise. * commands/help.c: Likewise. * commands/ls.c: Likewise. * commands/search.c: Likewise. * commands/terminal.c: Likewise. * commands/test.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/reboot.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/halt.c: Likewise. * commands/ieee1275/reboot.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * disk/lvm.c: Likewise. * disk/raid.c: Likewise. * disk/efi/efidisk.c: Likewise. * disk/i386/pc/biosdisk.c: Likewise. * disk/ieee1275/ofdisk.c: Likewise. * font/manager.c: Likewise. * fs/affs.c: Likewise. * fs/ext2.c: Likewise. * fs/fat.c: Likewise. * fs/fshelp.c: Likewise. * fs/hfs.c: Likewise. * fs/hfsplus.c: Likewise. * fs/iso9660.c: Likewise. * fs/jfs.c: Likewise. * fs/minix.c: Likewise. * fs/sfs.c: Likewise. * fs/ufs.c: Likewise. * fs/xfs.c: Likewise. * hello/hello.c: Likewise. * include/grub/acorn_filecore.h: Likewise. * include/grub/arg.h: Likewise. * include/grub/bitmap.h: Likewise. * include/grub/boot.h: Likewise. * include/grub/cache.h: Likewise. * include/grub/device.h: Likewise. * include/grub/disk.h: Likewise. * include/grub/dl.h: Likewise. * include/grub/elfload.h: Likewise. * include/grub/env.h: Likewise. * include/grub/err.h: Likewise. * include/grub/file.h: Likewise. * include/grub/font.h: Likewise. * include/grub/fs.h: Likewise. * include/grub/fshelp.h: Likewise. * include/grub/gzio.h: Likewise. * include/grub/hfs.h: Likewise. * include/grub/kernel.h: Likewise. * include/grub/loader.h: Likewise. * include/grub/lvm.h: Likewise. * include/grub/misc.h: Likewise. * include/grub/mm.h: Likewise. * include/grub/net.h: Likewise. * include/grub/normal.h: Likewise. * include/grub/parser.h: Likewise. * include/grub/partition.h: Likewise. * include/grub/pc_partition.h: Likewise. * include/grub/raid.h: Likewise. * include/grub/rescue.h: Likewise. * include/grub/script.h: Likewise. * include/grub/setjmp.h: Likewise. * include/grub/symbol.h: Likewise. * include/grub/term.h: Likewise. * include/grub/terminfo.h: Likewise. * include/grub/tparm.h: Likewise. * include/grub/types.h: Likewise. * include/grub/video.h: Likewise. * include/grub/efi/api.h: Likewise. * include/grub/efi/chainloader.h: Likewise. * include/grub/efi/console.h: Likewise. * include/grub/efi/console_control.h: Likewise. * include/grub/efi/disk.h: Likewise. * include/grub/efi/efi.h: Likewise. * include/grub/efi/pe32.h: Likewise. * include/grub/efi/time.h: Likewise. * include/grub/i386/linux.h: Likewise. * include/grub/i386/setjmp.h: Likewise. * include/grub/i386/types.h: Likewise. * include/grub/i386/efi/kernel.h: Likewise. * include/grub/i386/efi/loader.h: Likewise. * include/grub/i386/efi/time.h: Likewise. * include/grub/i386/pc/biosdisk.h: Likewise. * include/grub/i386/pc/boot.h: Likewise. * include/grub/i386/pc/chainloader.h: Likewise. * include/grub/i386/pc/console.h: Likewise. * include/grub/i386/pc/init.h: Likewise. * include/grub/i386/pc/kernel.h: Likewise. * include/grub/i386/pc/loader.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * include/grub/i386/pc/multiboot.h: Likewise. * include/grub/i386/pc/serial.h: Likewise. * include/grub/i386/pc/time.h: Likewise. * include/grub/i386/pc/vbe.h: Likewise. * include/grub/i386/pc/vbeblit.h: Likewise. * include/grub/i386/pc/vbefill.h: Likewise. * include/grub/i386/pc/vbeutil.h: Likewise. * include/grub/i386/pc/vga.h: Likewise. * include/grub/ieee1275/ieee1275.h: Likewise. * include/grub/ieee1275/ofdisk.h: Likewise. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/powerpc/setjmp.h: Likewise. * include/grub/powerpc/types.h: Likewise. * include/grub/powerpc/ieee1275/biosdisk.h: Likewise. * include/grub/powerpc/ieee1275/console.h: Likewise. * include/grub/powerpc/ieee1275/ieee1275.h: Likewise. * include/grub/powerpc/ieee1275/kernel.h: Likewise. * include/grub/powerpc/ieee1275/loader.h: Likewise. * include/grub/powerpc/ieee1275/multiboot.h: Likewise. * include/grub/powerpc/ieee1275/time.h: Likewise. * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/grub/sparc64/libgcc.h: Likewise. * include/grub/sparc64/setjmp.h: Likewise. * include/grub/sparc64/types.h: Likewise. * include/grub/sparc64/ieee1275/console.h: Likewise. * include/grub/sparc64/ieee1275/ieee1275.h: Likewise. * include/grub/sparc64/ieee1275/kernel.h: Likewise. * include/grub/sparc64/ieee1275/time.h: Likewise. * include/grub/util/biosdisk.h: Likewise. * include/grub/util/getroot.h: Likewise. * include/grub/util/lvm.h: Likewise. * include/grub/util/misc.h: Likewise. * include/grub/util/raid.h: Likewise. * include/grub/util/resolve.h: Likewise. * io/gzio.c: Likewise. * kern/device.c: Likewise. * kern/disk.c: Likewise. * kern/dl.c: Likewise. * kern/elf.c: Likewise. * kern/env.c: Likewise. * kern/err.c: Likewise. * kern/file.c: Likewise. * kern/fs.c: Likewise. * kern/loader.c: Likewise. * kern/main.c: Likewise. * kern/misc.c: Likewise. * kern/mm.c: Likewise. * kern/parser.c: Likewise. * kern/partition.c: Likewise. * kern/rescue.c: Likewise. * kern/term.c: Likewise. * kern/efi/efi.c: Likewise. * kern/efi/init.c: Likewise. * kern/efi/mm.c: Likewise. * kern/i386/dl.c: Likewise. * kern/i386/efi/init.c: Likewise. * kern/i386/efi/startup.S: Likewise. * kern/i386/pc/init.c: Likewise. * kern/i386/pc/lzo1x.S: Likewise. * kern/i386/pc/startup.S: Likewise. * kern/ieee1275/ieee1275.c: Likewise. * kern/powerpc/cache.S: Likewise. * kern/powerpc/dl.c: Likewise. * kern/powerpc/ieee1275/cmain.c: Likewise. * kern/powerpc/ieee1275/crt0.S: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * kern/sparc64/cache.S: Likewise. * kern/sparc64/dl.c: Likewise. * kern/sparc64/ieee1275/init.c: Likewise. * kern/sparc64/ieee1275/openfw.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/efi/linux_normal.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/i386/pc/linux_normal.c: Likewise. * loader/i386/pc/multiboot.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * normal/arg.c: Likewise. * normal/cmdline.c: Likewise. * normal/command.c: Likewise. * normal/completion.c: Likewise. * normal/execute.c: Likewise. * normal/function.c: Likewise. * normal/lexer.c: Likewise. * normal/main.c: Likewise. * normal/menu.c: Likewise. * normal/menu_entry.c: Likewise. * normal/misc.c: Likewise. * normal/parser.y: Likewise. * normal/script.c: Likewise. * normal/i386/setjmp.S: Likewise. * normal/powerpc/setjmp.S: Likewise. * normal/sparc64/setjmp.S: Likewise. * partmap/acorn.c: Likewise. * partmap/amiga.c: Likewise. * partmap/apple.c: Likewise. * partmap/gpt.c: Likewise. * partmap/pc.c: Likewise. * partmap/sun.c: Likewise. * term/gfxterm.c: Likewise. * term/terminfo.c: Likewise. * term/efi/console.c: Likewise. * term/i386/pc/console.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/i386/pc/vesafb.c: Likewise. * term/i386/pc/vga.c: Likewise. * term/ieee1275/ofconsole.c: Likewise. * util/biosdisk.c: Likewise. * util/console.c: Likewise. * util/genmoddep.c: Likewise. * util/getroot.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-probe.c: Likewise. * util/lvm.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise. * util/resolve.c: Likewise. * util/update-grub.in: Likewise. * util/update-grub_lib.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/grub.d/10_hurd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/i386/efi/grub-install.in: Likewise. * util/i386/efi/grub-mkimage.c: Likewise. * util/i386/pc/grub-install.in: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/i386/pc/grub-mkrescue.in: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/i386/pc/misc.c: Likewise. * util/powerpc/ieee1275/grub-install.in: Likewise. * util/powerpc/ieee1275/grub-mkimage.c: Likewise. * util/powerpc/ieee1275/misc.c: Likewise. * video/bitmap.c: Likewise. * video/video.c: Likewise. * video/i386/pc/vbe.c: Likewise. * video/i386/pc/vbeblit.c: Likewise. * video/i386/pc/vbefill.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * video/readers/tga.c: Likewise.
2007-07-21 23:32:33 +00:00
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
*/
#include <grub/term.h>
#include <grub/types.h>
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/font.h>
#include <grub/mm.h>
#include <grub/env.h>
#include <grub/video.h>
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
#include <grub/bitmap.h>
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
#include <grub/command.h>
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
#define DEFAULT_VIDEO_MODE "1024x768,800x600,640x480"
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
#define DEFAULT_BORDER_WIDTH 10
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
#define DEFAULT_STANDARD_COLOR 0x07
#define DEFAULT_NORMAL_COLOR 0x07
#define DEFAULT_HIGHLIGHT_COLOR 0x70
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
struct grub_dirty_region
{
int top_left_x;
int top_left_y;
int bottom_right_x;
int bottom_right_y;
};
struct grub_colored_char
{
/* An Unicode codepoint. */
grub_uint32_t code;
/* Color values. */
grub_video_color_t fg_color;
grub_video_color_t bg_color;
/* The width of this character minus one. */
unsigned char width;
/* The column index of this character. */
unsigned char index;
};
struct grub_virtual_screen
{
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Dimensions of the virtual screen in pixels. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int width;
unsigned int height;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Offset in the display in pixels. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int offset_x;
unsigned int offset_y;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* TTY Character sizes in pixes. */
unsigned int normal_char_width;
unsigned int normal_char_height;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Virtual screen TTY size in characters. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int columns;
unsigned int rows;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Current cursor location in characters. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int cursor_x;
unsigned int cursor_y;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Current cursor state. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
int cursor_state;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Font settings. */
grub_font_t font;
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Terminal color settings. */
grub_uint8_t standard_color_setting;
grub_uint8_t normal_color_setting;
grub_uint8_t highlight_color_setting;
grub_uint8_t term_color;
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Color settings. */
grub_video_color_t fg_color;
grub_video_color_t bg_color;
/* Text buffer for virtual screen. Contains (columns * rows) number
of entries. */
struct grub_colored_char *text_buffer;
};
static struct grub_virtual_screen virtual_screen;
static struct grub_video_mode_info mode_info;
static struct grub_video_render_target *text_layer;
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
static unsigned int bitmap_width;
static unsigned int bitmap_height;
static struct grub_video_bitmap *bitmap;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
static struct grub_dirty_region dirty_region;
static void dirty_region_reset (void);
static int dirty_region_is_empty (void);
2009-06-10 21:04:23 +00:00
static void dirty_region_add (int x, int y,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int width, unsigned int height);
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
static unsigned int calculate_normal_character_width (grub_font_t font);
static unsigned char calculate_character_width (struct grub_font_glyph *glyph);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
static void
set_term_color (grub_uint8_t term_color)
{
struct grub_video_render_target *old_target;
/* Save previous target and switch to text layer. */
grub_video_get_active_render_target (&old_target);
grub_video_set_active_render_target (text_layer);
/* Map terminal color to text layer compatible video colors. */
virtual_screen.fg_color = grub_video_map_color(term_color & 0x0f);
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Special case: use black as transparent color. */
if (((term_color >> 4) & 0x0f) == 0)
{
virtual_screen.bg_color = grub_video_map_rgba(0, 0, 0, 0);
2009-06-10 21:04:23 +00:00
}
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
else
{
virtual_screen.bg_color = grub_video_map_color((term_color >> 4) & 0x0f);
}
/* Restore previous target. */
grub_video_set_active_render_target (old_target);
}
static void
clear_char (struct grub_colored_char *c)
{
c->code = ' ';
c->fg_color = virtual_screen.fg_color;
c->bg_color = virtual_screen.bg_color;
c->width = 0;
c->index = 0;
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
static void
grub_virtual_screen_free (void)
{
/* If virtual screen has been allocated, free it. */
if (virtual_screen.text_buffer != 0)
grub_free (virtual_screen.text_buffer);
/* Reset virtual screen data. */
grub_memset (&virtual_screen, 0, sizeof (virtual_screen));
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Free render targets. */
grub_video_delete_render_target (text_layer);
text_layer = 0;
}
static grub_err_t
grub_virtual_screen_setup (unsigned int x, unsigned int y,
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
unsigned int width, unsigned int height,
const char *font_name)
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
{
unsigned int i;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Free old virtual screen. */
grub_virtual_screen_free ();
/* Initialize with default data. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
virtual_screen.font = grub_font_get (font_name);
if (!virtual_screen.font)
return grub_error (GRUB_ERR_BAD_FONT,
"No font loaded.");
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
virtual_screen.width = width;
virtual_screen.height = height;
virtual_screen.offset_x = x;
virtual_screen.offset_y = y;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
virtual_screen.normal_char_width =
calculate_normal_character_width (virtual_screen.font);
virtual_screen.normal_char_height =
grub_font_get_max_char_height (virtual_screen.font);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
virtual_screen.cursor_x = 0;
virtual_screen.cursor_y = 0;
virtual_screen.cursor_state = 1;
/* Calculate size of text buffer. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
virtual_screen.columns = virtual_screen.width / virtual_screen.normal_char_width;
virtual_screen.rows = virtual_screen.height / virtual_screen.normal_char_height;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Allocate memory for text buffer. */
virtual_screen.text_buffer =
(struct grub_colored_char *) grub_malloc (virtual_screen.columns
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
* virtual_screen.rows
* sizeof (*virtual_screen.text_buffer));
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (grub_errno != GRUB_ERR_NONE)
return grub_errno;
/* Create new render target for text layer. */
grub_video_create_render_target (&text_layer,
virtual_screen.width,
virtual_screen.height,
GRUB_VIDEO_MODE_TYPE_RGB
| GRUB_VIDEO_MODE_TYPE_ALPHA);
if (grub_errno != GRUB_ERR_NONE)
return grub_errno;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* As we want to have colors compatible with rendering target,
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
we can only have those after mode is initialized. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_set_active_render_target (text_layer);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
virtual_screen.standard_color_setting = DEFAULT_STANDARD_COLOR;
virtual_screen.normal_color_setting = DEFAULT_NORMAL_COLOR;
virtual_screen.highlight_color_setting = DEFAULT_HIGHLIGHT_COLOR;
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
virtual_screen.term_color = virtual_screen.normal_color_setting;
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
set_term_color (virtual_screen.term_color);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
/* Clear out text buffer. */
for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
clear_char (&(virtual_screen.text_buffer[i]));
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
return grub_errno;
}
static int NESTED_FUNC_ATTR video_hook (grub_video_adapter_t p __attribute__ ((unused)),
struct grub_video_mode_info *info)
{
return ! (info->mode_type & GRUB_VIDEO_MODE_TYPE_PURE_TEXT);
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
static grub_err_t
grub_gfxterm_init (void)
{
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
char *font_name;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
char *modevar;
char *tmp;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_color_t color;
int width;
int height;
grub_err_t err;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Select the font to use. */
font_name = grub_env_get ("gfxterm_font");
if (! font_name)
font_name = ""; /* Allow fallback to any font. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Parse gfxmode environment variable if set. */
modevar = grub_env_get ("gfxmode");
if (! modevar || *modevar == 0)
err = grub_video_set_mode (DEFAULT_VIDEO_MODE, video_hook);
else
{
2009-06-10 21:04:23 +00:00
tmp = grub_malloc (grub_strlen (modevar)
+ sizeof (DEFAULT_VIDEO_MODE) + 1);
grub_sprintf (tmp, "%s;" DEFAULT_VIDEO_MODE, modevar);
err = grub_video_set_mode (tmp, video_hook);
grub_free (tmp);
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (err)
return err;
err = grub_video_get_info (&mode_info);
/* Figure out what mode we ended up. */
if (err)
return err;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Make sure screen is black. */
color = grub_video_map_rgb (0, 0, 0);
grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
bitmap = 0;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Leave borders for virtual screen. */
width = mode_info.width - (2 * DEFAULT_BORDER_WIDTH);
height = mode_info.height - (2 * DEFAULT_BORDER_WIDTH);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Create virtual screen. */
if (grub_virtual_screen_setup (DEFAULT_BORDER_WIDTH, DEFAULT_BORDER_WIDTH,
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
width, height, font_name) != GRUB_ERR_NONE)
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
{
grub_video_restore ();
return grub_errno;
}
/* Mark whole screen as dirty. */
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
dirty_region_reset ();
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
dirty_region_add (0, 0, mode_info.width, mode_info.height);
return (grub_errno = GRUB_ERR_NONE);
}
static grub_err_t
grub_gfxterm_fini (void)
{
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
if (bitmap)
{
grub_video_bitmap_destroy (bitmap);
bitmap = 0;
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_virtual_screen_free ();
grub_video_restore ();
return GRUB_ERR_NONE;
}
static void
2009-06-10 21:04:23 +00:00
redraw_screen_rect (unsigned int x, unsigned int y,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int width, unsigned int height)
{
grub_video_color_t color;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
if (bitmap)
{
/* Render bitmap as background. */
2009-06-10 21:04:23 +00:00
grub_video_blit_bitmap (bitmap, GRUB_VIDEO_BLIT_REPLACE, x, y,
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
x, y,
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
width, height);
2009-06-10 21:04:23 +00:00
/* If bitmap is smaller than requested blit area, use background
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
color. */
color = virtual_screen.bg_color;
/* Fill right side of the bitmap if needed. */
if ((x + width >= bitmap_width) && (y < bitmap_height))
{
int w = (x + width) - bitmap_width;
int h = height;
unsigned int tx = x;
if (y + height >= bitmap_height)
{
h = bitmap_height - y;
}
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
if (bitmap_width > tx)
{
tx = bitmap_width;
}
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Render background layer. */
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
grub_video_fill_rect (color, tx, y, w, h);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
}
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Fill bottom side of the bitmap if needed. */
if (y + height >= bitmap_height)
{
int h = (y + height) - bitmap_height;
unsigned int ty = y;
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
if (bitmap_height > ty)
{
ty = bitmap_height;
}
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Render background layer. */
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
grub_video_fill_rect (color, x, ty, width, h);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
}
/* Render text layer as blended. */
grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, x, y,
x - virtual_screen.offset_x,
y - virtual_screen.offset_y,
width, height);
}
else
{
/* Render background layer. */
color = virtual_screen.bg_color;
grub_video_fill_rect (color, x, y, width, height);
/* Render text layer as replaced (to get texts background color). */
grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_REPLACE, x, y,
x - virtual_screen.offset_x,
y - virtual_screen.offset_y,
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
width, height);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
dirty_region_reset (void)
{
dirty_region.top_left_x = -1;
dirty_region.top_left_y = -1;
dirty_region.bottom_right_x = -1;
dirty_region.bottom_right_y = -1;
}
static int
dirty_region_is_empty (void)
{
if ((dirty_region.top_left_x == -1)
|| (dirty_region.top_left_y == -1)
|| (dirty_region.bottom_right_x == -1)
|| (dirty_region.bottom_right_y == -1))
return 1;
return 0;
}
static void
dirty_region_add (int x, int y, unsigned int width, unsigned int height)
{
if ((width == 0) || (height == 0))
return;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (dirty_region_is_empty ())
{
dirty_region.top_left_x = x;
dirty_region.top_left_y = y;
dirty_region.bottom_right_x = x + width - 1;
dirty_region.bottom_right_y = y + height - 1;
2009-06-10 21:04:23 +00:00
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
else
{
if (x < dirty_region.top_left_x)
dirty_region.top_left_x = x;
if (y < dirty_region.top_left_y)
dirty_region.top_left_y = y;
if ((x + (int)width - 1) > dirty_region.bottom_right_x)
dirty_region.bottom_right_x = x + width - 1;
if ((y + (int)height - 1) > dirty_region.bottom_right_y)
dirty_region.bottom_right_y = y + height - 1;
}
2009-06-10 21:04:23 +00:00
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
static void
dirty_region_add_virtualscreen (void)
{
/* Mark virtual screen as dirty. */
dirty_region_add (virtual_screen.offset_x, virtual_screen.offset_y,
virtual_screen.width, virtual_screen.height);
}
static void
dirty_region_redraw (void)
{
int x;
int y;
int width;
int height;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (dirty_region_is_empty ())
return;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
x = dirty_region.top_left_x;
y = dirty_region.top_left_y;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
width = dirty_region.bottom_right_x - x + 1;
height = dirty_region.bottom_right_y - y + 1;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
redraw_screen_rect (x, y, width, height);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
dirty_region_reset ();
}
static void
write_char (void)
{
struct grub_colored_char *p;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
struct grub_font_glyph *glyph;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_color_t color;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
grub_video_color_t bgcolor;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
unsigned int x;
unsigned int y;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
int ascent;
unsigned int height;
unsigned int width;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Find out active character. */
p = (virtual_screen.text_buffer
+ virtual_screen.cursor_x
+ (virtual_screen.cursor_y * virtual_screen.columns));
p -= p->index;
/* Get glyph for character. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
glyph = grub_font_get_glyph (virtual_screen.font, p->code);
ascent = grub_font_get_ascent (virtual_screen.font);
2009-06-10 21:04:23 +00:00
width = virtual_screen.normal_char_width * calculate_character_width(glyph);
height = virtual_screen.normal_char_height;
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
color = p->fg_color;
bgcolor = p->bg_color;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
x = virtual_screen.cursor_x * virtual_screen.normal_char_width;
y = virtual_screen.cursor_y * virtual_screen.normal_char_height;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Render glyph to text layer. */
grub_video_set_active_render_target (text_layer);
grub_video_fill_rect (bgcolor, x, y, width, height);
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
grub_font_draw_glyph (glyph, color, x, y + ascent);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
/* Mark character to be drawn. */
dirty_region_add (virtual_screen.offset_x + x, virtual_screen.offset_y + y,
width, height);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (int show)
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
{
write_char ();
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
if (show)
{
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
grub_video_color_t color;
/* Determine cursor properties and position on text layer. */
x = virtual_screen.cursor_x * virtual_screen.normal_char_width;
width = virtual_screen.normal_char_width;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
color = virtual_screen.fg_color;
y = (virtual_screen.cursor_y * virtual_screen.normal_char_height
+ grub_font_get_ascent (virtual_screen.font));
height = 2;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Render cursor to text layer. */
grub_video_set_active_render_target (text_layer);
grub_video_fill_rect (color, x, y, width, height);
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Mark cursor to be redrawn. */
dirty_region_add (virtual_screen.offset_x + x,
virtual_screen.offset_y + y,
width, height);
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
scroll_up (void)
{
unsigned int i;
grub_video_color_t color;
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* If we don't have background bitmap, remove cursor. */
if (!bitmap)
{
/* Remove cursor. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (0);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Redraw only changed regions. */
dirty_region_redraw ();
}
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Scroll text buffer with one line to up. */
grub_memmove (virtual_screen.text_buffer,
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
virtual_screen.text_buffer + virtual_screen.columns,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
sizeof (*virtual_screen.text_buffer)
* virtual_screen.columns
* (virtual_screen.rows - 1));
/* Clear last line in text buffer. */
for (i = virtual_screen.columns * (virtual_screen.rows - 1);
i < virtual_screen.columns * virtual_screen.rows;
i++)
clear_char (&(virtual_screen.text_buffer[i]));
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Scroll physical screen. */
grub_video_set_active_render_target (text_layer);
color = virtual_screen.bg_color;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
grub_video_scroll (color, 0, -virtual_screen.normal_char_height);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* If we have bitmap, re-draw screen, otherwise scroll physical screen too. */
if (bitmap)
{
/* Mark virtual screen to be redrawn. */
dirty_region_add_virtualscreen ();
}
else
2009-06-10 21:04:23 +00:00
{
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Clear new border area. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
grub_video_fill_rect (color,
virtual_screen.offset_x, virtual_screen.offset_y,
virtual_screen.width, virtual_screen.normal_char_height);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Scroll physical screen. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
grub_video_scroll (color, 0, -virtual_screen.normal_char_height);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Draw cursor if visible. */
if (virtual_screen.cursor_state)
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (1);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
grub_gfxterm_putchar (grub_uint32_t c)
{
if (c == '\a')
/* FIXME */
return;
/* Erase current cursor, if any. */
if (virtual_screen.cursor_state)
draw_cursor (0);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (c == '\b' || c == '\n' || c == '\r')
{
switch (c)
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
{
case '\b':
if (virtual_screen.cursor_x > 0)
virtual_screen.cursor_x--;
break;
case '\n':
if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
scroll_up ();
else
virtual_screen.cursor_y++;
break;
case '\r':
virtual_screen.cursor_x = 0;
break;
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
else
{
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
struct grub_font_glyph *glyph;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
struct grub_colored_char *p;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
unsigned char char_width;
/* Get properties of the character. */
glyph = grub_font_get_glyph (virtual_screen.font, c);
/* Calculate actual character width for glyph. This is number of
times of normal_font_width. */
char_width = calculate_character_width(glyph);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* If we are about to exceed line length, wrap to next line. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
if (virtual_screen.cursor_x + char_width > virtual_screen.columns)
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
grub_putchar ('\n');
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Find position on virtual screen, and fill information. */
p = (virtual_screen.text_buffer +
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
virtual_screen.cursor_x +
virtual_screen.cursor_y * virtual_screen.columns);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
p->code = c;
p->fg_color = virtual_screen.fg_color;
p->bg_color = virtual_screen.bg_color;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
p->width = char_width - 1;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
p->index = 0;
/* If we have large glyph, add fixup info. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
if (char_width > 1)
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
{
unsigned i;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
for (i = 1; i < char_width; i++)
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
{
p[i].code = ' ';
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
p[i].width = char_width - 1;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
p[i].index = i;
}
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Draw glyph. */
write_char ();
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Make sure we scroll screen when needed and wrap line correctly. */
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
virtual_screen.cursor_x += char_width;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (virtual_screen.cursor_x >= virtual_screen.columns)
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
{
virtual_screen.cursor_x = 0;
if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
scroll_up ();
else
virtual_screen.cursor_y++;
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
/* Redraw cursor if it should be visible. */
/* Note: This will redraw the character as well, which means that the
above call to write_char is redundant when the cursor is showing. */
if (virtual_screen.cursor_state)
draw_cursor (1);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Use ASCII characters to determine normal character width. */
static unsigned int
calculate_normal_character_width (grub_font_t font)
{
struct grub_font_glyph *glyph;
unsigned int width = 0;
unsigned int i;
/* Get properties of every printable ASCII character. */
for (i = 32; i < 127; i++)
{
glyph = grub_font_get_glyph (font, i);
/* Skip unknown characters. Should never happen on normal conditions. */
if (! glyph)
continue;
if (glyph->device_width > width)
width = glyph->device_width;
}
return width;
}
static unsigned char
calculate_character_width (struct grub_font_glyph *glyph)
{
if (! glyph || glyph->device_width == 0)
return 1;
return (glyph->device_width
+ (virtual_screen.normal_char_width - 1))
/ virtual_screen.normal_char_width;
}
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
static grub_ssize_t
grub_gfxterm_getcharwidth (grub_uint32_t c)
{
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
struct grub_font_glyph *glyph;
unsigned char char_width;
/* Get properties of the character. */
glyph = grub_font_get_glyph (virtual_screen.font, c);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Calculate actual character width for glyph. */
char_width = calculate_character_width (glyph);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
return char_width;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static grub_uint16_t
grub_virtual_screen_getwh (void)
{
return (virtual_screen.columns << 8) | virtual_screen.rows;
}
static grub_uint16_t
grub_virtual_screen_getxy (void)
{
return ((virtual_screen.cursor_x << 8) | virtual_screen.cursor_y);
}
static void
grub_gfxterm_gotoxy (grub_uint8_t x, grub_uint8_t y)
{
if (x >= virtual_screen.columns)
x = virtual_screen.columns - 1;
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (y >= virtual_screen.rows)
y = virtual_screen.rows - 1;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Erase current cursor, if any. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (virtual_screen.cursor_state)
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (0);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
virtual_screen.cursor_x = x;
virtual_screen.cursor_y = y;
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
/* Draw cursor if visible. */
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
if (virtual_screen.cursor_state)
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (1);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
grub_virtual_screen_cls (void)
{
grub_uint32_t i;
for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
clear_char (&(virtual_screen.text_buffer[i]));
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
virtual_screen.cursor_x = virtual_screen.cursor_y = 0;
}
static void
grub_gfxterm_cls (void)
{
grub_video_color_t color;
/* Clear virtual screen. */
grub_virtual_screen_cls ();
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Clear text layer. */
grub_video_set_active_render_target (text_layer);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
color = virtual_screen.bg_color;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
/* Mark virtual screen to be redrawn. */
dirty_region_add_virtualscreen ();
}
static void
grub_virtual_screen_setcolorstate (grub_term_color_state state)
{
switch (state)
{
case GRUB_TERM_COLOR_STANDARD:
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
virtual_screen.term_color = virtual_screen.standard_color_setting;
break;
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
case GRUB_TERM_COLOR_NORMAL:
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
virtual_screen.term_color = virtual_screen.normal_color_setting;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
break;
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
case GRUB_TERM_COLOR_HIGHLIGHT:
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
virtual_screen.term_color = virtual_screen.highlight_color_setting;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
break;
2009-06-10 21:04:23 +00:00
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
default:
break;
}
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Change color to virtual terminal. */
set_term_color (virtual_screen.term_color);
}
static void
grub_virtual_screen_setcolor (grub_uint8_t normal_color,
grub_uint8_t highlight_color)
{
virtual_screen.normal_color_setting = normal_color;
virtual_screen.highlight_color_setting = highlight_color;
}
static void
grub_virtual_screen_getcolor (grub_uint8_t *normal_color,
grub_uint8_t *highlight_color)
{
*normal_color = virtual_screen.normal_color_setting;
*highlight_color = virtual_screen.highlight_color_setting;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
static void
grub_gfxterm_setcursor (int on)
{
if (virtual_screen.cursor_state != on)
{
if (virtual_screen.cursor_state)
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (0);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
else
2009-01-02 Colin D Bennett <colin@gibibit.com> New font engine. Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to build system and fixed gfxterm.c to work with different sized fonts. * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF. * configure: Re-generated. * DISTLIST: Removed font/manager.c. Added font/font.c. Added font/font_cmd.c. * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool compilation. * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users. * kern/misc.c (grub_utf8_to_ucs4): Changed prototype. * kern/term.c: Changed users of grub_utf8_to_ucs4. * normal/menu.c: Likewise. * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c. (font_mod_SOURCES): Added font/font_cmd.c, font/font.c. * include/grub/font.h: Replaced with new file. * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value. (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise. (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise. (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added. (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED. (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, fg_red, fg_green, fg_blue, fg_alpha. (grub_video_adapter): Removed blit_glyph. (grub_video_blit_glyph): Removed. * font/manager.c: Removed file. * font/font.c: New file. * font/font_cmd.c: Likewise. * video/video.c (grub_video_blit_glyph): Removed. * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color_int): Likewise. (grub_video_vbe_blit_glyph): Removed. (grub_video_vbe_adapter): Removed blit_glyph. * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support. (get_pixel): Likewise. (set_pixel): Likewise. * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts. * term/gfxterm.c: Adapted to new font engine. * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile. * term/i386/pc/vga.c: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file. * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise. * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise. * util/grub.d/00_header.in: Changed to use new loadfont command. * util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
draw_cursor (1);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
virtual_screen.cursor_state = on;
}
}
static void
grub_gfxterm_refresh (void)
{
/* Redraw only changed regions. */
dirty_region_redraw ();
}
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
static grub_err_t
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
grub_gfxterm_background_image_cmd (grub_command_t cmd __attribute__ ((unused)),
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
int argc,
char **args)
{
/* Check that we have video adapter active. */
if (grub_video_get_info(NULL) != GRUB_ERR_NONE)
return grub_errno;
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Destroy existing background bitmap if loaded. */
if (bitmap)
{
grub_video_bitmap_destroy (bitmap);
bitmap = 0;
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Mark whole screen as dirty. */
dirty_region_reset ();
dirty_region_add (0, 0, mode_info.width, mode_info.height);
}
/* If filename was provided, try to load that. */
if (argc >= 1)
{
/* Try to load new one. */
2009-06-10 21:04:23 +00:00
grub_video_bitmap_load (&bitmap, args[0]);
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
if (grub_errno != GRUB_ERR_NONE)
return grub_errno;
/* If bitmap was loaded correctly, display it. */
if (bitmap)
{
/* Determine bitmap dimensions. */
bitmap_width = grub_video_bitmap_get_width (bitmap);
bitmap_height = grub_video_bitmap_get_width (bitmap);
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* Mark whole screen as dirty. */
dirty_region_reset ();
dirty_region_add (0, 0, mode_info.width, mode_info.height);
}
}
2009-06-10 21:04:23 +00:00
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
/* All was ok. */
grub_errno = GRUB_ERR_NONE;
return grub_errno;
}
2008-11-07 Robert Millan <rmh@aybabtu.com> Modularize at_keyboard.mod: * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'. (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS) (at_keyboard_mod_LDFLAGS): New variables. Actual terminal split: * include/grub/term.h (struct grub_term): Split in ... (struct grub_term_input): ... this, and ... (struct grub_term_output): ... this. Update all users. (grub_term_set_current): Split in ... (grub_term_set_current_input): ... this, and ... (grub_term_set_current_output): ... this. (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. (grub_term_register): Split in ... (grub_term_register_input): ... this, and ... (grub_term_register_output): ... this. (grub_term_unregister): Split in ... (grub_term_unregister_input): ... this, and ... (grub_term_unregister_output): ... this. (grub_term_iterate): Split in ... (grub_term_iterate_input): ... this, and ... (grub_term_iterate_output): ... this. * kern/term.c (grub_term_list): Split in ... (grub_term_list_input): ... this, and ... (grub_term_list_output): ... this. Update all users. (grub_cur_term): Split in ... (grub_cur_term_input): ... this, and ... (grub_cur_term_output): ... this. Update all users. (grub_term_set_current): Split in ... (grub_term_set_current_input): ... this, and ... (grub_term_set_current_output): ... this. (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. (grub_term_register): Split in ... (grub_term_register_input): ... this, and ... (grub_term_register_output): ... this. (grub_term_unregister): Split in ... (grub_term_unregister_input): ... this, and ... (grub_term_unregister_output): ... this. (grub_term_iterate): Split in ... (grub_term_iterate_input): ... this, and ... (grub_term_iterate_output): ... this. * kern/misc.c (grub_abort): Split use of grub_term_get_current() into a check for input and one for output (and only attempt to get keys from user when input works). * util/grub-probe.c (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. * util/grub-fstest.c: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/grub-editenv.c: Likewise. Portability adjustments: * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove `term/i386/pc/at_keyboard.c'. * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to grub_keyboard_controller_init() (now handled by terminal .init). * kern/i386/coreboot/init.c (grub_machine_init): Add call to grub_at_keyboard_init(). * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init) (grub_console_checkkey, grub_console_getkey): Remove (now provided by at_keyboard.mod via input terminal interface). * include/grub/i386/coreboot/console.h: Convert into a stub for `<grub/i386/pc/console.h>'. Migrate full terminals to new API: * term/efi/console.c (grub_console_term): Split into ... (grub_console_term_input): ... this, and ... (grub_console_term_output): ... this. Update all users. * term/ieee1275/ofconsole.c: Remove __i386__ hack. (grub_ofconsole_init): Split into ... (grub_ofconsole_init_input): ... this, and ... (grub_ofconsole_init_output): ... this. (grub_ofconsole_term): Split into ... (grub_ofconsole_term_input): ... this, and ... (grub_ofconsole_term_output): ... this. Update all users. * term/i386/pc/serial.c (grub_serial_term): Split into ... (grub_serial_term_input): ... this, and ... (grub_serial_term_output): ... this. Update all users. * term/i386/pc/console.c (grub_console_term): Split into ... (grub_console_term_input): ... this, and ... (grub_console_term_output): ... this. Update all users. (grub_console_term_input): Only enable it on PC/BIOS platform. (grub_console_init): Remove grub_keyboard_controller_init() call. Migrate input terminals to new API: * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with `i386' and `i386/pc' to enable build on x86_64 (this driver is i386-specific anyway). (grub_console_checkkey): Rename to ... (grub_at_keyboard_checkkey): ... this. Static-ize. Update all users. (grub_keyboard_controller_orig): New variable. (grub_console_getkey): Rename to ... (grub_at_keyboard_getkey): ... this. Static-ize. Update all users. (grub_keyboard_controller_init): Static-ize. Save original controller value so that it can be restored ... (grub_keyboard_controller_fini): ... here (new function). (grub_at_keyboard_term): New structure. (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New functions. Migrate output terminals to new API: * term/i386/pc/vga.c (grub_vga_term): Change type to `struct grub_term_output'. Remove `.checkkey' and `.getkey' members. Update all users. * term/gfxterm.c (grub_video_term): Change type to `struct grub_term_output'. Remove `.checkkey' and `.getkey' members. Update all users. * include/grub/i386/pc/console.h (grub_console_checkkey) (grub_console_getkey): Do not export (no longer needed by gfxterm, etc). Migrate `terminal' command and userland tools to new API: * commands/terminal.c (grub_cmd_terminal): Split into ... (grub_cmd_terminal_input): ... this, and ... (grub_cmd_terminal_output): ... this. (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands: `terminal_input' and `terminal_output'. * util/grub.d/00_header.in: Adjust `terminal' calls to new `terminal_input' / `terminal_output' API. * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user provided ${GRUB_TERMINAL}, convert it).
2008-11-07 19:11:39 +00:00
static struct grub_term_output grub_video_term =
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
{
.name = "gfxterm",
.init = grub_gfxterm_init,
.fini = grub_gfxterm_fini,
.putchar = grub_gfxterm_putchar,
.getcharwidth = grub_gfxterm_getcharwidth,
.getwh = grub_virtual_screen_getwh,
.getxy = grub_virtual_screen_getxy,
.gotoxy = grub_gfxterm_gotoxy,
.cls = grub_gfxterm_cls,
.setcolorstate = grub_virtual_screen_setcolorstate,
2008-01-01 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/video.h: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_adapter): Added unmap_color and get_active_render_target. * video/video.c: Added grub_video_unmap_color and grub_video_get_active_render_target. (grub_video_get_info): Changed method to accept NULL pointer as an argument to allow detection of active video adapter. * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as grub_video_vbe_unmap_color_int. Added grub_video_vbe_unmap_color and grub_video_vbe_get_active_render_target. (grub_video_vbe_adapter): Added unmap_color and get_active_render_target. * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage with grub_video_vbe_unmap_color_int. * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added. (DEFAULT_NORMAL_COLOR): Likewise. (DEFAULT_HIGHLIGHT_COLOR) Likewise. (DEFAULT_FG_COLOR): Removed. (DEFAULT_BG_COLOR): Likewise. (DEFAULT_CURSOR_COLOR): Changed value. (grub_virtual_screen): Added standard_color_setting, normal_color_setting, highlight_color_setting and term_color. (grub_virtual_screen): Removed fg_color_setting and bg_color_setting. (bitmap_width): Added. (bitmap_height): Likewise. (bitmap): Likewise. (set_term_color): Likewise. (grub_virtual_screen_setup): Changed to use new terminal coloring settings. (grub_gfxterm_init): Added init for bitmap. (grub_gfxterm_fini): Added destroy for bitmap. (redraw_screen_rect): Updated to use background bitmap and new terminal coloring. (scroll_up): Added optimization for case when there is no bitmap. (grub_gfxterm_cls): Fixed to use correct background color. (grub_virtual_screen_setcolorstate): Changed to use new terminal coloring. (grub_virtual_screen_setcolor): Likewise. (grub_virtual_screen_getcolor): Added. (grub_gfxterm_background_image_cmd): Likewise. (grub_video_term): Added setcolor and getcolor. (MOD_INIT): Added registration of background_image command. (MOD_TERM): Added unregistration for background_image command.
2008-01-01 12:02:07 +00:00
.setcolor = grub_virtual_screen_setcolor,
.getcolor = grub_virtual_screen_getcolor,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
.setcursor = grub_gfxterm_setcursor,
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi> * include/grub/bitmap.h: New file. * include/grub/i386/pc/vbeutil.h: Likewise. * video/bitmap.c: Likewise. * video/readers/tga.c: Likewise. * video/i386/pc/vbeutil.c: Likewise. * commands/videotest.c: Code cleanup and updated to reflect to new video API. * term/gfxterm.c: Likewise. * video/video.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod. (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c. (bitmap_mod_SOURCES): New entry. (bitmap_mod_CFLAGS): Likewise. (bitmap_mod_LDFLAGS): Likewise. (tga_mod_SOURCES): Likewise. (tga_mod_CFLAGS): Likewise. (tga_mod_LDFLAGS): Likewise. * include/grub/video.h (grub_video_blit_operators): New enum type. (grub_video_render_target): Changed as forward declaration and moved actual definition to be video driver specific. (grub_video_adapter.blit_bitmap): Added blitting operator. (grub_video_adapter.blit_render_target): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. * include/grub/i386/pc/vbe.h (grub_video_render_target): Added driver specific render target definition. (grub_video_vbe_map_rgba): Added driver internal helper. (grub_video_vbe_unmap_color): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_get_video_ptr): Likewise. * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise. (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise. (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8): Likewise. (grub_video_i386_vbeblit_index_index): Likewise. (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function. (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise. (grub_video_i386_vbeblit_blend): Added generic blitter for blend operator. (grub_video_i386_vbeblit_replace): Added generic blitter for replace operator. * video/i386/pc/vbeblit.c: Updated to reflect changes on include/grub/i386/pc/vbeblit.h. * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8): Updated to use grub_video_i386_vbeblit_info. (grub_video_i386_vbefill_R8G8B8): Likewise. (grub_video_i386_vbefill_index): Likewise. (grub_video_i386_vbefill): Added generic filler. * video/i386/pc/vbefill.c: Updated to reflect changes on include/grub/i386/pc/vbefill.h. * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use grub_video_i386_vbeblit_info. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_draw_pixel): Removed function. (grub_video_vbe_get_pixel): Likewise. (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and updated code to use it. (common_blitter): Added common blitter for render target and bitmap. (grub_video_vbe_blit_bitmap): Updated to use common_blitter. (grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
.refresh = grub_gfxterm_refresh,
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
.flags = 0,
.next = 0
};
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
static grub_command_t cmd;
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
GRUB_MOD_INIT(term_gfxterm)
{
2009-04-14 18:12:14 +00:00
grub_term_register_output ("gfxterm", &grub_video_term);
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
cmd = grub_register_command ("background_image",
grub_gfxterm_background_image_cmd,
0, "Load background image for active terminal");
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}
GRUB_MOD_FINI(term_gfxterm)
{
2009-03-21 Bean <bean123ch@gmail.com> * commands/blocklist.c: Add include file <grub/command.h>, remove <grub/normal.h> and <grub/arg.h>. (grub_cmd_blocklist): Use the new command interface. (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/echo.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/help.c: Likewise. * commands/hexdump.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/loadenv.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/play.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * disk/loopback.c: Likewise. * font/font_cmd.c: Likewise. * hello/hello.c: Likewise. * loader/efi/appleloader.c: Likewise. * loader/efi/chainloader.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/terminfo.c: Likewise. * term/i386/pc/vesafb.c: Removed <grub/arg.h>. * term/i386/pc/vga.c: Likewise. * video/readers/jpeg.c: Likewise. * video/readers/png.c: Likewise. * video/readers/tga.c: Likewise. * util/grub-fstest (cmd_loopback): Removed. (cmd_blocklist): Likewise. (cmd_ls): Likewise. (grub_register_command): Likewise. (grub_unregister_command): Likewise. (execute_command): Use grub_command_find to locate command and execute it. * include/grub/efi/chainloader.h: Removed. * loader/efi/chainloader_normal.c: Likewise. * loader/i386/bsd_normal.c: Likewise. * loader/i386/pc/chainloader_normal.c: Likewise. * loader/i386/pc/multiboot_normal.c: Likewise. * loader/linux_normal.c: Likewise. * loader/multiboot_loader_normal.c: Likewise. * loader/powerpc/ieee1275/linux_normal.c: Likewise. * gencmdlist.sh: Scan new registration command grub_register_extcmd and grub_register_command_p1. * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c, kern/command.c, lib/arg.c and commands/extcmd.c. (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod. (minicmd_mod_SOURCES): New variable. (minicmd_mod_CFLAGS): Likewise. (minicmd_mod_LDFLAGS): Likewise. (extcmd_mod_SOURCES): Likewise. (extcmd_mod_CFLAGS): Likewise. (extcmd_mod_LDFLAGS): Likewise. (boot_mod_SOURCES): Removed. (boot_mod_CFLAGS): Likewise. (boot_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and kern/corecmd.c. (kernel_img_HEADERS): Add command.h. (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c and lib/arg.c. (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod, remove the corresponding normal mode command. (normal_mod_SOURCES): Remove normal/arg.c. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * include/grub/arg.h: Move from here ... * include/grub/lib/arg.h: ... to here. * normal/arg.c: Move from here ... * lib/arg.c: ... to here. * commands/extcmd.c: New file. * commands/minicmd.c: Likewise. * include/grub/command.h: Likewise. * include/grub/extcmd.h: Likewise. * kern/command.c: Likewise. * kern/corecmd.c: Likewise. * kern/list.c (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (grub_prio_list_insert): Likewise. * kern/rescue.c (grub_rescue_command): Removed. (grub_rescue_command_list): Likewise. (grub_rescue_register_command): Likewise. (grub_rescue_unregister_command): Likewise. (grub_rescue_cmd_boot): Move to minicmd.c (grub_rescue_cmd_help): Likewise. (grub_rescue_cmd_info): Likewise. (grub_rescue_cmd_boot): Likewise. (grub_rescue_cmd_testload): Likewise. (grub_rescue_cmd_dump): Likewise. (grub_rescue_cmd_rmmod): Likewise. (grub_rescue_cmd_lsmod): Likewise. (grub_rescue_cmd_exit): Likewise. (grub_rescue_print_devices): Moved to corecmd.c. (grub_rescue_print_files): Likewise. (grub_rescue_cmd_ls): Likewise. (grub_rescue_cmd_insmod): Likewise. (grub_rescue_cmd_set): Likewise. (grub_rescue_cmd_unset): Likewise. (attemp_normal_mode): Use grub_command_find to get normal module. (grub_enter_rescue_mode): Use grub_register_core_commands to register commands, remove grub_rescue_regiter_command calls. * normal/command.c (grub_regiser_command): Removed. (grub_unregister_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (rescue_command): Likewise. (export_command): Moved to corecmd.c. (set_command): Removed. (unset_command): Likewise. (insmod_command): Likewise. (rmmod_command): Likewise. (lsmod_command): Likewise. (grub_command_init): Likewise. * normal/completion.c (iterate_command): Use cmd->prio to check for active command. (complete_arguments): Use grub_extcmd_t structure to find options. (grub_normal_do_completion): Change function grub_iterate_commands to grub_command_iterate. * normal/execute.c (grub_script_execute_cmd): No need to parse argument here. * normal/main.c (grub_dyncmd_dispatcher): New function. (read_command_list): Register unload commands as dyncmd. (grub_cmd_normal): Use new command interface, register rescue, unregister normal at entry, register normal, unregister rescue at exit. * include/grub/list.h (grub_list_test_t): New type. (grub_list_iterate): Return int instead of void. (grub_list_insert): New function. (GRUB_AS_NAMED_LIST_P): New macro. (GRUB_AS_PRIO_LIST): Likewise. (GRUB_AS_PRIO_LIST_P): Likewise. (GRUB_PRIO_LIST_PRIO_MASK): New constant. (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise. (grub_prio_list): New structure. (grub_prio_list_insert): New function. (grub_prio_list_remove): New inline function. * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>. (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h. (GRUB_COMMAND_FLAG_MENU): Likewise. (GRUB_COMMAND_FLAG_BOTH): Likewise. (GRUB_COMMAND_FLAG_TITLE): Likewise. (GRUB_COMMAND_FLAG_NO_ECHO): Likewise. (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed. (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise. (grub_command): Likewise. (grub_register_command): Likewise. (grub_command_find): Likewise. (grub_iterate_commands): Likewise. (grub_command_init): Likewise. (grub_arg_parse): Likewise. (grub_arg_show_help): Likewise. * include/grub/rescue.h (grub_rescue_register_command): Removed. (grub_rescue_unregister_command): Likewise. * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd, grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd, grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module. * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and grub_rescue_cmd_initrd. * include/grub/i386/loader.h: Likewise. * include/grub/x86_64/loader.h: Likewise. * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
grub_unregister_command (cmd);
2008-11-07 Robert Millan <rmh@aybabtu.com> Modularize at_keyboard.mod: * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'. (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS) (at_keyboard_mod_LDFLAGS): New variables. Actual terminal split: * include/grub/term.h (struct grub_term): Split in ... (struct grub_term_input): ... this, and ... (struct grub_term_output): ... this. Update all users. (grub_term_set_current): Split in ... (grub_term_set_current_input): ... this, and ... (grub_term_set_current_output): ... this. (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. (grub_term_register): Split in ... (grub_term_register_input): ... this, and ... (grub_term_register_output): ... this. (grub_term_unregister): Split in ... (grub_term_unregister_input): ... this, and ... (grub_term_unregister_output): ... this. (grub_term_iterate): Split in ... (grub_term_iterate_input): ... this, and ... (grub_term_iterate_output): ... this. * kern/term.c (grub_term_list): Split in ... (grub_term_list_input): ... this, and ... (grub_term_list_output): ... this. Update all users. (grub_cur_term): Split in ... (grub_cur_term_input): ... this, and ... (grub_cur_term_output): ... this. Update all users. (grub_term_set_current): Split in ... (grub_term_set_current_input): ... this, and ... (grub_term_set_current_output): ... this. (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. (grub_term_register): Split in ... (grub_term_register_input): ... this, and ... (grub_term_register_output): ... this. (grub_term_unregister): Split in ... (grub_term_unregister_input): ... this, and ... (grub_term_unregister_output): ... this. (grub_term_iterate): Split in ... (grub_term_iterate_input): ... this, and ... (grub_term_iterate_output): ... this. * kern/misc.c (grub_abort): Split use of grub_term_get_current() into a check for input and one for output (and only attempt to get keys from user when input works). * util/grub-probe.c (grub_term_get_current): Split in ... (grub_term_get_current_input): ... this, and ... (grub_term_get_current_output): ... this. * util/grub-fstest.c: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/grub-editenv.c: Likewise. Portability adjustments: * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove `term/i386/pc/at_keyboard.c'. * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to grub_keyboard_controller_init() (now handled by terminal .init). * kern/i386/coreboot/init.c (grub_machine_init): Add call to grub_at_keyboard_init(). * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init) (grub_console_checkkey, grub_console_getkey): Remove (now provided by at_keyboard.mod via input terminal interface). * include/grub/i386/coreboot/console.h: Convert into a stub for `<grub/i386/pc/console.h>'. Migrate full terminals to new API: * term/efi/console.c (grub_console_term): Split into ... (grub_console_term_input): ... this, and ... (grub_console_term_output): ... this. Update all users. * term/ieee1275/ofconsole.c: Remove __i386__ hack. (grub_ofconsole_init): Split into ... (grub_ofconsole_init_input): ... this, and ... (grub_ofconsole_init_output): ... this. (grub_ofconsole_term): Split into ... (grub_ofconsole_term_input): ... this, and ... (grub_ofconsole_term_output): ... this. Update all users. * term/i386/pc/serial.c (grub_serial_term): Split into ... (grub_serial_term_input): ... this, and ... (grub_serial_term_output): ... this. Update all users. * term/i386/pc/console.c (grub_console_term): Split into ... (grub_console_term_input): ... this, and ... (grub_console_term_output): ... this. Update all users. (grub_console_term_input): Only enable it on PC/BIOS platform. (grub_console_init): Remove grub_keyboard_controller_init() call. Migrate input terminals to new API: * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with `i386' and `i386/pc' to enable build on x86_64 (this driver is i386-specific anyway). (grub_console_checkkey): Rename to ... (grub_at_keyboard_checkkey): ... this. Static-ize. Update all users. (grub_keyboard_controller_orig): New variable. (grub_console_getkey): Rename to ... (grub_at_keyboard_getkey): ... this. Static-ize. Update all users. (grub_keyboard_controller_init): Static-ize. Save original controller value so that it can be restored ... (grub_keyboard_controller_fini): ... here (new function). (grub_at_keyboard_term): New structure. (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New functions. Migrate output terminals to new API: * term/i386/pc/vga.c (grub_vga_term): Change type to `struct grub_term_output'. Remove `.checkkey' and `.getkey' members. Update all users. * term/gfxterm.c (grub_video_term): Change type to `struct grub_term_output'. Remove `.checkkey' and `.getkey' members. Update all users. * include/grub/i386/pc/console.h (grub_console_checkkey) (grub_console_getkey): Do not export (no longer needed by gfxterm, etc). Migrate `terminal' command and userland tools to new API: * commands/terminal.c (grub_cmd_terminal): Split into ... (grub_cmd_terminal_input): ... this, and ... (grub_cmd_terminal_output): ... this. (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands: `terminal_input' and `terminal_output'. * util/grub.d/00_header.in: Adjust `terminal' calls to new `terminal_input' / `terminal_output' API. * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user provided ${GRUB_TERMINAL}, convert it).
2008-11-07 19:11:39 +00:00
grub_term_unregister_output (&grub_video_term);
2006-03-14 Vesa Jaaskelainen <chaac@nic.fi> * DISTLIST: Added include/grub/video.h, term/gfxterm.c, video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c. * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod, gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod. (video_mod_SOURCES): Added. (video_mod_CFLAGS): Likewise. (video_mod_LDFLAGS): Likewise. (gfxterm_mod_SOURCES): Likewise. (gfxterm_mod_CFLAGS): Likewise. (gfxterm_mod_LDFLAGS): Likewise. (videotest_mod_SOURCES): Likewise. (videotest_mod_CFLAGS): Likewise. (videotest_mod_LDFLAGS): Likewise. (vesafb_mod_SOURCES): Removed. (vesafb_mod_CFLAGS): Likewise. (vesafb_mod_LDFLAGS): Likewise. (vga_mod_SOURCES): Likewise. (vga_mod_CFLAGS): Likewise. (vga_mod_LDFLAGS): Likewise. * commands/videotest.c: New file. * font/manager.c (fill_with_default_glyph): Modified to use grub_font_glyph. (grub_font_get_glyph): Likewise. (fontmanager): Renamed from this... (font_manager): ... to this. * include/grub/font.h (grub_font_glyph): Added new structure. (grub_font_get_glyph): Modified to use grub_font_glyph. * include/grub/misc.h (grub_abs): Added as inline function. * include/grub/video.h: New file. * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro. (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise. (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise. (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_set_pixel_rgb): Removed. (grub_vbe_set_pixel_index): Likewise. * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed from this... (grub_vbe_bios_get_controller_info): ... to this. (grub_vbe_get_mode_info): Renamed from this... (grub_vbe_bios_get_mode_info): ... to this. (grub_vbe_set_mode): Renamed from this... (grub_vbe_bios_set_mode): ... to this. (grub_vbe_get_mode): Renamed from this... (grub_vbe_bios_get_mode): ... to this. (grub_vbe_set_memory_window): Renamed from this... (grub_vbe_bios_set_memory_window): ... to this. (grub_vbe_get_memory_window): Renamed from this... (grub_vbe_bios_get_memory_window): ... to this. (grub_vbe_set_scanline_length): Renamed from this... (grub_vbe_set_scanline_length): ... to this. (grub_vbe_get_scanline_length): Renamed from this... (grub_vbe_bios_get_scanline_length): ... to this. (grub_vbe_set_display_start): Renamed from this... (grub_vbe_bios_set_display_start): ... to this. (grub_vbe_get_display_start): Renamed from this... (grub_vbe_bios_get_display_start): ... to this. (grub_vbe_set_palette_data): Renamed from this... (grub_vbe_bios_set_palette_data): ... to this. (grub_vbe_bios_get_controller_info): Fixed problem with registers getting corrupted after calling it. Added more pushes and pops. (grub_vbe_bios_set_mode): Likewise. (grub_vbe_bios_get_mode): Likewise. (grub_vbe_bios_get_memory_window): Likewise. (grub_vbe_bios_set_scanline_length): Likewise. (grub_vbe_bios_get_scanline_length): Likewise. (grub_vbe_bios_get_display_start): Likewise. (grub_vbe_bios_set_palette_data): Likewise. * normal/cmdline.c (cl_set_pos): Refresh the screen. (cl_insert): Likewise. (cl_delete): Likewise. * term/gfxterm.c: New file. * term/i386/pc/vesafb.c: Removed file. * video/video.c: New file. * video/i386/pc/vbe.c (real2pm): Added new function. (grub_video_vbe_draw_pixel): Likewise. (grub_video_vbe_get_video_ptr): Likewise. (grub_video_vbe_get_pixel): Likewise (grub_video_vbe_init): Likewise. (grub_video_vbe_fini): Likewise. (grub_video_vbe_setup): Likewise. (grub_video_vbe_get_info): Likewise. (grub_video_vbe_set_palette): Likewise. (grub_video_vbe_get_palette): Likewise. (grub_video_vbe_set_viewport): Likewise. (grub_video_vbe_get_viewport): Likewise. (grub_video_vbe_map_color): Likewise. (grub_video_vbe_map_rgb): Likewise. (grub_video_vbe_map_rgba): Likewise. (grub_video_vbe_unmap_color): Likewise. (grub_video_vbe_fill_rect): Likewise. (grub_video_vbe_blit_glyph): Likewise. (grub_video_vbe_blit_bitmap): Likewise. (grub_video_vbe_blit_render_target): Likewise. (grub_video_vbe_scroll): Likewise. (grub_video_vbe_swap_buffers): Likewise. (grub_video_vbe_create_render_target): Likewise. (grub_video_vbe_delete_render_target): Likewise. (grub_video_vbe_set_active_render_target): Likewise. (grub_vbe_set_pixel_rgb): Remove function. (grub_vbe_set_pixel_index): Likewise. (index_color_mode): Remove static variable. (active_mode): Likewise. (framebuffer): Likewise. (bytes_per_scan_line): Likewise. (grub_video_vbe_adapter): Added new static variable. (framebuffer): Likewise. (render_target): Likewise. (initial_mode): Likewise. (mode_in_use): Likewise. (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
}