/* view.c - Graphical menu interface MVC view. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/bitmap_scale.h>
#include <grub/gfxwidgets.h>
#include <grub/menu_viewer.h>
#include <grub/gfxmenu_view.h>
#include <grub/gui_string_util.h>
#include <grub/icon_manager.h>
static void
/* Create a new view object, loading the theme specified by THEME_PATH and
associating MODEL with the view. */
{
if (! view)
return 0;
default_fg_color = grub_video_rgba_color_rgb (0, 0, 0);
view->desktop_image = 0;
view->progress_message_text = 0;
view->theme_path = 0;
/* Set the timeout bar's frame. */
{
return 0;
}
return view;
}
/* Destroy the view object. All used memory is freed. */
void
{
if (!view)
return;
if (view->terminal_box)
}
static void
const grub_video_rect_t *bounds)
{
if (view->desktop_image)
{
}
else
{
}
}
static void
{
if (! view->title_text)
return;
/* Center the title. */
view->title_text);
x, y);
}
struct progress_value_data
{
int visible;
int start;
int end;
int value;
};
static void
{
}
static void
{
{
}
}
void
{
if (view->double_repaint)
}
void
{
update_timeouts (0, 1, 0, 0);
if (view->double_repaint)
}
static void
void *userdata)
{
{
}
}
/* Update any boot menu components with the current menu model and
theme path. */
static void
{
}
static void
{
if (! text)
return;
/* Border. */
/* Fill. */
/* Center the text. */
}
void
const grub_video_rect_t *region)
{
draw_title (view);
draw_message (view);
}
void
{
/* Clear the screen; there may be garbage left over in video memory. */
grub_video_fill_rect (grub_video_map_rgb (0, 0, 0),
if (view->double_repaint)
grub_video_fill_rect (grub_video_map_rgb (0, 0, 0),
if (view->double_repaint)
}
static void
void *userdata)
{
{
}
}
void
{
if (view->double_repaint)
{
}
}
void
{
}
static void
{
if (!term_box)
return;
}
static void
{
/* Note: currently there is no API for changing the gfxterm font
on the fly, so whatever font the initially loaded theme specifies
will be permanent. */
term_rect.y,
}
/* FIXME: previously notifications were displayed in special case.
Is it necessary?
*/
#if 0
/* Sets MESSAGE as the progress message for the view.
MESSAGE can be 0, in which case no message is displayed. */
static void
{
if (message)
else
view->progress_message_text = 0;
}
static void
{
if (!s)
return;
set_progress_message (view, s);
grub_free (s);
if (view->double_repaint)
}
static void
{
if (!s)
return;
set_progress_message (view, s);
grub_free (s);
if (view->double_repaint)
}
static void
{
}
static struct grub_menu_execute_callback execute_callback =
{
};
#endif