uCGUI中文手册.pdf
μC/GUI手册
第1章 µC/GUI的介绍
µC/GUI
本文档的目的
假设
1.1 需求
目标系统(硬件)
小的系统(没有视窗管理器)
大的系统(包括视窗管理器和控件)
开发环境(编译程序)
1.2 µC/GUI 的特点
一般特点
图库
字体
字符串/数值输出程序
视窗管理器(WM)
可选择用于PC外观的控件
触摸屏和鼠标支持
PC工具
范例和演示
1.3 估价板
评估板
1.4 如何使用本手册
排版上的语法约定
1.5 屏幕和坐标
1.6 如何连接LCD到微控制器
带有存储映像LCD控制器的LCD
带有LCD控制器的LCD连接到端口/缓冲区
特殊方案:没有LCD控制器的LCD
1.7 数据类型
Introduction to µC/GUI
µC/GUI
Purpose of this document
Assumptions
1.1 Requirements
Target system (hardware)
Development environment (compiler)
1.2 µC/GUI features
Samples and demos
1.3 Evaluation borad
1.4 How to use this manual
Typographic conventions for syntax
1.5 Screen and coordinates
1.6 How to connect the LCD to the microcontroller
1.7 uData types
第2章 入门指南
2.1推荐的结构
子目录
“Include”目录
2.2 向目标程序加入µC/GUI
2.3 建立一个库
2.4 将µC/GUI的“C”文件加入工程中
2.5 配置µC/GUI
配置宏的类型
2.6 初始化µC/GUI
2.7 在目标硬件上使用µC/GUI
2.8 “Hello World”范例程序
给“Hello Word”程序增加功能
Getting Started
2.1 Recommended directory structure
Subdirectories
Include directories
2.2 Adding µC/GUI to the target program
2.3 Creating a library
2.4 µC/GUI "C" files to include in the project
2.5 Configuring µC/GUI
Types of configuration macros
2.6 Initializing µC/GUI
2.7 Using µC/GUI with target hardware
2.8 The "Hello world" sample program
Adding functionality to the "Hello world" program
第3章 仿真器
3.1 理解仿真器
3.2 在评估版µC/GUI中使用仿真器
版本
目录结构
Visual C++工作区
编译演示程序
编译范例程序
3.3 使用µC/GUI 源代码的仿真器
目录结构
Visual C++工作区
编译你的应用程序
3.4 观察器
3.5 设备仿真及其它高级特性
Hardkey 仿真
3.6 仿真器API
SIM_SetLCDPos()
SIM_SetTransColor()
SIM_HARDKEY_GetNum()
SIM_HARDKEY_GetState()
SIM_HARDKEY_SetCallback()
SIM_HARDKEY_SetMode()
SIM_HARDKEY_SetState()
Simulator
3.1 Understanding the simulator
3.2 Using the simulator in the trial µC/GUI version
Directory structure
Visual C++ workspace
Compiling the demo program
Compiling the samples
3.3 Using the simulator with the µC/GUI source
Directory structure
Visual C++ workspace
Compiling for your application
3.4 The viewer
3.5 Device simulation and other advanced features
Hardkey simulation
3.6 Simulator API
SIM_SetLCDPos()
SIM_SetTransColor()
SIM_HARDKEY_GetNum()
SIM_HARDKEY_GetState()
SIM_HARDKEY_SetCallback()
SIM_HARDKEY_SetMode()
SIM_HARDKEY_SetState()
第4章 文本显示
4.1 基本函数
控制字符
在一个选定坐标放置文本
4.2 文本API
4.3 显示文本的函数
GUI_DispChar()
GUI_DispCharAt()
GUI_DispChars()
GUI_DispString()
GUI_DispStringAt()
GUI_DispStringAtCEOL()
GUI_DispStringInRect()
GUI_DispStringLen()
4.4 选择文本的绘制模式
正常文本
反转文本
透明文本
异或文本
透明反转文本
范例
GUI_SetTextMode()
4.5 文本对齐的选择
GUI_GetTextAlign()
GUI_SetLBorder()
GUI_SetTextAlign()
4.6 设置当前文本坐标
GUI_GotoXY(), GUI_GotoX(), GUI_GotoY()
4.7 找回当前文本坐标
GUI_GetDispPosX()
GUI_GetDispPosY()
4.8 清除一个视窗或其部分的函数
GUI_Clear()
GUI_DispCEOL()
Displaying Text
4.1 Basic routines
4.2 Text API
4.3 Routines to display text
GUI_DispChar()
GUI_DispCharAt()
GUI_DispChars()
GUI_DispString()
GUI_DispStringAt()
GUI_DispStringAtCEOL()
GUI_DispStringInRect()
GUI_DispStringLen()
4.4 Selecting text drawing modes
GUI_SetTextMode()
4.5 Selecting text alignment
GUI_GetTextAlign()
GUI_SetLBorder()
GUI_SetTextAlign()
4.6 Setting the current text position
GUI_GotoXY(), GUI_GotoX(), GUI_GotoY()
4.7 Retrieving the current text position
GUI_GetDispPosX()
GUI_GetDispPosY()
4.8 Routines to clear a window or parts of it
GUI_Clear()
GUI_DispCEOL()
第5章 显示数值
5.1 数值API
5.2 显示十进制数值
GUI_DispDec()
GUI_DispDecAt()
GUI_DispDecMin()
GUI_DispDecShift()
GUI_DispDecSpace()
GUI_DispSDec()
GUI_DispSDecShift()
5.3 显示浮点数
GUI_DispFloat()
GUI_DispFloatFix()
GUI_DispFloatMin()
GUI_DispSFloatFix()
GUI_DispSFloatMin()
5.4 显示二进制数值
GUI_DispBin()
GUI_DispBinAt()
5.5 显示十六进制数值
GUI_DispHex()
GUI_DispHexAt()
5.6 µC/GUI的版本
GUI_GetVersionString()
Displaying Values
5.1 Value API
5.2 Displaying decimal values
GUI_DispDec()
GUI_DispDecAt()
GUI_DispDecMin()
GUI_DispDecShift()
GUI_DispDecSpace()
GUI_DispSDec()
GUI_DispSDecShift()
5.3 Displaying floating-point values
GUI_DispFloat()
GUI_DispFloatFix()
GUI_DispFloatMin()
GUI_DispSFloatFix()
GUI_DispSFloatMin()
5.4 Displaying binary values
GUI_DispBin()
GUI_DispBinAt()
5.5 Displaying hexadecimal values
GUI_DispHex()
GUI_DispHexAt()
5.6 Version of µC/GUI
GUI_GetVersionString()
第6章 2-D图形库
6.1 API参考:图形
6.2 绘图模式
与GUI_DRAWMODE_XOR有关的限制
GUI_SetDrawMode
6.3 基本绘图函数
GUI_DrawPixel
GUI_DrawPoint
GUI_FillRect
GUI_InvertRect
6.4 绘制位图
GUI_DrawBitmap
GUI_DrawBitmapExp
GUI_DrawBitmapMag
GUI_DrawStreamedBitmap
6.5 绘线
GUI_DrawHLine
GUI_DrawLine
GUI_DrawLineRel
GUI_DrawLineTo
GUI_DrawPolyLine
GUI_DrawVLine
6.6 绘多边形
GUI_DrawPolygon
GUI_EnlargePolygon
GUI_FillPolygon
GUI_MagnifyPolygon
GUI_RotatePolygon
6.7 绘圆
GUI_DrawCircle
GUI_FillCircle
6.8 绘椭圆
GUI_DrawEllipse
GUI_FillEllipse
6.9 绘制圆弧
GUI_DrawArc
2-D Graphic Library
6.1 Graphic API
6.2 Drawing modes
6.3 Basic drawing routines
6.4 Drawing bitmaps
6.5 Drawing lines
6.6 Drawing polygons
6.7 Drawing circles
6.8 Drawing ellipses
6.9 Drawing arcs
6.10 BMP file support
第7章 字体
7.1 有效字体
增加字体
范例
选择字体
µC/GUI 的兼容性
7.2 字体API
7.3 一种字体的选择
GUI_GetFont()
GUI_SetFont()
7.4 字体相关函数
GUI_GetCharDistX()
GUI_GetFontDistY()
GUI_GetFontInfo()
GUI_GetFontSizeY()
GUI_GetStringDistX()
GUI_GetYDistOfFont()
GUI_GetYSizeOfFont()
GUI_IsInFont()
7.5 字符设置
ASCII
ISO 8859-1 西文、拉丁文字符设置
描述
字符Char
Unicode
7.6 字体转换器
Standard Fonts
26.1 Font identifier naming convention
26.2 Font file naming convention
26.3 Measurement, ROM-size and character set of fonts
26.4 Proportional fonts
GUI_Font8_ASCII
GUI_Font8_1
GUI_Font10_ASCII
GUI_Font10_1
GUI_Font10S_ASCII
GUI_Font10S_1
GUI_Font13_ASCII
GUI_Font13_1
GUI_Font13H_ASCII
GUI_Font13H_1
GUI_Font13HB_ASCII
GUI_Font13HB_1
GUI_Font16_ASCII
GUI_Font16_1
GUI_Font16_HK
GUI_Font16_1HK
GUI_Font16B_ASCII
GUI_Font16B_1
GUI_FontComic18B_ASCII
GUI_FontComic18B_1
GUI_Font24_ASCII
GUI_Font24_1
GUI_Font24B_ASCII
GUI_Font24B_1
GUI_Font32_ASCII
GUI_Font32_1
GUI_Font32B_ASCII
GUI_Font32B_1
GUI_FontComic24B_ASCII
GUI_FontComic24B_1
26.5 Monospaced fonts
GUI_Font4x6
GUI_Font6x8
GUI_Font6x9
GUI_Font8x8
GUI_Font8x9
GUI_Font8x10_ASCII
GUI_Font8x12_ASCII
GUI_Font8x13_ASCII
GUI_Font8x13_1
GUI_Font8x15B_ASCII
GUI_Font8x15B_1
GUI_Font8x16
GUI_Font8x17
GUI_Font8x18
GUI_Font8x16x1x2
GUI_Font8x16x2x2
GUI_Font8x16x3x3
GUI_FontD24x32
GUI_FontD32
Fonts
7.1 Available fonts
Adding fonts
Selecting the font
7.2 Font API
7.3 Selection of a font
GUI_GetFont()
GUI_SetFont()
7.4 Font-related functions
GUI_GetCharDistX()
GUI_GetFontDistY()
GUI_GetFontInfo()
GUI_GetFontSizeY()
GUI_GetStringDistX()
GUI_GetYDistOfFont()
GUI_GetYSizeOfFont()
GUI_IsInFont()
7.5 Character sets
ASCII
ISO 8859-1 Western Latin character set
Unicode
7.6 Font converter
第8章 位图转换器
8.1 介绍
8.2 支持的输入格式
8.3 支持的输出格式
8.4 从位图产生“C”文件
8.5 色彩转换
8.6 压缩的位图
8.7 使用定制调色板
定制调色板的文件格式
定制调色板范例文件
8.8 命令行方式
有效的命令行选项
8.9 位图转换范例
Bitmap Converter
8.1 Introduction
8.2 Supported input formats
8.3 Supported output formats
8.4 Generating C files from bitmaps
8.5 Color conversion
8.6 Compressed bitmaps
8.7 Using a custom palette
File format for custom palette
Custom palette sample file
8.8 Command line usage
Valid command line options
8.9 Example of a converted bitmap
第9章 颜色
9.1 预定义颜色
9.2 色彩条测试程序
9.3 固定的调色板模式
9.4 定制调色板模式
9.5 在运行时修改颜色查询表
使用不同的颜色
9.6 颜色API
9.7 基本颜色函数
GUI_GetBkColor()
GUI_GetBkColorIndex()
GUI_GetColor()
GUI_GetColorIndex()
GUI_SetBkColor()
GUI_SetBkColorIndex()
GUI_SetColor()
GUI_SetColorIndex()
9.8 索引和彩色转换
GUI_Color2Index()
GUI_Index2Color()
9.9 查询表(LUT)类
GUI_InitLUT()
GUI_SetLUTColor()
GUI_SetLUTEntry()
Colors
9.1 Predefined colors
9.2 The color bar test routine
9.3 Fixed palette modes
1 mode: 1 bpp (black and white)
2 mode: 2 bpp (4 grayscales)
4 mode: 4 bpp (16 grayscales)
111 mode: 3 bpp (2 levels per color)
222 mode: 6 bpp (4 levels per color)
233 mode: 2 bits blue, 3 bits green, 3 bits red
-233 mode: 2 bits red, 3 bits green, 3 bits blue, red and blue swapped
323 mode: 3 bits blue, 2 bits green, 3 bits red
-323 mode: 3 bits red, 2 bits green, 3 bits blue, red and blue swapped
332 mode: 3 bits blue, 3 bits green, 2 bits red
-332 mode: 3 bits red, 3 bits green, 2 bits blue, red and blue swapped
444 mode: 4 bits red, 4 bits green, 4 bits blue
555 mode: 5 bits red, 5 bits green, 5 bits blue
-555 mode: 5 bits blue, 5 bits green, 5 bits red, red and blue swapped
565 mode: 5 bits red, 6 bits green, 5 bits blue
-565 mode: 5 bits blue, 6 bits green, 5 bits red, red and blue swapped
8666 mode: 8bpp, 6 levels per color + 16 grayscales
9.4 Custom palette modes
9.5 Modifying the color lookup table at run time
Using different colors
9.6 Color API
9.7 Basic color functions
GUI_GetBkColor()
GUI_GetBkColorIndex()
GUI_GetColor()
GUI_GetColorIndex()
GUI_SetBkColor()
GUI_SetBkColorIndex()
GUI_SetColor()
GUI_SetColorIndex()
9.8 Index & color conversion
GUI_Color2Index()
GUI_Index2Color()
9.9 Lookup table (LUT) group
GUI_InitLUT()
GUI_SetLUTColor()
GUI_SetLUTEntry()
第10章 存储设备
10.1 图解存储设备的使用
10.2 基本函数
10.3 为了能使用存储设备……
10.4 存储设备 API 函数
GUI_MEMDEV_Create()
GUI_MEMDEV_CopyToLCD()
GUI_MEMDEV_Delete()
GUI_MEMDEV_Select()
10.5 高级特性
GUI_MEMDEV_Clear()
GUI_MEMDEV_CopyFromLCD()
GUI_MEMDEV_CopyToLCDAA()
GUI_MEMDEV_GetYSize()
GUI_MEMDEV_ReduceYSize()
GUI_MEMDEV_SetOrg
使用存储设备的简单例子
10.6 分片存储设备
GUI_MEMDEV_Draw()
使用分片存储设备的范例
10.7 自动设备对象
GUI_MEMDEV_CreateAuto()
GUI_MEMDEV_DeleteAuto()
GUI_MEMDEV_DrawAuto()
使用一个自动设备对象的范例
Memory Devices
10.1 Using memory devices: an illustration
10.2 Basic functions
10.3 In order to be able to use memory devices...
10.4 Memory device API
GUI_MEMDEV_Create()
GUI_MEMDEV_CopyToLCD()
GUI_MEMDEV_Delete()
GUI_MEMDEV_Select()
10.5 Advanced features
GUI_MEMDEV_Clear()
GUI_MEMDEV_CopyFromLCD()
GUI_MEMDEV_CopyToLCDAA()
GUI_MEMDEV_GetYSize()
GUI_MEMDEV_ReduceYSize()
GUI_MEMDEV_SetOrg
Simple example for using a memory device
10.6 Banding memory device
GUI_MEMDEV_Draw()
Example for using a banding memory device
10.7 Auto device object
GUI_MEMDEV_CreateAuto()
GUI_MEMDEV_DeleteAuto()
GUI_MEMDEV_DrawAuto()
Example for using an auto device object
第11章 运行模型:单任务/多任务
11.1 支持的运行模型
单任务系统(超级循环)
µC/GUI 多任务系统:一个任务调用 µC/GUI
µC/GUI 多任务系统:多个任务调用 µC/GUI
11.2 单任务系统(超级循环)
描述
超级循环范例(没有使用 µC/GUI)
优点
缺点
使用 µC/GUI
11.3 µC/GUI 多任务系统:一个任务调用 µC/GUI
描述
优点
缺点
使用 µC/GUI
11.4 µC/GUI 多任务系统:多个任务调用 µC/GUI
描述
优点
缺点
使用 µC/GUI
建议
范例
11.5 多任务支持的 GUI 配置宏
GUI_MAXTASK
GUI_OS
11.6 内核接口函数 API
GUI_X_InitOS()
GUI_X_GetTaskID()
GUI_X_Lock()
GUI_X_Unlock()
Execution Model: Single Task / Multitask
11.1 Supported execution models
11.2 Single task system (superloop)
Description
Superloop example (without µC/GUI)
Advantages
Disadvantages
Using µC/GUI
Superloop example (with µC/GUI)
11.3 µC/GUIMultitask system: one task calling µC/GUI
Description
Advantages
Disadvantages
Using µC/GUI
11.4 µC/GUIMultitask system: multiple tasks calling µC/ GUI
Description
Advantages
Disadvantages
Using µC/GUI
Recommendations
Example
11.5 GUI configuration macros for multitasking support
GUI_MAXTASK
GUI_OS
11.6 Kernel interface routine API
GUI_X_InitOS()
GUI_X_GetTaskID()
GUI_X_Lock()
GUI_X_Unlock()
Examples
第12章 视窗管理器(WM)
12.1 术语解释
活动窗口
回调函数
子/父窗口,同胞
客户区
剪切,剪切区域
桌面窗口
句柄
隐藏/显示窗口
透明
有效/无效
Z-序,底层/顶层
12.2 WM API 函数
12.3 视窗管理器的回调机制
回调机制后面的哲学
不使用回调函数
12.4 使用回调函数
函数原型
范例
背景窗口重绘及回调
12.5 基本函数
WM_CreateWindow()
WM_CreateWindowAsChild()
WM_DeleteWindow()
WM_Exec1()
WM_GetClientRect()
WM_GetOrgX(),WM_GetOrgY()
WM_GetWindowOrgX(),WM_GetWindowOrgY()
WM_GetWindowRect()
WM_GetWindowSizeX(),WM_GetWindowSizeY()
WM_HideWindow()
WM_InvalidateArea()
WM_InvalidateRect()
WM_InvalidateWindow()
WM_MoveTo()
WM_MoveWindow()
WM_Paint()
WM_ResizeWindow()
WM_SelectWindow()
WM_ShowWindow()
12.6 高级函数
WM_Activate()
WM_BringToBottom()
WM_BringToTop()
WM_ClrHasTrans()
WM_Deactivate()
WM_DefaultProc()
WM_GetActiveWindow()
WM_GetDesktopWindow()
WM_GetFirstChild()
WM_GetNextSibling()
WM_GetHasTrans()
WM_GetParent()
WM_Init()
WM_IsWindow()
WM_SendMessage()
WM_SetDesktopColor()
WM_SetCallback()
WM_SetCreateFlags()
WM_SetHasTrans()
WM_SetUserClipRect()
WM_ValidateRect()
WM_ValidateWindow()
12.7 存储设备支持(可选)
WM_DisableMemdev()
WM_EnableMemdev()
12.8 范例
The Window Manager (WM)
12.1 Explanation of terms
12.2 Callback mechanism and messages
12.2.1 Using callback routines
12.2.2 Message structure
12.2.3 Types of messages
12.3 WM API
12.4 Basic functions
WM_HWIN WM_CreateWindow(int x0, int y0,
WM_HWIN WM_CreateWindowAsChild(int x0, int y0,
void WM_DeleteWindow(WM_HWIN hWin);
int WM_Exec(void);
int WM_Exec1(void);
void WM_GetClientRect(GUI_RECT* pRect);
WM_HWIN WM_GetDialogItem(WM_HWIN hDialog, int Id);
int WM_GetOrgX(void);
int WM_GetOrgY(void);
int WM_GetWindowOrgX(WM_HWIN hWin);
int WM_GetWindowOrgY(WM_HWIN hWin);
void WM_GetWindowRect(GUI_RECT* pRect);
int WM_GetWindowSizeX(WM_HWIN hWin);
int WM_GetWindowSizeY(WM_HWIN hWin);
void WM_HideWindow(WM_HWIN hWin);
void WM_InvalidateArea(GUI_RECT* pRect);
void WM_InvalidateRect(WM_HWIN hWin, GUI_RECT* pRect);
void WM_InvalidateWindow(WM_HWIN hWin);
void WM_MoveTo(WM_HWIN hWin, int dx, int dy);
void WM_MoveWindow(WM_HWIN hWin, int dx, int dy);
void WM_Paint(WM_HWIN hWin);
void WM_ResizeWindow(WM_HWIN hWin, int XSize, int YSize);
WM_HWIN WM_SelectWindow(WM_HWIN hWin);
void WM_ShowWindow(WM_HWIN hWin);
12.5 Advanced functions
void WM_Activate(void);
void WM_BringToBottom(WM_HWIN hWin);
void WM_BringToTop(WM_HWIN hWin);
void WM_ClrHasTrans(WM_HWIN hWin);
void WM_Deactivate(void);
void WM_DefaultProc(WM_MESSAGE* pMsg)
WM_HWIN WM_GetActiveWindow(void);
WM_HWIN WM_GetDesktopWindow(void);
void WM_GetFirstChild(WM_HWIN hWin);
void WM_GetNextSibling(WM_HWIN hWin);
U8 WM_GetHasTrans(WM_HWIN hWin);
void WM_GetParent(WM_HWIN hWin);
void WM_Init(void);
void WM_IsWindow(WM_HWIN hWin);
void WM_SendMessage(WM_HWIN hWin, WM_MESSAGE* pMsg)
GUI_COLOR WM_SetDesktopColor(GUI_COLOR Color);
WM_CALLBACK* WM_SetCallback (WM_HWIN hWin, WM_CALLBACK* cb)
U8 WM_SetCreateFlags (U8 Flags)
void WM_SetFocus(WM_HWIN hWin);
void WM_SetHasTrans(WM_HWIN hWin);
WM_tfPollPID* WM_SetpfPollPID(WM_tfPollPID* pf);
const GUI_RECT* WM_SetUserClipRect(const GUI_RECT* pRect);
void WM_ValidateRect (WM_HWIN hWin, GUI_RECT* pRect);
void WM_ValidateWindow (WM_HWIN hWin);
12.6 Memory device support (optional)
12.7 Example
第13章 窗口对象(控件)
13.1 一些基础知识
有效的控件
理解重绘机制
如何使用控件
用于控件的动态存储器
3D 支持
13.2 通用控件 API 函数
API 参考:用于控件的 WM 函数
API 参考:所有控件共有的函数
_CreateIndirect()
WM_EnableWindow()
13.3 BUTTON:按钮控件
配置选项
BUTTON API 函数
BUTTON_Create()
BUTTON_CreateAsChild()
BUTTON_CreateIndirect()
BUTTON_SetBitmap()
BUTTON_SetBitmapEx()
BUTTON_SetBkColor()
BUTTON_SetFont()
BUTTON_SetState()
BUTTON_SetStreamedBitmap()
BUTTON_SetText()
BUTTON_SetTextColor()
范例
13.4 CHECKBOX:复选框控件
配置选项
复选框 API 函数
CHECKBOX_Check()
CHECKBOX_Create()
CHECKBOX_CreateIndirect()
CHECKBOX_IsChecked()
CHECKBOX_Uncheck()
13.5 EDIT:文本编辑框控件
配置选项
编辑框 API 函数
EDIT_AddKey()
EDIT_Create()
EDIT_CreateIndirect()
EDIT_GetDefaultFont()
EDIT_GetText()
EDIT_GetValue()
EDIT_SetBinMode()
EDIT_SetBkColor()
EDIT_SetDecMode()
EDIT_SetDefaultFont()
EDIT_SetDefaultTextAlign()
EDIT_SetFont()
EDIT_SetHexMode()
EDIT_SetMaxLen()
EDIT_SetText()
EDIT_SetTextAlign()
EDIT_SetTextColor()
EDIT_SetValue()
GUI_EditBin()
GUI_EditDec()
GUI_EditHex()
GUI_EditString()
范例
13.6 FRAMEWIN:框架窗口控件
配置选项
框架窗口API函数
FRAMEWIN_Create()
FRAMEWIN_CreateAsChild()
FRAMEWIN_CreateIndirect()
FRAMEWIN_GetDefaultBorderSize()
FRAMEWIN_GetDefaultCaptionSize()
FRAMEWIN_GetDefaultFont()
FRAMEWIN_SetActive()
FRAMEWIN_SetBarColor()
FRAMEWIN_SetClientColor()
FRAMEWIN_SetDefaultBarColor()
FRAMEWIN_SetDefaultBorderSize()
FRAMEWIN_SetDefaultCaptionSize()
FRAMEWIN_SetDefaultFont()
FRAMEWIN_SetFont()
FRAMEWIN_SetText()
FRAMEWIN_SetTextAlign()
FRAMEWIN_SetTextColor()
FRAMEWIN_SetTextPos()
范例
13.7 LISTBOX:列表框控件
配置选项
列表框API函数
LISTBOX_Create()
LISTBOX_CreateAsChild()
LISTBOX_CreateIndirect()
LISTBOX_DecSel()
LISTBOX_GetDefaultFont()
LISTBOX_GetSel()
LISTBOX_IncSel()
LISTBOX_SetBackColor()
LISTBOX_SetDefaultFont()
LISTBOX_SetFont()
LISTBOX_SetSel()
LISTBOX_SetTextColor()
范例
13.8 PROGBAR:进度条控件
配置选项
进度条API 函数
PROGBAR_Create()
PROGBAR_CreateIndirect()
PROGBAR_SetBarColor()
PROGBAR_SetFont()
PROGBAR_SetMinMax()
PROGBAR_SetText()
PROGBAR_SetTextAlign()
PROGBAR_SetTextPos()
PROGBAR_SetValue()
范例
13.9 RADIO:单选按钮控件
配置选项
单选按钮控件 API 函数
RADIO_Create()
RADIO_CreateIndirect()
RADIO_Dec()
RADIO_GetValue()
RADIO_Inc()
RADIO_SetValue()
13.10 SCROLLBAR:滚动条控件
配置选项
滚动条 API
SCROLLBAR_AddValue()
SCROLLBAR_Create()
SCROLLBAR_CreateAttached()
SCROLLBAR_CreateIndirect()
SCROLLBAR_Dec()
SCROLLBAR_GetValue()
SCROLLBAR_Inc()
SCROLLBAR_SetNumItems()
SCROLLBAR_SetPageSize()
SCROLLBAR_SetValue()
SCROLLBAR_SetWidth()
13.11 SLIDER:滑动条控件
配置选项
SLIDER API 函数
SLIDER_Create()
SLIDER_CreateIndirect()
SLIDER_Dec()
SLIDER_GetValue()
SLIDER_Inc()
SLIDER_SetRange()
SLIDER_SetValue()
SLIDER_SetWidth()
范例
13.12 TEXT:文本控件
配置选项
文本 API 函数
TEXT_Create()
TEXT_CreateInd irect()
TEXT_GetDefau ltFont()
TEXT_SetDefau ltFont()
TEXT_SetFont()
TEXT_SetText()
TEXT_SetTextAlign()
TEXT_SetTextPos()
Window Objects (Widgets)
13.1 Some basics
13.1.1 Available widgets
13.1.2 Understanding the redrawing mechanism
13.1.3 How to use widgets
13.2 General widget API
13.2.1 API reference: WM routines used for widgets
13.2.2 API reference: routines common to all widgets
13.3 BUTTON: Button widget
13.3.1 Configuration options
13.3.2 Notification codes
13.3.3 BUTTON API
13.3.4 Examples
13.4 CHECKBOX: Check box widget
13.4.1 Configuration options
13.4.2 Notification codes
13.4.3 CHECKBOX API
13.5 EDIT: Edit widget
13.5.1 Configuration options
13.5.2 Notification codes
13.5.3 EDIT API
13.5.4 Example
13.6 FRAMEWIN: Frame window widget
13.6.1 Configuration options
13.6.2 FRAMEWIN API
13.6.3 Example
13.7 LISTBOX: List box widget
13.7.1 Configuration options
13.7.2 Notification codes
13.7.3 LISTBOX API
13.7.4 Examples
13.8 PROGBAR: Progress bar widget
13.8.1 Configuration options
13.8.2 PROGBAR API
13.8.3 Examples
13.9 RADIO: Radio button widget
13.9.1 Configuration options
13.9.2 Notification codes
13.9.3 RADIO API
13.10 SCROLLBAR: Scroll bar widget
13.10.1 Configuration options
13.10.2 Notification codes
13.10.3 SCROLLBAR API
13.11 SLIDER: Slider widget
13.11.1 Configuration options
13.11.2 Notification codes
13.11.3 SLIDER API
13.11.4 Example
13.12 TEXT: Text widget
13.12.1 Configuration options
13.12.2 TEXT API
第14章 对话框
14.1 对话框基础
1. 输入焦点
2. 模块化和非模块化对话框
3. 对话框消息
14.2 建立对话框
1. 资源表
2. 对话框程序
3. 初始化对话框
4. 定义对话框行为
14.3 对话框API 参考函数
14.4 对话框
GUI_CreateDialogBox
GUI_ExecDialogBox
GUI_EndDialog
14.5 消息框
GUI_MessageBox
Dialogs
14.1 Dialog basics
Input focus
Blocking vs. non-blocking dialogs
Dialog messages
14.2 Creating a dialog
Resource table
Dialog procedure
14.3 API reference: dialogs
GUI_CreateDialogBox
GUI_ExecDialogBox
GUI_EndDialog
14.4 Dialog boxes
GUI_CreateDialogBox
GUI_ExecDialogBox
GUI_EndDialog
14.5 Message boxes
GUI_MessageBox
Example
第15章 抗锯齿
15.1 介绍
抗锯齿的品质
抗锯齿字体
高分辨率座标
15.2 抗锯齿 API 函数
15.3 控制函数
GUI_AA_DisableHiRes()
GUI_AA_EnableHiRes()
GUI_AA_GetFactor()
GUI_AA_SetFactor()
15.4 绘图函数
GUI_AA_DrawArc()
GUI_AA_DrawLine()
GUI_AA_DrawPolyOutline()
GUI_AA_FillCircle()
GUI_AA_FillPolygon()
15.5 范例
不同的抗锯齿系数
在高分辨率座标中放置的直线
使用高分辨率抗锯齿绘运动的的指针
Antialiasing
17.1 Introduction
Quality of antialiasing
Antialiased Fonts
High-resolution coordinates
17.2 Antialiasing API
17.3 Control functions
GUI_AA_DisableHiRes()
GUI_AA_EnableHiRes()
GUI_AA_GetFactor()
GUI_AA_SetFactor()
17.4 Drawing functions
GUI_AA_DrawArc()
GUI_AA_DrawLine()
GUI_AA_DrawPolyOutline()
GUI_AA_FillCircle()
GUI_AA_FillPolygon()
17.5 Examples
Different antialiasing factors
Lines placed on high-resolution coordinates
Moving pointer using high-resolution antialiasing
第16章 Unicode
16.1 显示 Unicode 字符
Unicode 字符
显示 Unicode 字符串
显示混合 Unicode 和 ASCII 的代码
16.2 Unicode 和双字节转换
为什么使用双字节结构?
如何构造Unicode 字符串
范例
双字节结构如何工作?
16.3 范例
Unicode
18.1 Displaying Unicode characters
18.2 Unicode and double-byte conversions
18.3 Example
第17章 Shift-JIS支持
Shift-JIS Support
19.1 Creating Shift-JIS fonts
19.2 Example
第18章 输入设备
18.1 指针光标输入设备
指针光标输入设备API函数
GUI_PID_GetState()
GUI_PID_StoreState()
通用鼠标API
GUI_MOUSE_GetState()
GUI_MOUSE_StoreState()
PS2鼠标驱动程序API
GUI_MOUSE_DRIVER_PS2_Init()
GUI_MOUSE_DRIVER_PS2_OnRx()
通用触摸屏API
GUI_TOUCH_GetState()
GUI_TOUCH_StoreState()
用于模拟触摸屏驱动程序API
TOUCH_X 函数
GUI_TOUCH_Calibrate()
GUI_TOUCH_Exec()
GUI_TOUCH_SetDefaultCalibration()
TOUCH_X_ActivateX(),TOUCH_X_ActivateY()
TOUCH_X_MeasureX(),TOUCH_X_MeasureY()
配置触摸屏模块
18.2 键盘输入
µC/GUI预定义字符代码
GUI_StoreKeyMsg()
GUI_SendKeyMsg()
GUI_ClearKeyBuffer()
GUI_GetKey()
GUI_StoreKey()
GUI_WaitKey()
Input Devices
15.1 Pointer input devices
15.1.1 Pointer input device API
15.1.2 Mouse driver input
15.1.3 Touch-screen driver input and configuration
15.2 Keyboard input
15.2.1 Driver layer API
15.2.2 Application layer API
Cursors
16.1 Available cursors
16.2 Cursor API
第19章 与时间相关的函数
定时和执行API
GUI_Delay()
GUI_Exec()
GUI_Exec1()
GUI_GetTime()
Time-Related Functions
Timing and execution API
GUI_Delay()
GUI_Exec()
GUI_Exec1()
GUI_GetTime()
第20章 底层配置
20.1 可用的配置宏
如何配置 LCD。
20.2 通用(必需的)配置
LCD_CONTROLLER
LCD_BITSPERPIXEL
LCD_FIXEDPALETTE
LCD_XSIZE; LCD_YSIZE
20.3 初始化控制器
LCD_INIT_CONTROLLER()
20.4 显示方向
LCD_MIRROR_X
LCD_MIRROR_Y
LCD_SWAP_XY
LCD_VXSIZE; LCD_VYSIZE
LCD_XORG; LCD_YORG
20.5 颜色配置
LCD_MAX_LOG_COLORS
LCD_PHYSCOLORS
LCD_PHYSCOLORS_IN_RAM
LCD_REVERSE
LCD_SWAP_RB
20.6 LCD 的放大
LCD_XMAG
LCD_YMAG
20.7 简单总线接口配置
带有简单总线的 LCD 控制器的方框图
LCD_READ_A0
LCD_READ_A1
LCD_WRITE_A0
LCD_WRITE_A1
LCD_WRITEM_A1
实际总线接口范例
连接到I/O 脚的简单函数
多LCD 控制器的硬件访问
20.8 完全总线接口配置
完全总线接口的LCD 控制器的典型框图
配置范例
LCD_READ_MEM
LCD_READ_REG
LCD_WRITE_MEM
LCD_WRITE_REG
LCD_BUSWIDTH
LCD_ENABLE_REG_ACCESS
LCD_ENABLE_MEM_ACCESS
LCD_SWAP_BYTE_ORDER
20.9 LCD 控制器配置:公共极(行)/段(列)连线
LCD_XORG;LCD_YORG
LCD_FIRSTSEG
LCD_LASTSEG
LCD_FIRSTCOM
LCD_LASTCOM
单LCD 控制器配置
配置附加 LCD 控制器
20.10 COM/SEG 查询表
LCD_LUT_COM
LCD_LUT_SEG
LCD_NUM_CONTROLLERS
LCD_CACHE
LCD_USE_BITBLT
LCD_SUPPORT_CACHECONTROL
LCD_TIMERINIT0
LCD_TIMERINIT1
LCD_ON
LCD_OFF
Low-Level Configuration
22.1 Available configuration macros
How to configure the LCD
22.2 General (required) configuration
LCD_CONTROLLER
LCD_BITSPERPIXEL
LCD_FIXEDPALETTE
LCD_XSIZE; LCD_YSIZE
22.3 Initializing the controller
LCD_INIT_CONTROLLER()
22.4 Display orientation
LCD_MIRROR_X
LCD_MIRROR_Y
LCD_SWAP_XY
LCD_VXSIZE; LCD_VYSIZE
LCD_XORG; LCD_YORG
22.5 Color configuration
LCD_MAX_LOG_COLORS
LCD_PHYSCOLORS
LCD_PHYSCOLORS_IN_RAM
LCD_REVERSE
LCD_SWAP_RB
22.6 Magnifying the LCD
LCD_XMAG
LCD_YMAG
22.7 Simple bus interface configuration
LCD_READ_A0
LCD_READ_A1
LCD_WRITE_A0
LCD_WRITE_A1
LCD_WRITEM_A1
Example of real bus interface
Sample routines for connection to I/O pins
Hardware access for multiple LCD controllers
22.8 Full bus interface configuration
LCD_READ_MEM
LCD_READ_REG
LCD_WRITE_MEM
LCD_WRITE_REG
LCD_BUSWIDTH
LCD_ENABLE_REG_ACCESS
LCD_ENABLE_MEM_ACCESS
LCD_SWAP_BYTE_ORDER
22.9 LCD controller configuration: common/segment lines
LCD_XORG; LCD_YORG
LCD_FIRSTSEG
LCD_LASTSEG
LCD_FIRSTCOM
LCD_LASTCOM
Single LCD controller configuration
Configuring additional LCD controllers
22.10 COM/SEG lookup tables
LCD_LUT_COM
LCD_LUT_SEG
22.11 Miscellaneous
LCD_NUM_CONTROLLERS
LCD_CACHE
LCD_USE_BITBLT
LCD_SUPPORT_CACHECONTROL
LCD_TIMERINIT0
LCD_TIMERINIT1
LCD_ON
LCD_OFF
第21章 高层次配置
21.1 有效的GUI 配置宏
如何配置GUI
配置范例
21.2 GUI_X 函数参考
21.3 初始化函数
GUI_X_Init()
21.4 时间函数
GUI_X_Delay()
GUI_X_ExecIdle()
GUI_X_GetTime()
21.5 内核接口函数
21.6 调试
GUI_X_Log()
High-Level Configuration
23.1 Available GUI configuration macros
How to configure the GUI
Sample configuration
23.2 GUI_X routine reference
23.3 Init routine
GUI_X_Init()
23.4 Timing routines
GUI_X_Delay()
GUI_X_ExecIdle()
GUI_X_GetTime()
23.5 Kernel interface routines
23.6 Debugging
GUI_X_Log()
第22章 LCD驱动程序
22.1 支持的LCD控制器及各自的驱动程序
选择一个驱动程序
22.2 LCD07X1
支持的硬件
显示屏数据 RAM 的结构
驱动程序的额外 RAM 要求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器的特定要求
22.3 LCD13XX
支持的硬件
显示屏数据 RAM 的结构
驱动程序的附加 RAM 要求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器SED1386或者S1 D13806的特殊要求
22.4 LCD159A
支持的硬件
额外的 RAM 要求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器的特殊要求
22.5 LCD15E05
支持的硬件
显示屏数据 RAM 的结构
驱动程序额外的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器的特殊要求
22.6 LCD15XX
支持的硬件
显示屏数据 RAM 的结构
驱动程序额外的 RAM 需求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器的特殊要求
22.7 LCD6642X
支持的硬件
显示屏数据 RAM 的结构
驱动程序额外的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
某些 LCD 控制器的特殊要求
22.8 LCDMem
使用CPU作为LCD控制器
支持的硬件
显示屏数据 RAM 的结构
驱动程序的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
22.9 LCDMemC
支持的硬件
显示屏数据 RAM 的结构
驱动程序的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
22.10 LCDPage1bpp
支持的硬件
显示屏数据 RAM 的结构
驱动程序额外的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
某些LCD控制器的特殊要求
22.11 LCDSLin
支持的硬件
显示屏数据 RAM 的结构
额外的RAM需求
附加的驱动函数
硬件配置
附加的配置开关
某些 LCD 控制器的特殊要求
LCD Drivers
20.1 Supported LCD controllers and respective drivers
Selecting a driver
20.2 LCD07X1
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
20.3 LCD13XX
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
SED1386 or S1D13806
20.4 LCD159A
Supported hardware
Display data RAM organization
Additional RAM requirements
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
20.5 LCD15E05
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
20.6 LCD15XX
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Special requirements for certain LCD controllers
20.7 LCD6642X
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
20.8 LCDMem
Using the CPU as LCD controller
RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
20.9 LCDMemC
Supported hardware
Display data RAM organization
RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
20.10 LCDPage1bpp
Supported hardware
Display data RAM organization
Additional RAM requirements of the driver
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
20.11 LCDSLin
Supported hardware
Display data RAM organization
Additional RAM-requirement
Additional driver functions
Hardware configuration
Additional configuration switches
Special requirements for certain LCD controllers
第23章 LCD驱动API函数
23.1 LCD驱动API
LCD_L0:驱动器函数
LCD:LCD 层函数
23.2 初始化及显示控制组
LCD_L0_Init()
LCD_L0_ReInit()
LCD_L0_Off (),LCD_L0_On()
23.3 绘制组
LCD_L0_DrawBitMap()
LCD_L0_DrawHLine()
LCD_L0_DrawPixel()
LCD_L0_DrawVLine()
LCD_L0_FillRect()
LCD_L0_SetPixelIndex()
LCD_L0_XorPixel()
23.4 “Get”组
LCD_L0_GetPixelIndex()
23.5 查询表(LUT)组
LCD_L0_SetLUTEntry()
23.6 杂项组
LCD_L0_ControlCache()
LCD_GetXSize(),LCD_GetYSize()
LCD_GetVXSize(),LCD_GetVYSize()
LCD_GetBitsPerPixel()
LCD_GetNumColors()
LCD_GetFixedPalette()
LCD Driver API
24.1 LCD driver API
LCD_L0: Driver routines
LCD: LCD layer routines
24.2 Init & display control group
LCD_L0_Init()
LCD_L0_ReInit()
LCD_L0_Off (), LCD_L0_On()
24.3 Drawing group
LCD_L0_DrawBitMap()
LCD_L0_DrawHLine()
LCD_L0_DrawPixel()
LCD_L0_DrawVLine()
LCD_L0_FillRect()
LCD_L0_SetPixelIndex()
LCD_L0_XorPixel()
24.4 "Get" group
LCD_L0_GetPixelIndex()
24.5 Lookup table (LUT) group
LCD_L0_SetLUTEntry()
24.6 Miscellaneous group
LCD_L0_ControlCache()
LCD_GetXSize(), LCD_GetYSize()
LCD_GetVXSize(), LCD_GetVYSize()
LCD_GetBitsPerPixel()
LCD_GetNumColors()
LCD_GetFixedPalette()
第24章 性能和资源占用
24.1 性能基准
用于基准测试的的测试顺序的描述
24.2 内存需求
Performance and Resource Usage
25.1 Performance benchmark
Description of test sequences used in the benchmark test
25.2 Memory requirements
Questions and Answers
Index