Main widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context |
Widget application context. More... | |
Enumerations | |
enum | main_command_id { ICON_DUMMY_ID = 0, ICON_MAIN_AUDIO_ID, ICON_MAIN_VIDEO_ID, ICON_MAIN_PPT_ID, ICON_MAIN_SETTINGS_ID, ICON_MAIN_QTOUCH_ID, ICON_MAIN_LPM_ID, ICON_MAIN_INFO_ID, ICON_MAIN_MAX_NUM } |
Command event IDs for main widget. More... | |
Functions | |
static void | app_widget_launch_main (void) |
Setup widget demo. More... | |
void | app_widget_main_on (uint8_t on) |
Enable/disable mainmode widget. More... | |
static bool | widget_frame_command_handler (struct wtk_basic_frame *frame, void *command_data) |
Frame handler for the main widget. More... | |
Variables | |
char | demo_board_name [] = DEMO_BOARD_NAME |
Demo board name. More... | |
static char | demo_func_name [] = "Demo" |
static struct widget_context * | widget_ctx_main |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_main_audio_icon |
Audio bitmap. More... | |
static struct gfx_bitmap | win_main_info_icon |
Information bitmap. More... | |
static struct gfx_bitmap | win_main_logo_icon |
Logo bitmap. More... | |
static struct gfx_bitmap | win_main_lpm_icon |
Low power mode bitmap. More... | |
static struct gfx_bitmap | win_main_qtouch_icon |
QTouch bitmap. More... | |
static struct gfx_bitmap | win_main_settings_icon |
Settings bitmap. More... | |
static struct gfx_bitmap | win_main_slidershow_icon |
Slider show bitmap. More... | |
static struct gfx_bitmap | win_main_video_icon |
Video bitmap. More... | |
enum main_command_id |
Command event IDs for main widget.
|
static |
Setup widget demo.
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_MAIN_MODE, demo_set_special_mode_status(), GFX_BITMAP_SOLID, GFX_COLOR, ICON_MAIN_AUDIO_ID, ICON_MAIN_INFO_ID, ICON_MAIN_LPM_ID, ICON_MAIN_PPT_ID, ICON_MAIN_QTOUCH_ID, ICON_MAIN_SETTINGS_ID, ICON_MAIN_VIDEO_ID, membag_alloc(), membag_free(), NULL, win_window::parent, win_area::pos, win_area::size, widget_frame_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_main_on().
void app_widget_main_on | ( | uint8_t | on | ) |
Enable/disable mainmode widget.
on | Turn on/off main mode widget. |
References app_widget_launch_main(), DEMO_MAIN_MODE, demo_set_special_mode_status(), widget_context::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by main(), task_win(), widget_audio_command_handler(), widget_frame_command_handler(), widget_info_command_handler(), widget_lpm_command_handler(), widget_qtouch_command_handler(), and widget_settings_frame_command_handler().
|
static |
Frame handler for the main widget.
Handles all command events from the widgets in the main widget.
frame | Pointer to the application frame. |
command_data | Command event ID. |
References app_widget_audio_on(), app_widget_fft_on(), app_widget_info_on(), app_widget_lpm_on(), app_widget_main_on(), app_widget_qtouch_on(), app_widget_settings_on(), DEMO_FFT_MODE, DEMO_MAIN_MODE, DEMO_PPT_MODE, demo_set_special_mode_status(), ICON_MAIN_AUDIO_ID, ICON_MAIN_INFO_ID, ICON_MAIN_LPM_ID, ICON_MAIN_PPT_ID, ICON_MAIN_QTOUCH_ID, ICON_MAIN_SETTINGS_ID, ICON_MAIN_VIDEO_ID, and UNUSED.
Referenced by app_widget_launch_main().
char demo_board_name[] = DEMO_BOARD_NAME |
Demo board name.
Referenced by app_widget_launch_audio(), app_widget_launch_info(), app_widget_launch_lpm(), app_widget_launch_lpm_backup(), app_widget_launch_lpm_sleep(), app_widget_launch_lpm_wait(), app_widget_launch_main(), app_widget_launch_settings(), app_widget_launch_settings_backlight(), app_widget_launch_settings_date(), and app_widget_launch_settings_time().
|
static |
Referenced by app_widget_launch_main().
|
static |
Statically allocated context pointer.
|
static |
Audio bitmap.
|
static |
Information bitmap.
|
static |
Logo bitmap.
|
static |
Low power mode bitmap.
|
static |
QTouch bitmap.
|
static |
Settings bitmap.
|
static |
Slider show bitmap.
|
static |
Video bitmap.