Backlight settings widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_settings_backlight |
Backlight settings widget context. More... | |
Enumerations | |
enum | bkl_command_id { ICON_DUMMY_ID = 0, ICON_SETTINGS_BACKLIGHT_UP_ID, ICON_SETTINGS_BACKLIGHT_DOWN_ID, ICON_SETTINGS_BACKLIGHT_RET_ID, ICON_SETTINGS_BACKLIGHT_MAX_ID } |
Command event IDs for backlight settings widget. More... | |
Functions | |
static void | app_widget_launch_settings_backlight (void) |
Setup backlight settings widget. More... | |
void | app_widget_settings_backlight_on (uint8_t on) |
Enable/disable date settings widget. More... | |
static bool | widget_settings_backlight_setup_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the backlight settings widget. More... | |
Variables | |
static char | demo_func_name [] = "Set Backlight" |
Backlight settings function string. More... | |
static struct widget_context_settings_backlight * | widget_ctx_settings_backlight |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_root_logo_icon |
Logo frame bitmap. More... | |
static struct gfx_bitmap | win_settings_backlight_down_icon |
Backlight down icon bitmap. More... | |
static struct gfx_bitmap | win_settings_backlight_ret_icon |
Function return bitmap. More... | |
static struct gfx_bitmap | win_settings_backlight_up_icon |
Backlight up icon bitmap. More... | |
enum bkl_command_id |
Command event IDs for backlight settings widget.
|
static |
Setup backlight 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_DOWN_ID, ICON_SETTINGS_BACKLIGHT_RET_ID, ICON_SETTINGS_BACKLIGHT_UP_ID, membag_alloc(), membag_free(), NULL, win_window::parent, win_area::pos, win_area::size, widget_settings_backlight_setup_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_backlight_on().
void app_widget_settings_backlight_on | ( | uint8_t | on | ) |
Enable/disable date settings widget.
on | Turn on/off date settings widget. |
References app_widget_launch_settings_backlight(), widget_context_settings_backlight::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_settings_backlight_setup_command_handler(), and widget_settings_frame_command_handler().
|
static |
Frame handler for the backlight settings widget.
Handles all command events from the widgets in the backlight frame.
frame | Pointer to the application frame |
command_data | Command event ID |
References AAT31XX_MAX_BACKLIGHT_LEVEL, AAT31XX_MIN_BACKLIGHT_LEVEL, aat31xx_set_backlight(), app_widget_settings_backlight_on(), app_widget_settings_on(), demo_param_t::backlight, demo_parameters_commit_changes(), g_demo_parameters, ICON_SETTINGS_BACKLIGHT_DOWN_ID, ICON_SETTINGS_BACKLIGHT_RET_ID, ICON_SETTINGS_BACKLIGHT_UP_ID, and UNUSED.
Referenced by app_widget_launch_settings_backlight().
|
static |
Backlight settings function string.
Referenced by app_widget_launch_settings_backlight().
|
static |
Statically allocated context pointer.
|
static |
Logo frame bitmap.
|
static |
Backlight down icon bitmap.
|
static |
Function return bitmap.
|
static |
Backlight up icon bitmap.