apps/display-training/app_widget.c File Reference

Display demo widget application. More...

#include <led.h>
#include <board.h>
#include <string.h>
#include <gfx/gfx.h>
#include <gfx/win.h>
#include <gfx/wtk.h>
#include <gfx/sysfont.h>
#include <membag.h>
#include <debug.h>
#include <mainloop.h>
#include <stream.h>
#include "app_widget.h"

Go to the source code of this file.

Defines

Color scheme

#define APP_BACKGROUND_COLOR   GFX_COLOR(50, 50, 50)
 Background color for application.
Widget sizes and positions

#define LABEL_POS_X   10
 Label position on top of display.
#define LABEL_POS_Y   10
 Label position on top of display.
#define SLIDER_POS_X   10
 Slider position.
#define SLIDER_POS_Y   60
 Slider position.
#define SLIDER_SIZE_X   80
 Slider size on display.
#define SLIDER_SIZE_Y   40
 Slider size on display.
#define SLIDER_PB_SPACING_X   10
 Spacing from slider to progress bar.
#define PB_SIZE_X   SLIDER_SIZE_X
 Slider progress bar on display.
#define PB_SIZE_Y   SLIDER_SIZE_Y
 Slider progress bar on display.
Widget configurations

#define SLIDER_MAX_VALUE   100
 Max value for slider.

Enumerations

enum  app_widget_ids { SLIDER_ID = 1, BUTTON_ID }
 

Event command ID for the application widgets.

More...

Functions

static bool widget_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data)
 Frame command events handler.
static void sub_frame_draw_handler (struct win_window *win, struct win_clip_region const *clip)
 Frame draw event handler.
void app_widget_launch (struct workqueue_task *task)
 Setup widget demo.

Variables

Static text strings

static const char * demo_string = "Demonstrating widgets"
 Description for label.
Static variables

static struct wtk_basic_frameframe
 Pointer to frame for application.
static struct wtk_sliderslider
 Pointer to slider.
static struct wtk_progress_barprogress_bar
 Pointer to progress bar.
static struct gfx_bitmap frame_background
 Frame background bitmap.
static uint8_t counter
 Counter for button.
static struct wtk_basic_framesub_frame
 Pointer to the sub-frame.
static struct gfx_bitmap sub_frame_background
 Sub-frame background bitmap.

Detailed Description

Display demo widget application.

Copyright (C) 2009 Atmel Corporation. All rights reserved.

Definition in file app_widget.c.

Generated on Thu Apr 29 15:18:21 2010 for display-training by  doxygen 1.6.3