Information widget for SAM toolkit demo applicaiton.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_info |
Infomation widget context. More... | |
Enumerations | |
enum | info_command_id { ICON_DUMMY_ID = 0, ICON_INFO_ID, ICON_INFO_DUMMY_ID } |
Command event IDs for information widget. More... | |
enum | info_type { INFO_BOARD_NAME = 0, INFO_VER_NUM, INFO_MAX } |
Information type. More... | |
Functions | |
void | app_widget_info_on (uint8_t on) |
Enable/disable information widget. More... | |
static void | app_widget_launch_info (void) |
Setup information widget. More... | |
static bool | widget_info_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the information widget. More... | |
Variables | |
static char | demo_func_name [] = "Demo Info" |
static char | demo_version_number [] = DEMO_VERSION |
static struct widget_context_info * | widget_ctx_info |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_info_logo_icon |
Frame background bitmap. More... | |
static struct gfx_bitmap | win_info_ret_icon |
Frame background bitmap. More... | |
enum info_command_id |
enum info_type |
void app_widget_info_on | ( | uint8_t | on | ) |
Enable/disable information widget.
on | Turn on/off information widget. |
References app_widget_launch_info(), widget_context_info::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_frame_command_handler(), and widget_info_command_handler().
|
static |
Setup information widget.
Allocates memory for the application context, and creates all widgets that make up its interface. If memory allocation or widget creation fails, the application exits immediately.
References win_attributes::area, demo_board_name, demo_func_name, demo_version_number, GFX_BITMAP_SOLID, GFX_COLOR, ICON_INFO_ID, INFO_BOARD_NAME, INFO_VER_NUM, membag_alloc(), membag_free(), win_window::parent, win_area::pos, win_area::size, widget_info_command_handler(), win_destroy(), win_get_attributes(), win_get_root(), win_show(), wtk_basic_frame_as_child(), wtk_basic_frame_create(), wtk_icon_button_as_child(), wtk_icon_button_create(), wtk_icon_button_size_hint(), wtk_icon_group_create(), wtk_label_as_child(), wtk_label_create(), wtk_label_size_hint(), win_point::x, and win_point::y.
Referenced by app_widget_info_on().
|
static |
Frame handler for the information widget.
Handles all command events from the information widgets in the frame.
frame | Pointer to the application frame |
command_data | Command event ID |
References app_widget_info_on(), app_widget_main_on(), ICON_INFO_ID, and UNUSED.
Referenced by app_widget_launch_info().
|
static |
Referenced by app_widget_launch_info().
|
static |
Referenced by app_widget_launch_info().
|
static |
Statically allocated context pointer.
|
static |
Frame background bitmap.
|
static |
Frame background bitmap.