* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003, 2004, 2006, 2010 Develer S.r.l. (http://www.develer.com/)
* Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
*
* -->
*
- * \version $Id$
- *
* \author Bernie Innocenti <bernie@codewiz.org>
* \author Stefano Fedrigo <aleph@develer.com>
*
#include "menu.h"
-#include "cfg/cfg_gfx.h"
+#include "cfg/cfg_menu.h"
+#include "cfg/cfg_arch.h"
+
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <gfx/font.h>
#include <gfx/text.h>
+#include <cpu/power.h>
+
#include <drv/kbd.h>
#include <string.h> /* strcpy() */
#include <avr/pgmspace.h> /* strncpy_P() */
#endif
-#if CONFIG_MENU_SMOOTH
-#include <drv/lcd_gfx.h>
-#endif
-
#if (CONFIG_MENU_TIMEOUT != 0)
#include <drv/timer.h>
#endif
ypos = bm->cr.ymin;
-#if 1
if (redraw)
{
/* Clear screen */
text_clear(menu->bitmap);
}
-#endif
if (title)
{
/* Only print visible items */
if (!(item->flags & MIF_HIDDEN))
{
- /* Check if a special render function is supplied, otherwise use defaults */
+ #warning __FILTER_NEXT_WARNING__
RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook;
/* Render menuitem */
/* Clear rest of area */
gfx_rectClear(bm, bm->cr.xmin, ypos, bm->cr.xmax, bm->cr.ymax);
- lcd_blitBitmap(&lcd_bitmap);
+ menu->lcd_blitBitmap(bm);
}
/* Restore old cliprect */
items_per_page =
- (menu->bitmap->height / menu->bitmap->font->height)
+ (menu->bitmap->height / menu->bitmap->font->height - 1)
#if CONFIG_MENU_MENUBAR
- 1 /* menu bar labels */
#endif
#if CONFIG_MENU_SMOOTH || (CONFIG_MENU_TIMEOUT != 0)
key = kbd_peek();
+ cpu_relax();
#else
key = kbd_get();
#endif
/* Store currently selected item before leaving. */
if (menu->flags & MF_SAVESEL)
+ #warning __FILTER_NEXT_WARNING__
CONST_CAST(struct Menu *, menu)->selected = selected;
return result;