Graphical User Interface
with Graphic Library
Version 3.26
Manual Rev. 0
Micriµm Technologies Corporation
www.micrium.com
Empowering Embedded Systems
µC/GUI
2
User's & reference manual for µC/GUI © 2002 Micrium Technologies Corporation
Disclaimer
Specifications written in this manual are believed to be accurate, but are not guaran-
teed to be entirely free of error. Specifications in this manual may be changed for
functional or performance improvements without notice. Please make sure your man-
ual is the latest edition. While the information herein is assumed to be accurate,
Micrium Technologies Corporation (the distributor) assumes no responsibility for any
errors or omissions and makes no warranties. The distributor specifically disclaims
any implied warranty of fitness for a particular purpose.
Copyright notice
The latest version of this manual is available as PDF file in the download area of our
website at www.micrium.com. You are welcome to copy and distribute the file as well
as the printed version. You may not extract portions of this manual or modify the PDF
file in any way without the prior written permission of Micrium Technologie Corpora-
tion. The software described in this document is furnished under a license and may
only be used or copied in accordance with the terms of such a license.
© 2002 Micrium Inc., Weston, Florida 33327-1848, U.S.A.
Trademarks
Names mentioned in this manual may be trademarks of their respective companies.
Brand and product names are trademarks or registered trademarks of their respec-
tive holders.
Registration
Please register the software via email. This way we can make sure you will receive
updates or notifications of updates as soon as they become available.
For registration please provide the following information:
• Your full name and the name of your supervisor
• Your company name
•Your job title
• Your email address and telephone number
• Company name and address
• Your company's main phone number
• Your company's web site address
• Name and version of the product
Please send this information to: licensing@micrium.com
Contact address
Micrium Inc.
949 Crestview Circle
Weston, FL 33327-1848
U.S.A.
Phone : +1 954 217 2036
FAX : +1 954 217 2037
WEB : www.micrium.com
Email: support@micrium.com
Manual versions
This manual describes the software version 3.26. If any error occurs, please inform
us and we will try to help you as soon as possible.
User's & reference manual for µC/GUI © 2002 Micrium Technologies Corporation
3
For further information on topics or routines not yet specified, please contact us.
Print date:
8/28/02
Manual version Date By Explanation
3.26R0 020820 KG Chapter 18 (Touch-Screen Support) changed to Input Devices;
mouse and keyboard support added; chapter restructured.
Slight modifications to section 13.10 (Scroll bar widget).
3.24R4 020809 KG Additional macros added to Chapter 18 (Touch-Screen Sup-
port).
Chapter 3 (Simulator) modified; addition of use of simulator
with trial version of µC/GUI.
Section 1.7 (Data types) revised.
3.24R3 020802 KG Additional macros added to sections 22.8 (LCDMem) and 22.9
(LCDMemC); same macros added to Chapter 20 (Low-Level
Configuration).
3.24R2 020801 KG Section 2.3 (Creating a library) revised, table and diagram
added.
3.24R1 020730 KG Minor changes throughout, including addition of () brackets to
all API functions.
3.24R0 020726 KG Chapter 9 (Colors) revised; modes 1, 2, and 444 added.
Chapter 11 (Execution Model: Single Task/Multitask) added.
Chapter 1 (Introduction to µC/GUI) revised.
Chapter 2 (Getting Started) revised.
Chapter 18 (Time-Related Functions) changed to Timing and
Execution-Related Functions; GUI_Exec() and GUI_Exec1()
added.
Small formatting changes throughout.
3.22R1 020723
020719
KG
RS
Chapter 18 (µC/GUI in Multitasking Environments) merged with
Chapter 22 (High-Level Configuration).
Chapter 4 (Tutorial) merged with Chapter 2 (Getting Started).
Chapter 10 (Colors) revised, color mode table added.
GUI_X_ explanations added.
Widget description enhanced, screen shots added.
3.22R0 020716 KG Chapter 13 (Window Objects) revised; SCROLLBAR, SLIDER,
RADIO and TEXT widgets added.
3.20R0 020627
020620
020618
JE
KG
KG
Chapter 2 (Getting Started) revised.
Chapter 14 (Dialogs) revised.
Chapter 13 (Window Objects) revised; CHECKBOX widgets
added.
Chapter 14 (Dialogs) added.
3.14R3 020618
020611
020531
020524
020507
KG
KG
KG
KG
KG
Chapter 3 (Simulator) revised.
Chapter 20 (Low-Level Configuration) revised.
Chapter 22 (LCD Drivers) revised.
Chapter 12 (The Window Manager) revised.
Version control table added.
3.14R2 020503 KG Chapter 11 (Memory Devices) revised.
Chapter 14 (Antialiasing) revised.
Chapter 9 (Bitmap Converter) revised.
3.14R1 020405 KG Completely revised for language/grammar.
1.5 (Typographic conventions) updated.
Chapter 8 changed to 7.6 (Font converter).
Index revised.
4
User's & reference manual for µC/GUI © 2002 Micrium Technologies Corporation
Software versions
Software
version
Date By Explanation
3.26 020820 RS Mouse and keyboard support added.
3.24 020726 RS GUI_Exec() and GUI_Exec1() added.
3.22 020719 RS Support for 444 color mode added
Scrollbars, Radio buttons added.
3.20 020618 RS Dialog boxes added.
Slider added.
Check box added.
3D effects added.
User's & reference manual for µC/GUI © 2002 Micrium Technologies Corporation
5
1 Introduction to µC/GUI .....................................................................................................9
1.1 µC/GUI ....................................................................................................9
1.2 Purpose of this document ...........................................................................9
1.3 Assumptions .............................................................................................9
1.4 How to use this manual ............................................................................10
1.5 Typographic conventions for syntax ...........................................................10
1.6 Features.................................................................................................10
1.7 Samples and demos.................................................................................12
1.8 Screen and coordinates ............................................................................12
1.9 How to connect the LCD to the microcontroller ............................................12
1.10 Data types..............................................................................................13
1.11 Types of configuration macros ...................................................................14
2 Getting Started...............................................................................................................15
2.1 Recommended directory structure..............................................................16
2.2 Configuring µC/GUI.................................................................................. 17
2.3 Using µC/GUI with your target system........................................................17
2.4 C files to include in the project ..................................................................17
2.5 Creating a library.....................................................................................18
3 Simulator........................................................................................................................19
3.1 Understanding the simulator .....................................................................20
3.2 Using the simulator..................................................................................21
3.3 The viewer..............................................................................................21
3.4 Device simulation and other advanced features ...........................................22
3.5 API reference: simulator...........................................................................24
4 Tutorial: Using µC/GUI with Target Hardware ...............................................................29
4.1 Basics ....................................................................................................29
4.2 How to use µC/GUI .................................................................................. 30
4.3 The "Hello world" sample program .............................................................30
4.4 Adding functionality to the "Hello world" program ........................................31
5 Displaying Text ..............................................................................................................33
5.1 API reference: text ..................................................................................33
5.2 Basic routines .........................................................................................34
5.3 Routines to display text ............................................................................ 34
5.4 Selecting text drawing modes....................................................................38
5.5 Selecting text alignment...........................................................................40
5.6 Setting the current text position ................................................................ 42
5.7 Retrieving the current text position ............................................................43
5.8 Routines to clear a window or parts of it .....................................................43
Table of Contents