*
* \brief Configuration file for GFX module.
*
- * \version $Id$
- *
* \author Daniele Basile <asterix@develer.com>
*/
#ifndef CFG_GFX_H
#define CFG_GFX_H
-/// Enable line clipping algorithm.
+/**
+ * Enable line clipping algorithm.
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_GFX_CLIPPING 1
-/// Enable text rendering in bitmaps.
+/**
+ * Enable text rendering in bitmaps.
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_GFX_TEXT 1
-/// Enable virtual coordinate system.
+/**
+ * Enable virtual coordinate system.
+ * $WIZ$ type = "boolean"
+ */
#define CONFIG_GFX_VCOORDS 1
-/// Select bitmap pixel format.
-#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB
-
/**
- * \name Type for the chart dataset
- * \{
+ * Select bitmap pixel format.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "bitmap_format"
*/
-#define CONFIG_CHART_TYPE_X uint8_t
-#define CONFIG_CHART_TYPE_Y uint8_t
-/*\}*/
-
-
-/// Enable button bar behind menus
-#define CONFIG_MENU_MENUBAR 0
-#define CONFIG_LEVELEDIT_TIMEOUT 0
-#define CONFIG_MENU_TIMEOUT 0
-
-/// Enable smooth scrolling in menus
-#define CONFIG_MENU_SMOOTH 0
-
+#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB
#endif /* CFG_GFX_H */
--- /dev/null
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction. Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License. This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for Menu module.
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_MENU_H
+#define CFG_MENU_H
+
+/**
+ * Enable button bar behind menus
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_MENU_MENUBAR 0
+
+/**
+ * Level Edit Timeout
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_LEVELEDIT_TIMEOUT 0
+
+/**
+ * Menu timeout
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_MENU_TIMEOUT 0
+
+/**
+ * Enable smooth scrolling in menus
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_MENU_SMOOTH 1
+
+
+#endif /* CFG_MENU_H */
+
#include <drv/timer.h>
#include <drv/buzzer.h>
-#include <drv/lcd_gfx.h>
#include <drv/kbd.h>
+#include <drv/lcd_gfx_qt.h>
#include <gfx/gfx.h>
#include <gfx/win.h>
#include <gui/menu.h>
#include <icons/logo.h>
+/** Default LCD bitmap */
+static Bitmap lcd_bitmap;
+
/**
* Refresh the GUI.
*/
void schedule(void)
{
- lcd_blitBitmap(&lcd_bitmap);
+ lcd_gfx_qt_blitBitmap(&lcd_bitmap);
emul_idle();
}
if (y >= bm->height) ydir = -1;
if (y <= -50) ydir = +1;
- /* Large window animation */
bm = large_win.bitmap;
gfx_bitmapClear(bm);
for (i = 0; i < bm->height / 2; i += 2)
{ (const_iptr_t)"Power Saving", MIF_TOGGLE, (MenuHook)0, (iptr_t)0 },
{ (const_iptr_t)0, 0, NULL, (iptr_t)0 }
};
-static struct Menu settings_menu = { settings_items, "Settings Menu", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0 };
+static struct Menu settings_menu = { settings_items, "Settings Menu", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0, lcd_gfx_qt_blitBitmap };
/* MX SUBMENU */
{ (const_iptr_t)0, 0, NULL, (iptr_t)0 }
};
-static struct Menu mx_menu = { mx_items, (const_iptr_t)0, MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0 };
+static struct Menu mx_menu = { mx_items, (const_iptr_t)0, MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0, lcd_gfx_qt_blitBitmap };
/* DISPLAY SUBMENU */
{ (const_iptr_t)"Icon Theme", 0, (MenuHook)0, (iptr_t)0 },
{ (const_iptr_t)0, 0, NULL, (iptr_t)0 }
};
-static struct Menu display_menu = { display_items, "Display Menu", MF_SAVESEL, &lcd_bitmap, 0 };
+static struct Menu display_menu = { display_items, "Display Menu", MF_SAVESEL, &lcd_bitmap, 0, lcd_gfx_qt_blitBitmap };
/* MAIN MENU */
{ (const_iptr_t)"Settings", 0, (MenuHook)menu_handle, (iptr_t)&settings_menu },
{ (const_iptr_t)0, 0, NULL, (iptr_t)0 }
};
-static struct Menu main_menu = { main_items, "Main Menu", MF_STICKY, &lcd_bitmap, 0 };
+static struct Menu main_menu = { main_items, "Main Menu", MF_STICKY, &lcd_bitmap, 0, lcd_gfx_qt_blitBitmap };
#if CONFIG_KERN_HEAP
#define monitor_stack NULL
timer_init();
buz_init();
kbd_init();
- lcd_init();
+ lcd_gfx_qt_init(&lcd_bitmap);
proc_init();
monitor_start(KERN_MINSTACKSIZE, monitor_stack);