2N/A/* gfxmenu_view.h - gfxmenu view interface. */
2N/A/*
2N/A * GRUB -- GRand Unified Bootloader
2N/A * Copyright (C) 2008,2009 Free Software Foundation, Inc.
2N/A *
2N/A * GRUB is free software: you can redistribute it and/or modify
2N/A * it under the terms of the GNU General Public License as published by
2N/A * the Free Software Foundation, either version 3 of the License, or
2N/A * (at your option) any later version.
2N/A *
2N/A * GRUB is distributed in the hope that it will be useful,
2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2N/A * GNU General Public License for more details.
2N/A *
2N/A * You should have received a copy of the GNU General Public License
2N/A * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
2N/A */
2N/A
2N/A#ifndef GRUB_GFXMENU_VIEW_HEADER
2N/A#define GRUB_GFXMENU_VIEW_HEADER 1
2N/A
2N/A#include <grub/types.h>
2N/A#include <grub/err.h>
2N/A#include <grub/menu.h>
2N/A#include <grub/font.h>
2N/A#include <grub/gfxwidgets.h>
2N/A
2N/Astruct grub_gfxmenu_view; /* Forward declaration of opaque type. */
2N/Atypedef struct grub_gfxmenu_view *grub_gfxmenu_view_t;
2N/A
2N/A
2N/Agrub_gfxmenu_view_t grub_gfxmenu_view_new (const char *theme_path,
2N/A int width, int height);
2N/A
2N/Avoid grub_gfxmenu_view_destroy (grub_gfxmenu_view_t view);
2N/A
2N/A/* Set properties on the view based on settings from the specified
2N/A theme file. */
2N/Agrub_err_t grub_gfxmenu_view_load_theme (grub_gfxmenu_view_t view,
2N/A const char *theme_path);
2N/A
2N/Agrub_err_t grub_gui_recreate_box (grub_gfxmenu_box_t *boxptr,
2N/A const char *pattern, const char *theme_dir);
2N/A
2N/Avoid grub_gfxmenu_view_draw (grub_gfxmenu_view_t view);
2N/A
2N/Avoid
2N/Agrub_gfxmenu_redraw_menu (grub_gfxmenu_view_t view);
2N/A
2N/Avoid
2N/Agrub_gfxmenu_redraw_timeout (grub_gfxmenu_view_t view);
2N/A
2N/Avoid
2N/Agrub_gfxmenu_view_redraw (grub_gfxmenu_view_t view,
2N/A const grub_video_rect_t *region);
2N/A
2N/Avoid
2N/Agrub_gfxmenu_clear_timeout (void *data);
2N/Avoid
2N/Agrub_gfxmenu_print_timeout (int timeout, void *data);
2N/Avoid
2N/Agrub_gfxmenu_set_chosen_entry (int entry, void *data);
2N/A
2N/Agrub_err_t grub_font_draw_string (const char *str,
2N/A grub_font_t font,
2N/A grub_video_color_t color,
2N/A int left_x, int baseline_y);
2N/Aint grub_font_get_string_width (grub_font_t font,
2N/A const char *str);
2N/A
2N/A
2N/A/* Implementation details -- this should not be used outside of the
2N/A view itself. */
2N/A
2N/A#include <grub/video.h>
2N/A#include <grub/bitmap.h>
2N/A#include <grub/gui.h>
2N/A#include <grub/gfxwidgets.h>
2N/A#include <grub/icon_manager.h>
2N/A
2N/A/* Definition of the private representation of the view. */
2N/Astruct grub_gfxmenu_view
2N/A{
2N/A grub_video_rect_t screen;
2N/A
2N/A grub_font_t title_font;
2N/A grub_font_t message_font;
2N/A char *terminal_font_name;
2N/A grub_video_rgba_color_t title_color;
2N/A grub_video_rgba_color_t message_color;
2N/A grub_video_rgba_color_t message_bg_color;
2N/A struct grub_video_bitmap *desktop_image;
2N/A grub_video_rgba_color_t desktop_color;
2N/A grub_gfxmenu_box_t terminal_box;
2N/A char *title_text;
2N/A char *progress_message_text;
2N/A char *theme_path;
2N/A
2N/A grub_gui_container_t canvas;
2N/A
2N/A int double_repaint;
2N/A
2N/A int selected;
2N/A
2N/A grub_video_rect_t progress_message_frame;
2N/A
2N/A grub_menu_t menu;
2N/A
2N/A int nested;
2N/A
2N/A int first_timeout;
2N/A};
2N/A
2N/A#endif /* ! GRUB_GFXMENU_VIEW_HEADER */