1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/
/**
* @file include/gdisp/options.h
* @brief GDISP sub-system options header file.
*
* @addtogroup GDISP
* @{
*/
#ifndef _GDISP_OPTIONS_H
#define _GDISP_OPTIONS_H
/**
* @name GDISP Functionality to be included
* @{
*/
/**
* @brief Should all operations be clipped to the screen and colors validated.
* @details Defaults to TRUE.
* @note If this is FALSE, any operations that extend beyond the
* edge of the screen will have undefined results. Any
* out-of-range colors will produce undefined results.
* @note If defined then all low level and high level GDISP driver routines
* must check the validity of inputs and do something sensible
* if they are out of range. It doesn't have to be efficient,
* just valid.
*/
#ifndef GDISP_NEED_VALIDATION
#define GDISP_NEED_VALIDATION TRUE
#endif
/**
* @brief Are clipping functions needed.
* @details Defaults to TRUE
*/
#ifndef GDISP_NEED_CLIP
#define GDISP_NEED_CLIP TRUE
#endif
/**
* @brief Are text functions needed.
* @details Defaults to TRUE
*/
#ifndef GDISP_NEED_TEXT
#define GDISP_NEED_TEXT TRUE
#endif
/**
* @brief Are circle functions needed.
* @details Defaults to TRUE
*/
#ifndef GDISP_NEED_CIRCLE
#define GDISP_NEED_CIRCLE TRUE
#endif
/**
* @brief Are ellipse functions needed.
* @details Defaults to TRUE
*/
#ifndef GDISP_NEED_ELLIPSE
#define GDISP_NEED_ELLIPSE TRUE
#endif
/**
* @brief Are arc functions needed.
* @details Defaults to FALSE
* @note Requires the maths library to be included in the link. ie -lm
*/
#ifndef GDISP_NEED_ARC
#define GDISP_NEED_ARC FALSE
#endif
/**
* @brief Are convex polygon functions needed.
* @details Defaults to FALSE
* @note Convex polygons are those that have no internal angles. That is;
* you can draw a line from any point on the polygon to any other point
* on the polygon without it going outside the polygon.
*/
#ifndef GDISP_NEED_CONVEX_POLYGON
#define GDISP_NEED_CONVEX_POLYGON FALSE
#endif
/**
* @brief Are scrolling functions needed.
* @details Defaults to FALSE
* @note This function must be supported by the low level GDISP driver
* you have included in your project. If it isn't, defining this
* option will cause a compile error.
*/
#ifndef GDISP_NEED_SCROLL
#define GDISP_NEED_SCROLL FALSE
#endif
/**
* @brief Is the capability to read pixels back needed.
* @details Defaults to FALSE
* @note This function must be supported by the low level GDISP driver
* you have included in your project. If it isn't, defining this
* option will cause a compile error.
*/
#ifndef GDISP_NEED_PIXELREAD
#define GDISP_NEED_PIXELREAD FALSE
#endif
/**
* @brief Control some aspect of the hardware operation.
* @details Defaults to FALSE
* @note This allows control of hardware specific features such as
* screen rotation, backlight levels, contrast etc
*/
#ifndef GDISP_NEED_CONTROL
#define GDISP_NEED_CONTROL FALSE
#endif
/**
* @brief Query some aspect of the hardware operation.
* @details Defaults to FALSE
* @note This allows query of hardware specific features
*/
#ifndef GDISP_NEED_QUERY
#define GDISP_NEED_QUERY FALSE
#endif
/**
* @brief Is the image interface required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE
#define GDISP_NEED_IMAGE FALSE
#endif
/**
* @brief Is the messaging api interface required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_MSGAPI
#define GDISP_NEED_MSGAPI FALSE
#endif
/**
* @}
*
* @name GDISP Image Options
* @pre GDISP_NEED_IMAGE must be TRUE
* @{
*/
/**
* @brief Is native image decoding required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_NATIVE
#define GDISP_NEED_IMAGE_NATIVE FALSE
#endif
/**
* @brief Is GIF image decoding required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_GIF
#define GDISP_NEED_IMAGE_GIF FALSE
#endif
/**
* @brief Is BMP image decoding required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_BMP
#define GDISP_NEED_IMAGE_BMP FALSE
#endif
/**
* @brief Is JPG image decoding required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_JPG
#define GDISP_NEED_IMAGE_JPG FALSE
#endif
/**
* @brief Is PNG image decoding required.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_PNG
#define GDISP_NEED_IMAGE_PNG FALSE
#endif
/**
* @brief Is memory accounting required during image decoding.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_IMAGE_ACCOUNTING
#define GDISP_NEED_IMAGE_ACCOUNTING FALSE
#endif
/**
* @}
*
* @name GDISP Text Rendering Options
* @{
*/
/**
* @brief Enable UTF-8 support for text rendering.
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_UTF8
#define GDISP_NEED_UTF8 FALSE
#endif
/**
* @brief Enable kerning for font rendering (improves character placement).
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_TEXT_KERNING
#define GDISP_NEED_TEXT_KERNING FALSE
#endif
/**
* @brief Enable antialiased font support
* @details Defaults to FALSE
*/
#ifndef GDISP_NEED_ANTIALIAS
#define GDISP_NEED_ANTIALIAS FALSE
#endif
/**
* @}
*
* @name GDISP Multi-Threading Options
* @{
*/
/**
* @brief Do the drawing functions need to be thread-safe.
* @details Defaults to FALSE
* @note Both GDISP_NEED_MULTITHREAD and GDISP_NEED_ASYNC make
* the gdisp API thread-safe.
* @note This is more efficient than GDISP_NEED_ASYNC as it only
* requires a context switch if something else is already
* drawing.
*/
#ifndef GDISP_NEED_MULTITHREAD
#define GDISP_NEED_MULTITHREAD FALSE
#endif
/**
* @brief Use asynchronous calls (multi-thread safe).
* @details Defaults to FALSE
* @note Both GDISP_NEED_MULTITHREAD and GDISP_NEED_ASYNC make
* the gdisp API thread-safe.
* @note Turning this on adds two context switches per transaction
* so it can significantly slow graphics drawing but it allows
* drawing operations to continue in the background.
*/
#ifndef GDISP_NEED_ASYNC
#define GDISP_NEED_ASYNC FALSE
#endif
/**
* @}
*
* @name GDISP Fonts
* @{
*/
/**
* @brief Predefined built in fonts
* @note Turning off the ones you are not using can save program size.
*/
/**
* @}
*
* @name GDISP Optional Sizing Parameters
* @{
*/
/**
* @}
*
* @name GDISP Optional Low Level Driver Defines
* @{
*/
/**
* @brief Use a custom board definition even if a board definition exists.
* @details Defaults to FALSE
* @details If TRUE, add gdisp_lld_board.h to your project directory and customise it.
* @note Not all GDISP low level drivers currently use board definition files.
*/
#ifndef GDISP_USE_CUSTOM_BOARD
#define GDISP_USE_CUSTOM_BOARD FALSE
#endif
/**
* @brief Set the screen height and width.
* @note Ignored by some low level GDISP drivers, optional for others.
* @note Where these values are allowed, a default is always provided be the low level driver.
* @note The list of GDISP low level drivers that allow these to be set are...
* WIN32, SSD1289, SSD1963, TestStub
*/
/* #define GDISP_SCREEN_WIDTH nnnn */
/* #define GDISP_SCREEN_HEIGHT nnnn */
/**
* @brief Define which threading model to use.
* @details Optional for the X11 driver.
* @note Defaults to TRUE. Setting to FALSE causes POSIX threads to be used
*/
/* #define GDISP_THREAD_CHIBIOS FALSE */
/**
* @brief Define which bus interface to use.
* @details Only required by the SSD1963 driver.
* @note This will be replaced eventually by board definition files
*/
/* #define GDISP_USE_FSMC */
/* #define GDISP_USE_GPIO */
/** @} */
#if GFX_USE_GDISP
#include "gdisp_lld_config.h"
#endif
#endif /* _GDISP_OPTIONS_H */
/** @} */
|