apps/display-demo/app_clock.c File Reference

Display Xplained clock application. More...

#include <assert.h>
#include <string.h>
#include <gfx/gfx.h>
#include <gfx/win.h>
#include <gfx/wtk.h>
#include <gfx/sysfont.h>
#include "app_clock.h"
#include "app_desktop.h"

Go to the source code of this file.

Data Structures

struct  app_clock
 Context for the clock application. More...

Defines

Clock color scheme.

#define COLOR_TEXT   GFX_COLOR(255, 255, 255)
 Color on text strings.
#define COLOR_BACKGROUND   GFX_COLOR(0, 0, 0)
 Background color.
#define COLOR_BORDER   GFX_COLOR(150, 150, 150)
 Color on frame border.
Clock frame size and layout.

#define FRAME_PADDING   40
 Padding in pixels from screen border to frame.
#define FRAME_HEIGHT   (gfx_get_height() - (2 * FRAME_PADDING))
 Height of frame.
#define FRAME_WIDTH   (gfx_get_width() - (2 * FRAME_PADDING))
 Width of frame.
#define FRAME_POS_X   FRAME_PADDING
 X position of top left corner.
#define FRAME_POS_Y   FRAME_PADDING
 Y position of top left corner.
Clock text appearance.

#define TEXT_INDENT   15
 Number of pixels to indent a string.
#define TEXT_PADDING_NEWLINE   4
 Number of pixels to pad after a string newline.

Enumerations

enum  app_clock_button_ids { BUTTON_EXIT_ID = 1 }
 

Event command ID for the application widgets.

More...

Functions

static void app_clock_frame_draw_handler (struct win_window *win, const struct win_clip_region *clip)
 Frame draw handler handling draw events.
static bool app_clock_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data)
 Frame command handler handling the button events.
void app_clock_launch (struct workqueue_task *task)
 Launcher for the clock application.

Variables

static struct app_clockthe_clock_app
 Pointer to the clock application context.

Detailed Description

Display Xplained clock application.

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

Definition in file app_clock.c.

Generated on Thu Apr 29 14:09:58 2010 for display-demo by  doxygen 1.6.3