LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
lpc_swim.h
Go to the documentation of this file.
1
/*
2
* @brief Simple Windowing Interface Manager (SWIM)
3
*
4
* @note
5
* Copyright(C) NXP Semiconductors, 2012
6
* All rights reserved.
7
*
8
* @par
9
* Software that is described herein is for illustrative purposes only
10
* which provides customers with programming information regarding the
11
* LPC products. This software is supplied "AS IS" without any warranties of
12
* any kind, and NXP Semiconductors and its licensor disclaim any and
13
* all warranties, express or implied, including all implied warranties of
14
* merchantability, fitness for a particular purpose and non-infringement of
15
* intellectual property rights. NXP Semiconductors assumes no responsibility
16
* or liability for the use of the software, conveys no license or rights under any
17
* patent, copyright, mask work right, or any other intellectual property rights in
18
* or to any products. NXP Semiconductors reserves the right to make changes
19
* in the software without notification. NXP Semiconductors also makes no
20
* representation or warranty that such application will be suitable for the
21
* specified use without further testing or modification.
22
*
23
* @par
24
* Permission to use, copy, modify, and distribute this software and its
25
* documentation is hereby granted, under NXP Semiconductors' and its
26
* licensor's relevant copyrights in the software, without fee, provided that it
27
* is used in conjunction with NXP Semiconductors microcontrollers. This
28
* copyright, permission, and disclaimer notice must appear in all copies of
29
* this code.
30
*/
31
32
#ifndef __LPC_SWIM_H_
33
#define __LPC_SWIM_H_
34
35
#include "
lpc_types.h
"
36
#include "
lpc_fonts.h
"
37
#include "
lpc_colors.h
"
38
39
#if defined(__cplusplus)
40
extern
"C"
41
{
42
#endif
43
56
typedef
struct
{
57
int32_t
xpsize
;
/* Physical (absolute) horizontal screen size */
58
int32_t
ypsize
;
/* Physical (absolute) vertical screen size */
59
int32_t
xpmin
;
/* Physical left edge of window */
60
int32_t
ypmin
;
/* Physical top edge of window */
61
int32_t
xpmax
;
/* Physical right edge of window */
62
int32_t
ypmax
;
/* Physical bottom edge of window */
63
int32_t
bdsize
;
/* Size of window frame in pixels */
64
int32_t
xvsize
;
/* Virtual horizontal window size */
65
int32_t
yvsize
;
/* Virtual vertical window size */
66
int32_t
xpvmin
;
/* Physical left edge of draw window */
67
int32_t
ypvmin
;
/* Physical top edge of draw window */
68
int32_t
xpvmax
;
/* Physical right edge of draw window */
69
int32_t
ypvmax
;
/* Physical bottom edge of draw window */
70
int32_t
xvpos
;
/* Next virtual 'x' position of output */
71
int32_t
yvpos
;
/* Next virtual 'y' position of output */
72
COLOR_T
pen
;
/* Pen/text color */
73
COLOR_T
bkg
;
/* Window/text background color */
74
COLOR_T
fill
;
/* Fill/border color */
75
FONT_T
*
font
;
/* Selected font structure */
76
int32_t
tfont
;
/* Transparent font background flag when true */
77
COLOR_T
*
fb
;
/* Frame buffer address for the physical display */
78
int32_t
winused
;
/* Window used flag */
79
BOOL_32
tfonts
;
/* Transparent font background flag */
80
}
SWIM_WINDOW_T
;
81
92
void
swim_put_pixel
(
SWIM_WINDOW_T
*win,
93
int32_t x1,
94
int32_t y1);
95
105
void
swim_put_line
(
SWIM_WINDOW_T
*win,
106
int32_t x1,
107
int32_t y1,
108
int32_t x2,
109
int32_t y2);
110
120
void
swim_put_diamond
(
SWIM_WINDOW_T
*win,
121
int32_t x,
122
int32_t y,
123
int32_t rx,
124
int32_t ry);
125
135
void
swim_put_circle
(
SWIM_WINDOW_T
*win,
136
int32_t cx,
137
int32_t cy,
138
int32_t radius,
139
int32_t Filled);
140
147
void
swim_clear_screen
(
SWIM_WINDOW_T
*win,
148
COLOR_T
colr);
149
160
void
swim_put_box
(
SWIM_WINDOW_T
*win,
161
int32_t x1,
162
int32_t y1,
163
int32_t x2,
164
int32_t y2);
165
184
BOOL_32
swim_window_open
(
SWIM_WINDOW_T
*win,
185
int32_t xsize,
186
int32_t ysize,
187
COLOR_T
*fbaddr,
188
int32_t xwin_min,
189
int32_t ywin_min,
190
int32_t xwin_max,
191
int32_t ywin_max,
192
int32_t border_width,
193
COLOR_T
pcolor,
194
COLOR_T
bkcolor,
195
COLOR_T
fcolor);
196
214
BOOL_32
swim_window_open_noclear
(
SWIM_WINDOW_T
*win,
215
int32_t xsize,
216
int32_t ysize,
217
COLOR_T
*fbaddr,
218
int32_t xwin_min,
219
int32_t ywin_min,
220
int32_t xwin_max,
221
int32_t ywin_max,
222
int32_t border_width,
223
COLOR_T
pcolor,
224
COLOR_T
bkcolor,
225
COLOR_T
fcolor);
226
233
void
swim_window_close
(
SWIM_WINDOW_T
*win);
234
241
void
swim_set_pen_color
(
SWIM_WINDOW_T
*win,
242
COLOR_T
pen_color);
243
250
void
swim_set_fill_color
(
SWIM_WINDOW_T
*win,
251
COLOR_T
fill_color);
252
259
void
swim_set_bkg_color
(
SWIM_WINDOW_T
*win,
260
COLOR_T
bkg_color);
261
267
int32_t
swim_get_horizontal_size
(
SWIM_WINDOW_T
*win);
268
274
int32_t
swim_get_vertical_size
(
SWIM_WINDOW_T
*win);
275
276
#if defined(__cplusplus)
277
}
278
#endif
279
284
#endif
/* __LPC_SWIM_H_ */
software
swim
lpc_swim.h
Generated on Fri Nov 16 2012 13:36:49 for LPCOpen Platform by
1.8.2