Audio widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_audio |
Widget application context. More... | |
Enumerations | |
enum | command_id { DUMMY_ID, ICON_BUTTON_1_ID, ICON_BUTTON_2_ID, ICON_BUTTON_3_ID, BUTTON_PREV_ID, BUTTON_NEXT_ID, BUTTON_SELECT_ID, DUMMY_ID, SLIDER_ID, CHECK_BOX_ID, RADIO_BUTTON_1_ID, RADIO_BUTTON_2_ID, BUTTON_ID, DUMMY_ID, SLIDER_ID, BUTTON_ID, ICON_DUMMY_ID = 0, ICON_AUDIO_RECORD_ID, ICON_AUDIO_MIC_ID, ICON_AUDIO_PLAY_PAUSE_ID, ICON_AUDIO_STOP_ID, ICON_AUDIO_VOLUME_ID, ICON_AUDIO_RET_ID, ICON_AUDIO_MAX_ID, ICON_DUMMY_ID = 0, ICON_LPM_WAIT_ID, ICON_LPM_SLEEP_ID, ICON_LPM_BACKUP_ID, ICON_LPM_RET_ID, ICON_LPM_MAX } |
Command event IDs for audio widget. More... | |
Functions | |
void | app_widget_audio_on (uint8_t on) |
Enable/disable audio widget. More... | |
static void | app_widget_launch_audio (void) |
Setup audio widget. More... | |
static bool | widget_audio_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the application. More... | |
Variables | |
static char | demo_func_name [] = "Audio" |
String for function name. More... | |
static char | demo_idc [] = " This module is\nunder construction\n Press any icon\n to return!" |
Indication string. More... | |
static struct widget_context_audio * | widget_ctx_audio |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_audio_mic_icon |
Microphone bitmap. More... | |
static struct gfx_bitmap | win_audio_play_pause_icon |
Play pause bitmap. More... | |
static struct gfx_bitmap | win_audio_record_icon |
Audio record bitmap. More... | |
static struct gfx_bitmap | win_audio_ret_icon |
Audio return bitmap. More... | |
static struct gfx_bitmap | win_audio_stop_icon |
Audio stop bitmap. More... | |
static struct gfx_bitmap | win_audio_vol_disable_icon |
Volume disable bitmap. More... | |
static struct gfx_bitmap | win_root_logo_icon |
Logo bitmap. More... | |
enum command_id |
Command event IDs for audio widget.
void app_widget_audio_on | ( | uint8_t | on | ) |
Enable/disable audio widget.
on | Turn on/off audio widget. |
References app_widget_launch_audio(), widget_context_audio::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_audio_command_handler(), and widget_frame_command_handler().
|
static |
Setup audio 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, COLOR_BLUE, demo_board_name, demo_func_name, demo_idc, GFX_BITMAP_SOLID, GFX_COLOR, GFX_COLOR_TRANSPARENT, gfx_draw_string(), ICON_AUDIO_MIC_ID, ICON_AUDIO_PLAY_PAUSE_ID, ICON_AUDIO_RECORD_ID, ICON_AUDIO_RET_ID, ICON_AUDIO_STOP_ID, ICON_AUDIO_VOLUME_ID, membag_alloc(), membag_free(), NULL, win_window::parent, win_area::pos, win_area::size, sysfont, widget_audio_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_audio_on().
|
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_audio_on(), app_widget_main_on(), ICON_AUDIO_MIC_ID, ICON_AUDIO_PLAY_PAUSE_ID, ICON_AUDIO_RECORD_ID, ICON_AUDIO_RET_ID, ICON_AUDIO_STOP_ID, ICON_AUDIO_VOLUME_ID, and UNUSED.
Referenced by app_widget_launch_audio().
|
static |
String for function name.
Referenced by app_widget_launch_audio().
|
static |
Indication string.
Referenced by app_widget_launch_audio().
|
static |
Statically allocated context pointer.
|
static |
Microphone bitmap.
|
static |
Play pause bitmap.
|
static |
Audio record bitmap.
|
static |
Audio return bitmap.
|
static |
Audio stop bitmap.
|
static |
Volume disable bitmap.
|
static |
Logo bitmap.