Settings widget for the SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_settings |
Widget application context. More... | |
Enumerations | |
enum | settings_command_id { ICON_DUMMY_ID = 0, ICON_SETTINGS_TIME_ID, ICON_SETTINGS_DATE_ID, ICON_SETTINGS_BACKLIGHT_ID, ICON_SETTINGS_TSD_ID, ICON_SETTINGS_RET_ID, ICON_SETTINGS_MAX_ID } |
Command event IDs for the settings widgets. More... | |
Functions | |
static void | app_widget_launch_settings (void) |
Setup settings widget. More... | |
void | app_widget_settings_on (uint8_t on) |
Enable/disable settings widget. More... | |
static bool | widget_settings_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the application. More... | |
Variables | |
static char | demo_func_name [] = "Demo Settings" |
Function name of the settings widget. More... | |
static struct widget_context_settings * | widget_ctx_settings |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_root_logo_icon |
Logo bitmap. More... | |
static struct gfx_bitmap | win_settings_backlight_icon |
Backlight settings bitmap. More... | |
static struct gfx_bitmap | win_settings_date_icon |
Date settings bitmap. More... | |
static struct gfx_bitmap | win_settings_ret_icon |
Return bitmap. More... | |
static struct gfx_bitmap | win_settings_time_icon |
Time settings bitmap. More... | |
static struct gfx_bitmap | win_settings_tsd_icon |
Touch calibration settings bitmap. More... | |
enum settings_command_id |
Command event IDs for the settings widgets.
|
static |
Setup settings 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, GFX_BITMAP_SOLID, GFX_COLOR, ICON_SETTINGS_BACKLIGHT_ID, ICON_SETTINGS_DATE_ID, ICON_SETTINGS_RET_ID, ICON_SETTINGS_TIME_ID, ICON_SETTINGS_TSD_ID, membag_alloc(), membag_free(), NULL, win_window::parent, win_area::pos, win_area::size, widget_settings_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_settings_on().
void app_widget_settings_on | ( | uint8_t | on | ) |
Enable/disable settings widget.
on | Turn on/off settings widget. |
References app_widget_launch_settings(), widget_context_settings::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by task_win(), widget_frame_command_handler(), widget_settings_backlight_setup_command_handler(), widget_settings_date_setup_command_handler(), widget_settings_frame_command_handler(), and widget_settings_time_setup_command_handler().
|
static |
Frame handler for the application.
Handles all command events from the widgets in the application frame.
frame | Pointer to the application frame |
command_data | Command event ID |
References app_widget_main_on(), app_widget_settings_backlight_on(), app_widget_settings_date_on(), app_widget_settings_on(), app_widget_settings_time_on(), DEMO_LCD_CALIBRATE_MODE, demo_set_special_mode_status(), ICON_SETTINGS_BACKLIGHT_ID, ICON_SETTINGS_DATE_ID, ICON_SETTINGS_RET_ID, ICON_SETTINGS_TIME_ID, ICON_SETTINGS_TSD_ID, and UNUSED.
Referenced by app_widget_launch_settings().
|
static |
Function name of the settings widget.
Referenced by app_widget_launch_settings().
|
static |
Statically allocated context pointer.
|
static |
Logo bitmap.
|
static |
Backlight settings bitmap.
|
static |
Date settings bitmap.
|
static |
Return bitmap.
|
static |
Time settings bitmap.
|
static |
Touch calibration settings bitmap.