forked from deividAlfa/UGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathugui.h
553 lines (507 loc) · 21.8 KB
/
ugui.h
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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
/* -------------------------------------------------------------------------------- */
/* -- µGUI - Generic GUI module (C)Achim Döbler, 2015 -- */
/* -------------------------------------------------------------------------------- */
// µGUI is a generic GUI module for embedded systems.
// This is a free software that is open for education, research and commercial
// developments under license policy of following terms.
//
// Copyright (C) 2015, Achim Döbler, all rights reserved.
// URL: http://www.embeddedlightning.com/
//
// * The µGUI module is a free software and there is NO WARRANTY.
// * No restriction on use. You can use, modify and redistribute it for
// personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
// * Redistributions of source code must retain the above copyright notice.
//
/* -------------------------------------------------------------------------------- */
#ifndef __UGUI_H
#define __UGUI_H
#include <stdlib.h>
#include "ugui_config.h"
#include "ugui_colors.h"
#if !defined(UGUI_USE_CUSTOM_THEME)
#include "ugui_theme.h"
#else
#include "ugui_theme_custom.h"
#endif
/* -------------------------------------------------------------------------------- */
/* -- TYPEDEFS -- */
/* -------------------------------------------------------------------------------- */
typedef struct S_OBJECT UG_OBJECT;
typedef struct S_WINDOW UG_WINDOW;
typedef UG_S8 UG_RESULT;
#if defined(UGUI_USE_COLOR_RGB888)
typedef UG_U32 UG_COLOR;
#elif defined(UGUI_USE_COLOR_RGB565)
typedef UG_U16 UG_COLOR;
#elif defined(UGUI_USE_COLOR_BW)
typedef UG_U8 UG_COLOR;
#endif
#if !defined(UGUI_USE_COLOR_RGB888) && !defined(UGUI_USE_COLOR_RGB565) && !defined(UGUI_USE_COLOR_BW)
#error "You must define a color space!"
#endif
#if defined(UGUI_USE_COLOR_RGB888) && defined(UGUI_USE_COLOR_RGB565) || \
defined(UGUI_USE_COLOR_RGB888) && defined(UGUI_USE_COLOR_BW) || \
defined(UGUI_USE_COLOR_RGB565) && defined(UGUI_USE_COLOR_BW) || \
defined(UGUI_USE_COLOR_RGB888) && defined(UGUI_USE_COLOR_RGB565) && defined(UGUI_USE_COLOR_BW)
#error "You must define only one color space!"
#endif
#if !defined(C_PAL_WINDOW)
#error "You must define a theme!"
#endif
/* -------------------------------------------------------------------------------- */
/* -- DEFINES -- */
/* -------------------------------------------------------------------------------- */
/* Internal helpers */
#define UG_GetFontWidth(f) *(f+1)
#define UG_GetFontHeight(f) *(f+2)
/* Sizing helpers */
#define UGUI_POS(xs, ys, w, h) xs, ys, xs+w, ys+h
/* Alignments */
#define ALIGN_H_LEFT (1<<0)
#define ALIGN_H_CENTER (1<<1)
#define ALIGN_H_RIGHT (1<<2)
#define ALIGN_V_TOP (1<<3)
#define ALIGN_V_CENTER (1<<4)
#define ALIGN_V_BOTTOM (1<<5)
#define ALIGN_BOTTOM_RIGHT (ALIGN_V_BOTTOM|ALIGN_H_RIGHT)
#define ALIGN_BOTTOM_CENTER (ALIGN_V_BOTTOM|ALIGN_H_CENTER)
#define ALIGN_BOTTOM_LEFT (ALIGN_V_BOTTOM|ALIGN_H_LEFT)
#define ALIGN_CENTER_RIGHT (ALIGN_V_CENTER|ALIGN_H_RIGHT)
#define ALIGN_CENTER (ALIGN_V_CENTER|ALIGN_H_CENTER)
#define ALIGN_CENTER_LEFT (ALIGN_V_CENTER|ALIGN_H_LEFT)
#define ALIGN_TOP_RIGHT (ALIGN_V_TOP|ALIGN_H_RIGHT)
#define ALIGN_TOP_CENTER (ALIGN_V_TOP|ALIGN_H_CENTER)
#define ALIGN_TOP_LEFT (ALIGN_V_TOP|ALIGN_H_LEFT)
/* Default IDs */
#define OBJ_ID_0 0
#define OBJ_ID_1 1
#define OBJ_ID_2 2
#define OBJ_ID_3 3
#define OBJ_ID_4 4
#define OBJ_ID_5 5
#define OBJ_ID_6 6
#define OBJ_ID_7 7
#define OBJ_ID_8 8
#define OBJ_ID_9 9
#define OBJ_ID_10 10
#define OBJ_ID_11 11
#define OBJ_ID_12 12
#define OBJ_ID_13 13
#define OBJ_ID_14 14
#define OBJ_ID_15 15
#define OBJ_ID_16 16
#define OBJ_ID_17 17
#define OBJ_ID_18 18
#define OBJ_ID_19 19
/* -------------------------------------------------------------------------------- */
/* -- FUNCTION RESULTS -- */
/* -------------------------------------------------------------------------------- */
#define UG_RESULT_FAIL -1
#define UG_RESULT_OK 0
/* -------------------------------------------------------------------------------- */
/* -- FONTS -- */
/* -------------------------------------------------------------------------------- */
/* Font structures */
typedef enum
{
FONT_TYPE_1BPP,
FONT_TYPE_8BPP,
FONT_TYPE_LIC_1BPP /* Fonts generated by the LCD Image Converter */
} FONT_TYPE;
typedef struct
{
FONT_TYPE font_type;
UG_U8 is_old_font; // This exists to maintain compatibility with old fonts, as they use code page 850 instead of Unicode
UG_U8 char_width;
UG_U8 char_height;
UG_U16 bytes_per_char;
UG_U16 number_of_chars;
UG_U16 number_of_offsets;
const UG_U8 * widths;
const UG_U8 * offsets;
const UG_U8 * data;
UG_FONT * font;
} UG_FONT_DATA;
#ifdef UGUI_USE_UTF8
typedef UG_U16 UG_CHAR;
#else
typedef char UG_CHAR;
#endif
/* for fonts generated by LCD Image Converter */
typedef const struct
{
UG_CHAR code;
UG_U8 width;
UG_U16 size;
const UG_U8 * data;
} UG_FONT_LIC_INFO;
typedef const struct
{
FONT_TYPE font_type; // FONT_TYPE_LIC_1BPP
UG_U8 char_width; // max width of char
UG_U8 char_height; // Char height
UG_U16 num_of_chars; // Number of chars
UG_CHAR first_char; // Min char code
UG_CHAR last_char; // Max char code
UG_FONT_LIC_INFO * info;
} UG_FONT_LIC;
/* -------------------------------------------------------------------------------- */
/* -- UNIVERSAL STRUCTURES -- */
/* -------------------------------------------------------------------------------- */
/* Area structure */
typedef struct
{
UG_S16 xs;
UG_S16 ys;
UG_S16 xe;
UG_S16 ye;
} UG_AREA;
/* Text structure */
typedef struct
{
char* str;
UG_FONT* font;
UG_AREA a;
UG_COLOR fc;
UG_COLOR bc;
UG_U8 align;
UG_S16 h_space;
UG_S16 v_space;
} UG_TEXT;
/* -------------------------------------------------------------------------------- */
/* -- BITMAP -- */
/* -------------------------------------------------------------------------------- */
typedef struct
{
const void* p;
const UG_U16 width;
const UG_U16 height;
const UG_U8 bpp;
const UG_U8 colors;
} UG_BMP;
#define BMP_BPP_1 (1<<0)
#define BMP_BPP_2 (1<<1)
#define BMP_BPP_4 (1<<2)
#define BMP_BPP_8 (1<<3)
#define BMP_BPP_16 (1<<4)
#define BMP_BPP_32 (1<<5)
#define BMP_RGB888 (1<<0)
#define BMP_RGB565 (1<<1)
#define BMP_RGB555 (1<<2)
/* -------------------------------------------------------------------------------- */
/* -- MESSAGE -- */
/* -------------------------------------------------------------------------------- */
/* Message structure */
typedef struct
{
UG_U8 type;
UG_U8 id;
UG_U8 sub_id;
UG_U8 event;
UG_OBJECT* src;
} UG_MESSAGE;
/* Message types */
#define MSG_TYPE_NONE 0
#define MSG_TYPE_WINDOW 1
#define MSG_TYPE_OBJECT 2
/* -------------------------------------------------------------------------------- */
/* -- TOUCH -- */
/* -------------------------------------------------------------------------------- */
#ifdef UGUI_USE_TOUCH
/* Touch structure */
typedef struct
{
UG_U8 state;
UG_S16 xp;
UG_S16 yp;
} UG_TOUCH;
#define TOUCH_STATE_PRESSED 1
#define TOUCH_STATE_RELEASED 0
#endif
/* -------------------------------------------------------------------------------- */
/* -- OBJECTS -- */
/* -------------------------------------------------------------------------------- */
/* Object structure */
struct S_OBJECT
{
UG_U8 state; /* object state */
#ifdef UGUI_USE_TOUCH
UG_U8 touch_state; /* object touch state */
#endif
void (*update) (UG_WINDOW*,UG_OBJECT*); /* pointer to object-specific update function */
UG_AREA a_abs; /* absolute area of the object */
UG_AREA a_rel; /* relative area of the object */
UG_U8 type; /* object type */
UG_U8 id; /* object ID */
UG_U8 event; /* object-specific events */
void* data; /* pointer to object-specific data */
};
/* Currently supported objects */
#define OBJ_TYPE_NONE 0
/* Standard object events */
#define OBJ_EVENT_NONE 0
#ifdef UGUI_USE_PRERENDER_EVENT
#define OBJ_EVENT_PRERENDER 1
#endif
#ifdef UGUI_USE_POSTRENDER_EVENT
#define OBJ_EVENT_POSTRENDER 2
#endif
#ifdef UGUI_USE_TOUCH
#define OBJ_EVENT_PRESSED 3
#define OBJ_EVENT_RELEASED 4
#endif
/* Object states */
#define OBJ_STATE_FREE (1<<0)
#define OBJ_STATE_VALID (1<<1)
#define OBJ_STATE_BUSY (1<<2)
#define OBJ_STATE_VISIBLE (1<<3)
#define OBJ_STATE_ENABLE (1<<4)
#define OBJ_STATE_UPDATE (1<<5)
#define OBJ_STATE_REDRAW (1<<6)
#ifdef UGUI_USE_TOUCH
#define OBJ_STATE_TOUCH_ENABLE (1<<7)
#endif
#define OBJ_STATE_INIT (OBJ_STATE_FREE | OBJ_STATE_VALID)
#ifdef UGUI_USE_TOUCH
/* Object touch states */
#define OBJ_TOUCH_STATE_CHANGED (1<<0)
#define OBJ_TOUCH_STATE_PRESSED_ON_OBJECT (1<<1)
#define OBJ_TOUCH_STATE_PRESSED_OUTSIDE_OBJECT (1<<2)
#define OBJ_TOUCH_STATE_RELEASED_ON_OBJECT (1<<3)
#define OBJ_TOUCH_STATE_RELEASED_OUTSIDE_OBJECT (1<<4)
#define OBJ_TOUCH_STATE_IS_PRESSED_ON_OBJECT (1<<5)
#define OBJ_TOUCH_STATE_IS_PRESSED (1<<6)
#define OBJ_TOUCH_STATE_INIT 0
#endif
/* -------------------------------------------------------------------------------- */
/* -- WINDOW -- */
/* -------------------------------------------------------------------------------- */
/* Title structure */
typedef struct
{
char* str;
UG_FONT* font;
UG_S8 h_space;
UG_S8 v_space;
UG_U8 align;
UG_COLOR fc;
UG_COLOR bc;
UG_COLOR ifc;
UG_COLOR ibc;
UG_U8 height;
} UG_TITLE;
/* Window structure */
struct S_WINDOW
{
UG_U8 objcnt;
UG_OBJECT* objlst;
UG_U8 state;
UG_COLOR fc;
UG_COLOR bc;
UG_S16 xs;
UG_S16 ys;
UG_S16 xe;
UG_S16 ye;
UG_U8 style;
UG_TITLE title;
void (*cb)( UG_MESSAGE* );
};
/* Window states */
#define WND_STATE_FREE (1<<0)
#define WND_STATE_VALID (1<<1)
#define WND_STATE_BUSY (1<<2)
#define WND_STATE_VISIBLE (1<<3)
#define WND_STATE_ENABLE (1<<4)
#define WND_STATE_UPDATE (1<<5)
#define WND_STATE_REDRAW_TITLE (1<<6)
/* Window styles */
#define WND_STYLE_2D (0<<0)
#define WND_STYLE_3D (1<<0)
#define WND_STYLE_HIDE_TITLE (0<<1)
#define WND_STYLE_SHOW_TITLE (1<<1)
/* -------------------------------------------------------------------------------- */
/* -- µGUI DRIVER -- */
/* -------------------------------------------------------------------------------- */
typedef struct
{
void* driver;
UG_U8 state;
} UG_DRIVER;
#define DRIVER_REGISTERED (1<<0)
#define DRIVER_ENABLED (1<<1)
/* Supported drivers */
#define NUMBER_OF_DRIVERS 4
#define DRIVER_DRAW_LINE 0
#define DRIVER_FILL_FRAME 1
#define DRIVER_FILL_AREA 2
#define DRIVER_DRAW_BMP 3
/* -------------------------------------------------------------------------------- */
/* -- µGUI CORE STRUCTURE -- */
/* -------------------------------------------------------------------------------- */
struct _UG_DEVICE;
typedef struct _UG_DEVICE UG_DEVICE;
typedef void ( *PixelSetFunc )( UG_S16, UG_S16, UG_COLOR );
typedef void ( *FlushFunc )( void );
typedef void ( *PushPixelsFunc )( UG_U16, UG_COLOR );
typedef PushPixelsFunc ( *DriverFillAreaFunct )( UG_S16, UG_S16, UG_S16, UG_S16 );
struct _UG_DEVICE {
UG_S16 x_dim;
UG_S16 y_dim;
PixelSetFunc pset;
FlushFunc flush;
};
typedef struct
{
UG_DEVICE *device;
#ifdef UGUI_USE_TOUCH
UG_TOUCH touch;
#endif
UG_WINDOW* next_window;
UG_WINDOW* active_window;
UG_WINDOW* last_window;
#if defined(UGUI_USE_CONSOLE)
struct
{
UG_S16 x_pos;
UG_S16 y_pos;
UG_S16 x_start;
UG_S16 y_start;
UG_S16 x_end;
UG_S16 y_end;
UG_COLOR fore_color;
UG_COLOR back_color;
} console;
#endif
UG_FONT *font;
UG_FONT_DATA currentFont;
UG_U8 transparent_font;
UG_S8 char_h_space;
UG_S8 char_v_space;
UG_COLOR fore_color;
UG_COLOR back_color;
UG_COLOR desktop_color;
UG_U8 state;
UG_DRIVER driver[NUMBER_OF_DRIVERS];
} UG_GUI;
#define UG_STATUS_WAIT_FOR_UPDATE (1<<0)
#include "ugui_button.h"
#include "ugui_checkbox.h"
#include "ugui_fonts.h"
#include "ugui_image.h"
#include "ugui_progress.h"
#include "ugui_textbox.h"
/* -------------------------------------------------------------------------------- */
/* -- PROTOTYPES -- */
/* -------------------------------------------------------------------------------- */
/* Classic functions */
UG_S16 UG_Init( UG_GUI* g, UG_DEVICE *device );
UG_S16 UG_SelectGUI( UG_GUI* g );
UG_GUI* UG_GetGUI( void );
void UG_FontSelect( UG_FONT* font );
void UG_FillScreen( UG_COLOR c );
void UG_FillFrame( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_COLOR c );
void UG_FillRoundFrame( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_S16 r, UG_COLOR c );
void UG_DrawMesh( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_U16 spacing, UG_COLOR c );
void UG_DrawFrame( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_COLOR c );
void UG_DrawRoundFrame( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_S16 r, UG_COLOR c );
void UG_DrawPixel( UG_S16 x0, UG_S16 y0, UG_COLOR c );
void UG_DrawCircle( UG_S16 x0, UG_S16 y0, UG_S16 r, UG_COLOR c );
void UG_FillCircle( UG_S16 x0, UG_S16 y0, UG_S16 r, UG_COLOR c );
void UG_DrawArc( UG_S16 x0, UG_S16 y0, UG_S16 r, UG_U8 s, UG_COLOR c );
void UG_DrawLine( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_COLOR c );
void UG_DrawTriangle( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_S16 x3, UG_S16 y3, UG_COLOR c );
void UG_FillTriangle( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_S16 x3, UG_S16 y3, UG_COLOR c );
void UG_PutString( UG_S16 x, UG_S16 y, char* str );
void UG_PutChar( UG_CHAR chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc );
#if defined(UGUI_USE_CONSOLE)
void UG_ConsoleCLS( void );
void UG_ConsolePutChar( UG_CHAR c );
void UG_ConsolePutString( char* str );
void UG_ConsoleSetArea( UG_S16 xs, UG_S16 ys, UG_S16 xe, UG_S16 ye );
void UG_ConsoleSetForecolor( UG_COLOR c );
void UG_ConsoleSetBackcolor( UG_COLOR c );
UG_COLOR UG_ConsoleGetForecolor( void );
UG_COLOR UG_ConsoleGetBackcolor( void );
#endif
void UG_SetForecolor( UG_COLOR c );
void UG_SetBackcolor( UG_COLOR c );
UG_COLOR UG_GetForecolor( void );
UG_COLOR UG_GetBackcolor( void );
UG_S16 UG_GetXDim( void );
UG_S16 UG_GetYDim( void );
void UG_FontSetHSpace( UG_U16 s );
void UG_FontSetVSpace( UG_U16 s );
void UG_FontSetTransparency( UG_U8 t );
UG_U8 UG_FontGetTransparency( void );
/* Miscellaneous functions */
void UG_WaitForUpdate( void );
void UG_Update( void );
void UG_DrawBMP( UG_S16 xp, UG_S16 yp, UG_BMP* bmp );
#ifdef UGUI_USE_TOUCH
void UG_TouchUpdate( UG_S16 xp, UG_S16 yp, UG_U8 state );
#endif
/* Driver functions */
void UG_DriverRegister( UG_U8 type, void* driver );
void UG_DriverEnable( UG_U8 type );
void UG_DriverDisable( UG_U8 type );
/* Internal API functions */
void _UG_PutText( UG_TEXT* txt );
UG_OBJECT* _UG_SearchObject( UG_WINDOW* wnd, UG_U8 type, UG_U8 id );
void _UG_DrawObjectFrame( UG_S16 xs, UG_S16 ys, UG_S16 xe, UG_S16 ye, UG_COLOR* p );
UG_OBJECT* _UG_GetFreeObject( UG_WINDOW* wnd );
UG_RESULT _UG_DeleteObject( UG_WINDOW* wnd, UG_U8 type, UG_U8 id );
#ifdef UGUI_USE_PRERENDER_EVENT
void _UG_SendObjectPrerenderEvent(UG_WINDOW *wnd,UG_OBJECT *obj);
#endif
#ifdef UGUI_USE_POSTRENDER_EVENT
void _UG_SendObjectPostrenderEvent(UG_WINDOW *wnd,UG_OBJECT *obj);
#endif
UG_U32 _UG_ConvertRGB565ToRGB888(UG_U16 c);
/* Window functions */
UG_RESULT UG_WindowCreate( UG_WINDOW* wnd, UG_OBJECT* objlst, UG_U8 objcnt, void (*cb)( UG_MESSAGE* ) );
UG_RESULT UG_WindowDelete( UG_WINDOW* wnd );
UG_RESULT UG_WindowShow( UG_WINDOW* wnd );
UG_RESULT UG_WindowHide( UG_WINDOW* wnd );
UG_RESULT UG_WindowResize( UG_WINDOW* wnd, UG_S16 xs, UG_S16 ys, UG_S16 xe, UG_S16 ye );
UG_RESULT UG_WindowAlert( UG_WINDOW* wnd );
UG_RESULT UG_WindowSetForeColor( UG_WINDOW* wnd, UG_COLOR fc );
UG_RESULT UG_WindowSetBackColor( UG_WINDOW* wnd, UG_COLOR bc );
UG_RESULT UG_WindowSetTitleTextColor( UG_WINDOW* wnd, UG_COLOR c );
UG_RESULT UG_WindowSetTitleColor( UG_WINDOW* wnd, UG_COLOR c );
UG_RESULT UG_WindowSetTitleInactiveTextColor( UG_WINDOW* wnd, UG_COLOR c );
UG_RESULT UG_WindowSetTitleInactiveColor( UG_WINDOW* wnd, UG_COLOR c );
UG_RESULT UG_WindowSetTitleText( UG_WINDOW* wnd, char* str );
UG_RESULT UG_WindowSetTitleTextFont( UG_WINDOW* wnd, UG_FONT* font );
UG_RESULT UG_WindowSetTitleTextHSpace( UG_WINDOW* wnd, UG_S8 hs );
UG_RESULT UG_WindowSetTitleTextVSpace( UG_WINDOW* wnd, UG_S8 vs );
UG_RESULT UG_WindowSetTitleTextAlignment( UG_WINDOW* wnd, UG_U8 align );
UG_RESULT UG_WindowSetTitleHeight( UG_WINDOW* wnd, UG_U8 height );
UG_RESULT UG_WindowSetXStart( UG_WINDOW* wnd, UG_S16 xs );
UG_RESULT UG_WindowSetYStart( UG_WINDOW* wnd, UG_S16 ys );
UG_RESULT UG_WindowSetXEnd( UG_WINDOW* wnd, UG_S16 xe );
UG_RESULT UG_WindowSetYEnd( UG_WINDOW* wnd, UG_S16 ye );
UG_RESULT UG_WindowSetStyle( UG_WINDOW* wnd, UG_U8 style );
UG_COLOR UG_WindowGetForeColor( UG_WINDOW* wnd );
UG_COLOR UG_WindowGetBackColor( UG_WINDOW* wnd );
UG_COLOR UG_WindowGetTitleTextColor( UG_WINDOW* wnd );
UG_COLOR UG_WindowGetTitleColor( UG_WINDOW* wnd );
UG_COLOR UG_WindowGetTitleInactiveTextColor( UG_WINDOW* wnd );
UG_COLOR UG_WindowGetTitleInactiveColor( UG_WINDOW* wnd );
char* UG_WindowGetTitleText( UG_WINDOW* wnd );
UG_FONT* UG_WindowGetTitleTextFont( UG_WINDOW* wnd );
UG_S8 UG_WindowGetTitleTextHSpace( UG_WINDOW* wnd );
UG_S8 UG_WindowGetTitleTextVSpace( UG_WINDOW* wnd );
UG_U8 UG_WindowGetTitleTextAlignment( UG_WINDOW* wnd );
UG_U8 UG_WindowGetTitleHeight( UG_WINDOW* wnd );
UG_S16 UG_WindowGetXStart( UG_WINDOW* wnd );
UG_S16 UG_WindowGetYStart( UG_WINDOW* wnd );
UG_S16 UG_WindowGetXEnd( UG_WINDOW* wnd );
UG_S16 UG_WindowGetYEnd( UG_WINDOW* wnd );
UG_U8 UG_WindowGetStyle( UG_WINDOW* wnd );
UG_RESULT UG_WindowGetArea( UG_WINDOW* wnd, UG_AREA* a );
UG_S16 UG_WindowGetInnerWidth( UG_WINDOW* wnd );
UG_S16 UG_WindowGetOuterWidth( UG_WINDOW* wnd );
UG_S16 UG_WindowGetInnerHeight( UG_WINDOW* wnd );
UG_S16 UG_WindowGetOuterHeight( UG_WINDOW* wnd );
#endif