QTouch widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_qtouch |
QTouch widget context. More... | |
Enumerations | |
enum | qtouch_command_id { ICON_DUMMY_ID = 0, ICON_QTOUCH_BTN_UP_ID, ICON_QTOUCH_BTN_DOWN_ID, ICON_QTOUCH_BTN_PREV_ID, ICON_QTOUCH_BTN_NEXT_ID, ICON_QTOUCH_BTN_ENTER_ID, ICON_QTOUCH_BTN_UP_PRESS_ID, ICON_QTOUCH_BTN_DOWN_PRESS_ID, ICON_QTOUCH_BTN_PREV_PRESS_ID, ICON_QTOUCH_BTN_NEXT_PRESS_ID, ICON_QTOUCH_BTN_ENTER_PRESS_ID, ICON_QTOUCH_RET_ID, ICON_QTOUCH_MAX_ID } |
Command event IDs for QTouch widget. More... | |
Functions | |
static void | app_widget_launch_qtouch (void) |
Setup QTouch widget. More... | |
void | app_widget_qtouch_on (uint8_t on) |
Enable/disable QTouch widget. More... | |
static bool | widget_qtouch_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the QTouch widget. More... | |
Variables | |
static struct widget_context_qtouch * | widget_ctx_qtouch |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_qtouch_btn_down_icon |
QTouch down button bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_down_press_icon |
QTouch down button pressed bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_enter_icon |
QTouch enter button bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_enter_press_icon |
QTouch enter button pressed bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_next_icon |
QTouch next button bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_next_press_icon |
QTouch next button pressed bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_prev_icon |
QTouch previous button bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_prev_press_icon |
QTouc previous button pressed bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_up_icon |
QTouch up button bitmap. More... | |
static struct gfx_bitmap | win_qtouch_btn_up_press_icon |
QTouch up button pressed bitmap. More... | |
static struct gfx_bitmap | win_settings_ret_icon |
QTouch return icon bitmap. More... | |
enum qtouch_command_id |
Command event IDs for QTouch widget.
|
static |
Setup QTouch 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_QTOUCH_MODE, demo_set_special_mode_status(), GFX_BITMAP_SOLID, GFX_COLOR, gfx_draw_rect, ICON_QTOUCH_BTN_DOWN_ID, ICON_QTOUCH_BTN_DOWN_PRESS_ID, ICON_QTOUCH_BTN_ENTER_ID, ICON_QTOUCH_BTN_ENTER_PRESS_ID, ICON_QTOUCH_BTN_NEXT_ID, ICON_QTOUCH_BTN_NEXT_PRESS_ID, ICON_QTOUCH_BTN_PREV_ID, ICON_QTOUCH_BTN_PREV_PRESS_ID, ICON_QTOUCH_BTN_UP_ID, ICON_QTOUCH_BTN_UP_PRESS_ID, ICON_QTOUCH_RET_ID, membag_alloc(), membag_free(), win_window::parent, win_area::pos, win_area::size, widget_qtouch_command_handler(), win_destroy(), win_get_attributes(), win_get_root(), win_hide(), 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(), win_point::x, and win_point::y.
Referenced by app_widget_qtouch_on().
void app_widget_qtouch_on | ( | uint8_t | on | ) |
Enable/disable QTouch widget.
on | Turn on/off QTouch widget. |
References app_widget_launch_qtouch(), widget_context_qtouch::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_frame_command_handler(), and widget_qtouch_command_handler().
|
static |
Frame handler for the QTouch widget.
Handles all command events from the widgets in the QTouch frame.
frame | Pointer to the application frame |
command_data | Command event ID |
References app_widget_main_on(), app_widget_qtouch_on(), DEMO_QTOUCH_MODE, demo_set_special_mode_status(), ICON_QTOUCH_BTN_DOWN_ID, ICON_QTOUCH_BTN_DOWN_PRESS_ID, ICON_QTOUCH_BTN_ENTER_ID, ICON_QTOUCH_BTN_ENTER_PRESS_ID, ICON_QTOUCH_BTN_NEXT_ID, ICON_QTOUCH_BTN_NEXT_PRESS_ID, ICON_QTOUCH_BTN_PREV_ID, ICON_QTOUCH_BTN_PREV_PRESS_ID, ICON_QTOUCH_BTN_UP_ID, ICON_QTOUCH_BTN_UP_PRESS_ID, ICON_QTOUCH_RET_ID, widget_context_qtouch::icons, UNUSED, win_hide(), win_show(), and wtk_icon_button_as_child().
Referenced by app_widget_launch_qtouch().
|
static |
Statically allocated context pointer.
|
static |
QTouch down button bitmap.
|
static |
QTouch down button pressed bitmap.
|
static |
QTouch enter button bitmap.
|
static |
QTouch enter button pressed bitmap.
|
static |
QTouch next button bitmap.
|
static |
QTouch next button pressed bitmap.
|
static |
QTouch previous button bitmap.
|
static |
QTouc previous button pressed bitmap.
|
static |
QTouch up button bitmap.
|
static |
QTouch up button pressed bitmap.
|
static |
QTouch return icon bitmap.