没有合适的资源?快使用搜索试试~ 我知道了~
首页 ucGUI 5.26 用户手册:官方英文版用户与参考指南
ucGUI 5.26 用户手册:官方英文版用户与参考指南
需积分: 0 14 下载量 38 浏览量
更新于2024-07-22
收藏 12.86MB PDF 举报
"ucGUI 5.26 用户手册"
ucGUI是一个嵌入式图形用户界面库,专为微控制器(µC)设计,提供了一套完整的解决方案,用于在小型嵌入式系统上创建图形用户界面。这个用户手册是V5.26.00版本的官方文档,详细介绍了ucGUI的功能、用法以及相关的编程接口。
ucGUI的主要特点包括:
1. **跨平台兼容性**:ucGUI支持多种微控制器和图形显示硬件,允许开发者在不同的硬件平台上实现一致的用户体验。
2. **高效内存管理**:针对嵌入式环境的限制,ucGUI优化了内存使用,能够在有限的RAM和ROM条件下运行。
3. **丰富的图形功能**:ucGUI提供了多种图形元素,如按钮、文本框、列表视图、滑块、进度条、位图、字体等,以及图形操作如旋转、缩放和颜色处理。
4. **事件驱动机制**:ucGUI采用事件驱动模型,通过处理用户的触摸或按键输入来更新屏幕显示,提高了响应速度和交互性。
5. **多线程支持**:ucGUI可以与实时操作系统(RTOS)集成,支持多任务环境下同时进行GUI操作和其他系统任务。
6. **易于扩展**:ucGUI提供了灵活的API,使得开发者能够根据需求添加自定义控件和功能。
手册中的内容涵盖了ucGUI的安装、配置、初始化,以及如何使用基本的图形对象和控件。例如,它会指导开发者如何设置显示设备,加载字体,创建窗口和控件,以及处理触摸输入。此外,手册还详细解释了ucGUI的事件处理机制,如事件队列和事件回调函数。
对于开发者来说,ucGUI的使用通常涉及以下几个步骤:
1. **硬件适配**:配置ucGUI以适应特定的显示控制器和触摸屏驱动。
2. **初始化**:在应用程序启动时调用ucGUI的初始化函数,设置必要的参数。
3. **创建GUI元素**:使用ucGUI提供的函数创建窗口、控件和图形对象,并设置其属性。
4. **事件处理**:编写事件处理函数,响应用户的输入。
5. **主循环**:在主循环中,ucGUI会处理事件,更新屏幕并处理动画效果。
6. **定制和扩展**:根据项目需求,可能需要开发自定义控件或扩展ucGUI的功能。
ucGUI 5.26用户手册是开发者在利用ucGUI开发嵌入式图形用户界面时的重要参考资料,它详细阐述了ucGUI的各个方面,从基本概念到高级功能,帮助开发者高效地实现美观且功能丰富的嵌入式界面。
16
User & Reference Guide for µC/GUI V5.26 © 2002 - 2014 Micrium
3.5.2 Using the simulation library ...................................................................... 65
3.5.2.1 Modifying WinMain .................................................................................. 65
3.5.2.2 Example application................................................................................. 66
3.5.3 Integration into the RTOS Simulation ......................................................... 67
3.5.3.1 WinMain................................................................................................. 67
3.5.3.2 Target program (main) ............................................................................ 68
3.5.4 GUI simulation API .................................................................................. 69
4 Viewer ...........................................................................................................................................73
4.1 Using the viewer ..................................................................................... 74
4.1.1 Using the simulation and the viewer .......................................................... 74
4.1.2 Using the viewer with virtual pages ........................................................... 75
4.1.3 Always on top......................................................................................... 75
4.1.4 Open further windows of the display output ................................................ 75
4.1.5 Zooming ................................................................................................ 76
4.1.6 Copy the output to the clipboard ............................................................... 76
4.1.7 Using the viewer with multiple displays ...................................................... 77
4.1.8 Using the viewer with multiple layers ......................................................... 77
5 Displaying Text .............................................................................................................................79
5.1 Basic routines......................................................................................... 80
5.2 Drawing modes....................................................................................... 80
5.3 Position ................................................................................................. 81
5.4 Text API................................................................................................. 82
5.4.1 Displaying text........................................................................................ 83
5.4.2 Drawing modes....................................................................................... 90
5.4.3 Alignment .............................................................................................. 91
5.4.4 Position ................................................................................................. 92
6 Displaying Values .........................................................................................................................93
6.1 Value API............................................................................................... 94
6.2 Displaying decimal values......................................................................... 95
6.3 Displaying floating point values ................................................................. 99
6.4 Displaying binary values..........................................................................102
6.5 Displaying hexadecimal values.................................................................103
6.6 Version of µC/GUI ..................................................................................104
7 2-D Graphic Library....................................................................................................................105
7.1 Graphic API ...........................................................................................106
7.1.1 Drawing related functions........................................................................109
7.1.2 Basic drawing routines............................................................................112
7.1.3 Alpha blending.......................................................................................118
7.1.4 Drawing bitmaps....................................................................................121
7.1.5 Drawing streamed bitmaps......................................................................123
7.1.6 Drawing lines.........................................................................................132
7.1.7 Drawing polygons...................................................................................136
7.1.8 Drawing circles ......................................................................................140
7.1.9 Drawing ellipses.....................................................................................141
7.1.10 Drawing arcs .........................................................................................142
7.1.11 Drawing graphs .....................................................................................143
7.1.12 Drawing pie charts .................................................................................144
7.1.13 Saving and restoring the GUI-context .......................................................145
7.1.14 Info about screen changes.......................................................................145
8 Displaying bitmap files ...............................................................................................................149
8.1 BMP file support.....................................................................................150
8.1.1 Supported formats .................................................................................150
8.1.2 BMP API................................................................................................150
8.2 JPEG file support....................................................................................156
User & Reference Guide for µC/GUI V5.26 © 2002 - 2014 Micrium
17
8.2.1 Supported JPEG compression methods ..................................................... 156
8.2.2 Converting a JPEG file to C source............................................................ 156
8.2.3 Displaying JPEG files .............................................................................. 156
8.2.4 Memory usage ...................................................................................... 157
8.2.5 Progressive JPEG files ............................................................................ 157
8.2.6 JPEG API .............................................................................................. 157
8.3 GIF file support ..................................................................................... 162
8.3.1 Converting a GIF file to C source ............................................................. 162
8.3.2 Displaying GIF files ................................................................................ 162
8.3.3 Memory usage ...................................................................................... 162
8.3.4 GIF API ................................................................................................ 162
8.4 PNG file support .................................................................................... 171
8.4.1 Converting a PNG file to C source ............................................................ 171
8.4.2 Displaying PNG files ............................................................................... 171
8.4.3 Memory usage ...................................................................................... 171
8.4.4 PNG API ............................................................................................... 171
8.5 Getting data with the ...Ex() functions...................................................... 175
9 Bitmap Converter ........................................................................................................................177
9.1 What it does ......................................................................................... 178
9.2 Loading a bitmap................................................................................... 178
9.2.1 Supported input file formats.................................................................... 178
9.2.2 Loading from a file................................................................................. 178
9.2.3 Using the clipboard ................................................................................ 179
9.3 Color conversion.................................................................................... 179
9.4 Dithering.............................................................................................. 180
9.5 Using a custom palette........................................................................... 180
9.5.1 Saving a palette file ............................................................................... 181
9.5.2 Palette file format.................................................................................. 181
9.5.3 Palette files for fixed palette modes.......................................................... 181
9.5.4 Converting a bitmap .............................................................................. 181
9.6 Generating C files from bitmaps............................................................... 181
9.6.1 Supported bitmap formats ...................................................................... 182
9.6.2 Palette information ................................................................................ 182
9.6.3 Transparency ........................................................................................ 183
9.6.4 Alpha blending ...................................................................................... 183
9.6.5 Selecting the best format........................................................................ 184
9.6.6 Saving the file....................................................................................... 185
9.7 Generating C stream files ....................................................................... 186
9.8 Compressed bitmaps.............................................................................. 186
9.9 Creating animated sprites / cursors.......................................................... 187
9.10 Command line usage.............................................................................. 189
9.10.1 Format for commands ............................................................................ 189
9.10.2 Command line options............................................................................ 189
9.11 Example of a converted bitmap ............................................................... 191
10 Fonts ..........................................................................................................................................195
10.1 Introduction.......................................................................................... 196
10.2 Font types ............................................................................................ 196
10.3 Font formats ......................................................................................... 198
10.3.1 C file format ......................................................................................... 198
10.3.2 System Independent Font (SIF) format..................................................... 198
10.3.3 External Bitmap Font (XBF) format .......................................................... 199
10.3.4 iType font engine support ....................................................................... 200
10.3.5 TrueType Font (TTF) format .................................................................... 201
10.4 Converting a TTF file to C source ............................................................. 202
10.5 Declaring custom fonts........................................................................... 202
10.6 Selecting a font ..................................................................................... 202
10.7 Font API............................................................................................... 203
10.8 C file related font functions ..................................................................... 204
18
User & Reference Guide for µC/GUI V5.26 © 2002 - 2014 Micrium
10.9 ’SIF’ file related font functions..................................................................206
10.10 ’TTF’ file related font functions .................................................................208
10.11 ’XBF’ file related font functions.................................................................212
10.12 Common font-related functions ................................................................214
10.13 Character sets .......................................................................................218
10.13.1 ASCII ...................................................................................................218
10.13.2 ISO 8859-1 Western Latin character set....................................................218
10.13.3 Unicode ................................................................................................220
10.14 Font Converter.......................................................................................221
10.14.1 Adding fonts..........................................................................................221
10.15 Standard fonts.......................................................................................221
10.15.1 Font identifier naming convention.............................................................222
10.15.2 Font file naming convention.....................................................................223
10.15.3 Measurement, ROM-size and character set of fonts .....................................223
10.15.4 Proportional fonts...................................................................................224
10.15.4.1 Overview ..............................................................................................224
10.15.4.2 Font details ...........................................................................................224
10.15.4.3 Characters ............................................................................................226
10.15.5 Proportional fonts, framed.......................................................................233
10.15.5.1 Overview ..............................................................................................233
10.15.5.2 Font details ...........................................................................................233
10.15.5.3 Characters ............................................................................................233
10.15.6 Monospaced fonts ..................................................................................234
10.15.6.1 Overview ..............................................................................................234
10.15.6.2 Font details ...........................................................................................234
10.15.6.3 Characters ............................................................................................235
10.15.7 Digit fonts (proportional).........................................................................241
10.15.7.1 Overview ..............................................................................................241
10.15.7.2 Font details ...........................................................................................241
10.15.7.3 Characters ............................................................................................241
10.15.8 Digit fonts (monospaced) ........................................................................243
10.15.8.1 Overview ..............................................................................................243
10.15.8.2 Font details ...........................................................................................243
10.15.8.3 Characters ............................................................................................243
11 Font Converter...........................................................................................................................245
11.1 Requirements ........................................................................................246
11.2 Using the Font Converter.........................................................................247
11.2.1 Creating an µC/GUI font file from a Windows font.......................................247
11.2.2 Font generation options dialog .................................................................249
11.2.2.1 Type of font to generate..........................................................................249
11.2.2.2 Encoding...............................................................................................250
11.2.2.3 Antialiasing ...........................................................................................250
11.2.3 Font Dialog............................................................................................250
11.2.3.1 Font, Font Style, and Size .......................................................................251
11.2.3.2 Script ...................................................................................................251
11.2.3.3 Unit of Size ...........................................................................................251
11.2.4 User Interface........................................................................................251
11.2.4.1 Selecting the current character ................................................................251
11.2.4.2 Toggling character status ........................................................................251
11.2.4.3 Selecting pixels......................................................................................252
11.2.4.4 Modifying character bits ..........................................................................252
11.2.4.5 Operations ............................................................................................252
11.2.4.6 Modifying the viewing mode ....................................................................253
11.3 Options.................................................................................................253
11.3.1 Saving the font ......................................................................................255
11.3.1.1 Creating a C file .....................................................................................255
11.3.1.2 Creating a System Independent Font (SIF) ................................................255
11.3.1.3 Creating an External Binary Font (XBF) .....................................................255
11.3.2 Modifying an existing C font file................................................................256
11.3.3 Merging fonts with existing C font files ......................................................257
User & Reference Guide for µC/GUI V5.26 © 2002 - 2014 Micrium
19
11.4 Pattern files .......................................................................................... 258
11.4.1 Creating pattern files using Notepad......................................................... 258
11.4.2 Creating pattern files using the Font Converter................................... 258
11.4.3 Enabling characters using a pattern file............................................. 258
11.5 Supported output modes ........................................................................ 259
11.5.1 Standard mode ..................................................................................... 259
11.5.2 Antialiased modes.................................................................................. 259
11.6 Command line options............................................................................ 260
11.6.1 Table of commands................................................................................ 260
11.6.2 Execution examples ............................................................................... 261
11.7 Font Examples ...................................................................................... 262
11.7.1 Resulting C code, standard mode............................................................. 262
11.8 Resulting C code, 2 bpp antialiased mode ................................................. 263
11.9 Resulting C code, 4 bpp antialiased mode ................................................. 264
11.10 Resulting C code, extended mode ............................................................ 265
12 Movies .......................................................................................................................................267
12.1 Introduction.......................................................................................... 268
12.2 Requirements........................................................................................ 268
12.3 Creating JPEG files with FFmpeg.exe ........................................................ 268
12.4 Creating an EMF .................................................................................... 269
12.5 Modifying the conversion result ............................................................... 270
12.6 Using JPEG2Movie.................................................................................. 270
12.7 Movies API............................................................................................ 271
13 Colors ........................................................................................................................................277
13.1 Predefined colors................................................................................... 278
13.2 The color bar test routine ....................................................................... 278
13.3 Fixed palette modes............................................................................... 279
13.4 Detailed fixed palette mode description .................................................... 281
13.5 Application defined color conversion......................................................... 292
13.6 Custom palette mode ............................................................................. 293
13.6.1 Look-up table API .................................................................................. 294
13.7 Gamma correction ................................................................................. 295
13.8 Color API.............................................................................................. 296
13.8.1 Basic functions ...................................................................................... 296
13.8.2 Conversion functions.............................................................................. 298
14 Memory Devices .......................................................................................................................301
14.1 Using Memory Devices: Illustration .......................................................... 302
14.2 Supported color depth (bpp) ................................................................... 303
14.3 Memory Devices and the Window Manager................................................ 303
14.4 Memory Devices and multiple layers......................................................... 303
14.5 Memory requirements ............................................................................ 304
14.6 Performance ......................................................................................... 304
14.7 Basic functions ...................................................................................... 305
14.8 In order to be able to use Memory Devices................................................ 305
14.9 Multi layer / multi display configuration .................................................... 305
14.10 Configuration options ............................................................................. 305
14.11 Memory Device API................................................................................ 306
14.11.1 Basic functions ...................................................................................... 308
14.11.2 Banding Memory Device ......................................................................... 327
14.11.3 Auto device object ................................................................................. 328
14.11.4 Measurement device object..................................................................... 330
14.11.5 Animation functions ............................................................................... 332
14.11.6 Animation functions (Window Manager required)........................................ 334
14.11.7 Blending and Blurring functions ............................................................... 337
14.11.8 Blurring and Blending functions (Window Manager required)........................ 340
15 Execution Model: Single Task / Multitask................................................................................343
20
User & Reference Guide for µC/GUI V5.26 © 2002 - 2014 Micrium
15.1 Supported execution models....................................................................344
15.2 Single task system (superloop) ................................................................344
15.2.1 Description............................................................................................344
15.2.2 Superloop example (without µC/GUI)........................................................344
15.2.3 Advantages ...........................................................................................344
15.2.4 Disadvantages .......................................................................................344
15.2.5 Using µC/GUI ........................................................................................345
15.2.6 Superloop example (with µC/GUI) ............................................................345
15.3 Multitask system: one task calling µC/GUI .................................................345
15.3.1 Description............................................................................................345
15.3.2 Advantages ...........................................................................................345
15.3.3 Disadvantages .......................................................................................345
15.3.4 Using µC/GUI ........................................................................................346
15.4 Multitask system: multiple tasks calling µC/GUI .........................................346
15.4.1 Description............................................................................................346
15.4.2 Advantages ...........................................................................................346
15.4.3 Disadvantages .......................................................................................346
15.4.4 Using µC/GUI ........................................................................................346
15.4.5 Recommendations..................................................................................347
15.4.6 Example ...............................................................................................347
15.5 Configuration functions for multitasking support.........................................347
15.6 Configuration macros for multitasking support ...........................................349
15.7 Kernel interface API................................................................................351
15.8 Examples ..............................................................................................353
16 The Window Manager (WM)....................................................................................................355
16.1 Description of terms ...............................................................................356
16.2 Callback mechanism, invalidation, rendering and keyboard input ..................357
16.2.1 Rendering without callbacks.....................................................................357
16.2.2 Rendering using callbacks .......................................................................358
16.2.3 Overwriting callback functions..................................................................358
16.2.4 Background window redrawing and callback...............................................359
16.2.5 Invalidation...........................................................................................360
16.2.6 Rendering of transparent windows............................................................360
16.2.7 Automatic use of Memory Devices ............................................................360
16.2.8 Automatic use of multiple frame buffers ....................................................361
16.2.9 Automatic use of display driver cache .......................................................361
16.2.10 Keyboard input ......................................................................................361
16.3 Motion support.......................................................................................361
16.3.1 Enabling motion support of the WM ..........................................................361
16.3.2 Basic motion support for a window ...........................................................361
16.3.2.1 Using creation flags ................................................................................361
16.3.2.2 Using API function..................................................................................362
16.3.3 Advanced motion support........................................................................362
16.3.3.1 WM_MOTION message and WM_MOTION_INFO..........................................362
16.3.4 Motion support for circular moves.............................................................363
16.4 ToolTips................................................................................................363
16.4.1 How they work.......................................................................................363
16.4.2 Creating ToolTips ...................................................................................363
16.4.2.1 Creating ToolTips for dialog items.............................................................364
16.4.2.2 Creating ToolTips for simple windows........................................................364
16.5 Messages ..............................................................................................365
16.5.1 Message structure ..................................................................................365
16.5.2 List of messages ....................................................................................365
16.5.3 System-defined messages.......................................................................366
16.5.4 Pointer input device (PID) messages.........................................................369
16.5.5 System-defined notification codes ............................................................374
16.5.6 Application-defined messages ..................................................................374
16.6 Configuration options..............................................................................375
16.7 WM API.................................................................................................376
16.7.1 Using the WM API functions.....................................................................378
剩余1205页未读,继续阅读
点击了解资源详情
点击了解资源详情
点击了解资源详情
2014-11-26 上传
2011-02-18 上传
2012-12-04 上传
2022-09-20 上传
2022-09-22 上传
2010-11-22 上传
DoubleK.O.
- 粉丝: 6
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- PureMVC AS3在Flash中的实践与演示:HelloFlash案例分析
- 掌握Makefile多目标编译与清理操作
- STM32-407芯片定时器控制与系统时钟管理
- 用Appwrite和React开发待办事项应用教程
- 利用深度强化学习开发股票交易代理策略
- 7小时快速入门HTML/CSS及JavaScript基础教程
- CentOS 7上通过Yum安装Percona Server 8.0.21教程
- C语言编程:锻炼计划设计与实现
- Python框架基准线创建与性能测试工具
- 6小时掌握JavaScript基础:深入解析与实例教程
- 专业技能工厂,培养数据科学家的摇篮
- 如何使用pg-dump创建PostgreSQL数据库备份
- 基于信任的移动人群感知招聘机制研究
- 掌握Hadoop:Linux下分布式数据平台的应用教程
- Vue购物中心开发与部署全流程指南
- 在Ubuntu环境下使用NDK-14编译libpng-1.6.40-android静态及动态库
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功