Display demo desktop application. More...
#include <led.h>#include <board.h>#include <membag.h>#include <string.h>#include <mainloop.h>#include <fs/tsfs.h>#include <gfx/gfx.h>#include <gfx/win.h>#include <gfx/wtk.h>#include <gfx/sysfont.h>#include "app_desktop.h"#include "app_calibrate.h"#include <status_codes.h>Go to the source code of this file.
Data Structures | |
| struct | app_desktop |
| Desktop context. More... | |
| struct | app_config |
| Application metadata. More... | |
Defines | |
| #define | DESKTOP_REGISTER_APP(icon, text, start_task) { .icon_name = icon, .icon_text=text,.task=start_task } |
| Convenience macro for registering applications. | |
Application menu configuration | |
| #define | DESKTOP_NUM_APPS_PER_COLUMN 4 |
| Number of apps per column. | |
| #define | DESKTOP_NUM_APPS_PER_ROW 3 |
| Number of apps per row. | |
| #define | DESKTOP_APP_COUNT |
| Total number of apps. | |
Color scheme | |
| #define | DESKTOP_BACKGROUND_COLOR GFX_COLOR(0, 0, 0) |
| Desktop background color. | |
| #define | DESKTOP_ICON_TEXT_COLOR GFX_COLOR(255, 255, 255) |
| Text color for icons. | |
| #define | DESKTOP_POPUP_BORDER_COLOR GFX_COLOR(255, 42, 42) |
| Desktop pop-up border color. | |
Icon configuration | |
| #define | DESKTOP_ICON_NAME_SIZE 9 |
| Size of string for icon name. | |
| #define | DESKTOP_ICON_TEXT_SIZE 11 |
| Size of string for text below each icon. | |
| #define | DESKTOP_ICON_SPACING_X 80 |
| Size of application launch icon and text. | |
| #define | DESKTOP_ICON_SPACING_Y 80 |
| Size of application launch icon and text. | |
| #define | DESKTOP_ICON_POS_X 11 |
| X position of icon. | |
| #define | DESKTOP_ICON_POS_Y 7 |
| Y position of icon. | |
| #define | DESKTOP_ICON_SIZE_X 57 |
| Width of icon. | |
| #define | DESKTOP_ICON_SIZE_Y 57 |
| Height of icon. | |
| #define | DESKTOP_ICON_TEXT_X (DESKTOP_ICON_SPACING_X / 2) |
| Position for text describing each icon. | |
| #define | DESKTOP_ICON_TEXT_Y |
| Position for text describing each icon. | |
Pop-up size and position configuration | |
| #define | DESKTOP_POPUP_PADDING 20 |
| Position from display edge to start of pop-up box. | |
| #define | DESKTOP_POPUP_HEIGHT (gfx_font_get_height(&sysfont) * 5) |
| Height of pop-up box. | |
| #define | DESKTOP_POPUP_WIDTH |
| Width of pop-up box. | |
| #define | DESKTOP_POPUP_POS_X DESKTOP_POPUP_PADDING |
| X position of pop-up box. | |
| #define | DESKTOP_POPUP_POS_Y |
| Y position of pop-up box. | |
Functions | |
| static void | app_desktop_enable (void) |
| Enable desktop. | |
| static void | app_desktop_disable (void) |
| Disable desktop. | |
| static bool | app_desktop_is_enabled (void) |
| Check if desktop is enabled. | |
| void | app_desktop_restart (void) |
| Restart desktop. | |
| static void | get_icon_pos (uint8_t iconnum, gfx_coord_t *x, gfx_coord_t *y) |
| Helper function to get icon position. | |
| static void | draw_icon_text (const char text[], gfx_coord_t center_x, gfx_coord_t center_y) |
| Helper function for drawing icon text. | |
| static bool | app_desktop_handler (struct win_window *win, enum win_event_type type, void const *data) |
| Event handler for desktop window. | |
| static void | load_desktop (struct workqueue_task *task) |
| Load desktop. | |
| void | app_desktop_setup (void) |
| Setup desktop. | |
Variables | |
| static struct app_desktop | the_app_desktop |
| Statically allocated desktop context. | |
| struct app_config | apps [DESKTOP_APP_COUNT] |
| Desktop application menu items. | |
Display demo desktop application.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file app_desktop.c.
1.6.3