* 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:
parent
c6b755df45
commit
4db2250000
24 changed files with 536 additions and 34 deletions
|
@ -80,9 +80,13 @@ static void
|
|||
canvas_paint (void *vself, const grub_video_rect_t *region)
|
||||
{
|
||||
grub_gui_canvas_t self = vself;
|
||||
|
||||
struct component_node *cur;
|
||||
grub_video_rect_t vpsave;
|
||||
|
||||
grub_video_area_status_t canvas_area_status;
|
||||
grub_video_get_area_status (&canvas_area_status);
|
||||
|
||||
grub_gui_set_viewport (&self->bounds, &vpsave);
|
||||
for (cur = self->components.next; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -135,9 +139,16 @@ canvas_paint (void *vself, const grub_video_rect_t *region)
|
|||
r.height = h;
|
||||
comp->ops->set_bounds (comp, &r);
|
||||
|
||||
if (!grub_video_have_common_points (region, &r))
|
||||
continue;
|
||||
|
||||
/* Paint the child. */
|
||||
if (grub_video_have_common_points (region, &r))
|
||||
comp->ops->paint (comp, region);
|
||||
if (canvas_area_status == GRUB_VIDEO_AREA_ENABLED
|
||||
&& grub_video_bounds_inside_region (&r, region))
|
||||
grub_video_set_area_status (GRUB_VIDEO_AREA_DISABLED);
|
||||
comp->ops->paint (comp, region);
|
||||
if (canvas_area_status == GRUB_VIDEO_AREA_ENABLED)
|
||||
grub_video_set_area_status (GRUB_VIDEO_AREA_ENABLED);
|
||||
}
|
||||
grub_gui_restore_viewport (&vpsave);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue