* grub-core/gfxmenu/gui_box.c: Updated to work with area status.

* grub-core/gfxmenu/gui_canvas.c: Likewise.
        * grub-core/gfxmenu/view.c: Likewise.
        * grub-core/video/fb/video_fb.c: Introduce new functions:
        grub_video_set_area_status, grub_video_get_area_status,
        grub_video_set_region, grub_video_get_region.
        * grub-core/video/bochs.c: Likewise.
        * grub-core/video/capture.c: Likewise.
        * grub-core/video/video.c: Likewise.
        * grub-core/video/cirrus.c: Likewise.
        * grub-core/video/efi_gop.c: Likewise.
        * grub-core/video/efi_uga.c: Likewise.
        * grub-core/video/emu/sdl.c: Likewise.
        * grub-core/video/radeon_fuloong2e.c: Likewise.
        * grub-core/video/sis315pro.c: Likewise.
        * grub-core/video/sm712.c: Likewise.
        * grub-core/video/i386/pc/vbe.c: Likewise.
        * grub-core/video/i386/pc/vga.c: Likewise.
        * grub-core/video/ieee1275.c: Likewise.
        * grub-core/video/i386/coreboot/cbfb.c: Likewise.
        * include/grub/video.h: Likewise.
        * include/grub/video_fb.h: Likewise.
        * include/grub/fbfill.h: Updated render_target structure.
        grub_video_rect_t viewport, region, area
        int area_offset_x, area_offset_y, area_enabled
        * include/grub/gui.h: New helper function
        grub_video_bounds_inside_region.
        * docs/grub-dev.texi: Added information about new functions.
This commit is contained in:
Vladimir Testov 2013-11-08 15:42:38 +04:00
parent c6b755df45
commit 4db2250000
24 changed files with 536 additions and 34 deletions

View file

@ -1113,6 +1113,47 @@ struct grub_video_palette_data
Used to query indexed color palettes. If mode is RGB mode, colors will be copied from emulated palette data. In Indexed Color modes, palettes will be read from hardware. Color values will be converted to suit structure format. @code{start} will tell what hardware color index (or emulated color index) will be used as a source for first indice of @code{palette_data}, after that both hardware color index and @code{palette_data} index will be incremented until @code{count} number of colors have been read.
@end itemize
@subsection grub_video_set_area_status
@itemize
@item Prototype:
@example
grub_err_t
grub_video_set_area_status (grub_video_area_status_t area_status);
@end example
@example
enum grub_video_area_status_t
@{
GRUB_VIDEO_AREA_DISABLED,
GRUB_VIDEO_AREA_ENABLED
@};
@end example
@item Description:
Used to set area drawing mode for redrawing the specified region. Draw commands
are performed in the intersection of the viewport and the region called area.
Coordinates remain related to the viewport. If draw commands try to draw over
the area, they are clipped.
Set status to DISABLED if you need to draw everything.
Set status to ENABLED and region to the desired rectangle to redraw everything
inside the region leaving everything else intact.
Should be used for redrawing of active elements.
@end itemize
@subsection grub_video_get_area_status
@itemize
@item Prototype:
@example
grub_err_r
grub_video_get_area_status (grub_video_area_status_t *area_status);
@end example
@item Description:
Used to query the area status.
@end itemize
@subsection grub_video_set_viewport
@itemize
@item Prototype:
@ -1139,6 +1180,37 @@ grub_video_get_viewport (unsigned int *x, unsigned int *y, unsigned int *width,
Used to query current viewport dimensions. Software developer can use this to choose best way to render contents of the viewport.
@end itemize
@subsection grub_video_set_region
@itemize
@item Prototype:
@example
grub_err_t
grub_video_set_region (unsigned int x, unsigned int y, unsigned int width, unsigned int height);
@end example
@item Description:
Used to specify the region of the screen which should be redrawn. Use absolute
values. When the region is set and area status is ENABLE all draw commands will
be performed inside the interseption of region and viewport named area.
If draw commands try to draw over viewport, they are clipped. If developer
requests larger than possible region, width and height will be clamped to fit
screen. Should be used for redrawing of active elements.
@end itemize
@subsection grub_video_get_region
@itemize
@item Prototype:
@example
grub_err_t
grub_video_get_region (unsigned int *x, unsigned int *y, unsigned int *width, unsigned int *height);
@end example
@item Description:
Used to query current region dimensions.
@end itemize
@subsection grub_video_map_color
@itemize
@item Prototype: