Microchip® Advanced Software Framework

widget_scr_qtouch.c File Reference

QTouch widget for SAM toolkit demo application.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "demo.h"
#include <asf.h>
#include "string.h"
#include "bitmaps.h"

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...
 

Command event IDs for QTouch widget.

Enumerator
ICON_DUMMY_ID 

Dummy icon.

ICON_QTOUCH_BTN_UP_ID 

Command event ID for QTouch up icon button.

ICON_QTOUCH_BTN_DOWN_ID 

Command event ID for QTouch down icon button.

ICON_QTOUCH_BTN_PREV_ID 

Command event ID for QTouch previous icon button.

ICON_QTOUCH_BTN_NEXT_ID 

Command event ID for QTouch next icon button.

ICON_QTOUCH_BTN_ENTER_ID 

Command event ID for QTouch enter icon button.

ICON_QTOUCH_BTN_UP_PRESS_ID 

Command event ID for QTouch up icon button pressed.

ICON_QTOUCH_BTN_DOWN_PRESS_ID 

Command event ID for QTouch down icon button pressed.

ICON_QTOUCH_BTN_PREV_PRESS_ID 

Command event ID for QTouch previous icon button pressed.

ICON_QTOUCH_BTN_NEXT_PRESS_ID 

Command event ID for QTouch next icon button pressed.

ICON_QTOUCH_BTN_ENTER_PRESS_ID 

Command event ID for QTouch enter icon button pressed.

ICON_QTOUCH_RET_ID 

Command event ID for QTouch widget return icon button.

ICON_QTOUCH_MAX_ID 

QTouch max icon number.

void app_widget_qtouch_on ( uint8_t  on)

Enable/disable QTouch widget.

Parameters
onTurn 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 bool widget_qtouch_command_handler ( struct wtk_basic_frame frame,
win_command_t  command_data 
)
static

struct widget_context_qtouch* widget_ctx_qtouch
static

Statically allocated context pointer.

struct gfx_bitmap win_qtouch_btn_down_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_QT_DOWN
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_DOWN
Definition: bitmaps.h:89

QTouch down button bitmap.

struct gfx_bitmap win_qtouch_btn_down_press_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_DOWN_PRESSED
Definition: bitmaps.h:94

QTouch down button pressed bitmap.

struct gfx_bitmap win_qtouch_btn_enter_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_QT_ENTER
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_ENTER
Definition: bitmaps.h:87

QTouch enter button bitmap.

struct gfx_bitmap win_qtouch_btn_enter_press_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_ENTER_PRESSED
Definition: bitmaps.h:92

QTouch enter button pressed bitmap.

struct gfx_bitmap win_qtouch_btn_next_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_QT_NEXT
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_NEXT
Definition: bitmaps.h:88

QTouch next button bitmap.

struct gfx_bitmap win_qtouch_btn_next_press_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_NEXT_PRESSED
Definition: bitmaps.h:93

QTouch next button pressed bitmap.

struct gfx_bitmap win_qtouch_btn_prev_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_QT_PREV
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_PREV
Definition: bitmaps.h:86

QTouch previous button bitmap.

struct gfx_bitmap win_qtouch_btn_prev_press_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_PREV_PRESSED
Definition: bitmaps.h:91

QTouc previous button pressed bitmap.

struct gfx_bitmap win_qtouch_btn_up_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_QT_UP
}
#define DEMO_BMP_BTN_QT_UP
Definition: bitmaps.h:85
Definition: gfx_generic.h:68

QTouch up button bitmap.

struct gfx_bitmap win_qtouch_btn_up_press_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_QT_UP_PRESSED
Definition: bitmaps.h:90

QTouch up button pressed bitmap.

struct gfx_bitmap win_settings_ret_icon
static
Initial value:
= {
.width = 48, .height=48,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_BTN_BACK
}
Definition: gfx_generic.h:68
#define DEMO_BMP_BTN_BACK
Definition: bitmaps.h:44

QTouch return icon bitmap.