Skip to content

Commit e96d5cf

Browse files
committed
update
1 parent e95e500 commit e96d5cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+4577
-3077
lines changed

README-en.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">XCGUI</h1>
22
<p align="center">
3-
<a href="https://github.com/twgh/xcgui/releases"><img src="https://img.shields.io/badge/release-1.3.382-blue" alt="release"></a>
4-
<a href="http://www.xcgui.com"><img src="https://img.shields.io/badge/XCGUI-3.3.8-blue" alt="XCGUI"></a>
3+
<a href="https://github.com/twgh/xcgui/releases"><img src="https://img.shields.io/badge/release-1.3.390-blue" alt="release"></a>
4+
<a href="http://www.xcgui.com"><img src="https://img.shields.io/badge/XCGUI-3.3.9-blue" alt="XCGUI"></a>
55
<a href="https://golang.org"> <img src="https://img.shields.io/badge/golang-1.16-blue" alt="golang"></a>
66
<a href="https://pkg.go.dev/github.com/twgh/xcgui"><img src="https://img.shields.io/badge/go.dev-reference-brightgreen" alt="GoDoc"></a>
77
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen" alt="License"></a>
@@ -19,6 +19,7 @@
1919

2020

2121

22+
2223
## Introduction
2324

2425
English | [简体中文](./README.md)
@@ -28,7 +29,7 @@ English | [简体中文](./README.md)
2829
- DirectUI design idea: there is no sub-window in the window, the interface elements are all logical areas (no HWND handle, safe, flexible), all UI elements are developed independently (not restricted by the system), more flexible to achieve various Program interface to meet the needs of different users.
2930
- Has a free UI designer tool: rapid development tools, what you see is what you get, a highly customizable system (DIY), making UI development easier.
3031
- Support Direct2D, hardware acceleration, can make full use of hardware features to create high-performance, high-quality 2D graphics.
31-
- [wiki](https://github.com/twgh/xcgui/wiki) There is a simple introductory tutorial, you can take a look when you have time.
32+
- [WIKI](https://github.com/twgh/xcgui/wiki) There is a simple introductory tutorial, you can take a look when you have time.
3233

3334
## Get
3435

@@ -98,13 +99,13 @@ It is best to put it in the `C:\Windows\System32` directory during development,
9899
64bit
99100

100101
```bash
101-
curl -fL "https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui.dll?version=latest" -o xcgui.dll
102+
iwr https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui.dll?version=latest -OutFile xcgui.dll
102103
```
103104

104105
32bit
105106

106107
```bash
107-
curl -fL "https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui-32.dll?version=latest" -o xcgui.dll
108+
iwr https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui-32.dll?version=latest -OutFile xcgui.dll
108109
```
109110

110111
#### (3)Download using the getxcgui tool
@@ -196,7 +197,7 @@ In some cases, it is more convenient to mix the native functions in the xc packa
196197

197198
All the structures of xcgui are also in the xc package.
198199

199-
[Goland](https://www.jetbrains.com/go/?from=xcgui) is recommended for development for the best development experience. The comment format I'm using looks the best in Goland.
200+
[Goland](https://www.jetbrains.com/go/?from=xcgui) is recommended for development for the best development experience.
200201

201202
## Event
202203

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">XCGUI</h1>
22
<p align="center">
3-
<a href="https://github.com/twgh/xcgui/releases"><img src="https://img.shields.io/badge/release-1.3.382-blue" alt="release"></a>
4-
<a href="http://www.xcgui.com"><img src="https://img.shields.io/badge/XCGUI-3.3.8-blue" alt="XCGUI"></a>
3+
<a href="https://github.com/twgh/xcgui/releases"><img src="https://img.shields.io/badge/release-1.3.390-blue" alt="release"></a>
4+
<a href="http://www.xcgui.com"><img src="https://img.shields.io/badge/XCGUI-3.3.9-blue" alt="XCGUI"></a>
55
<a href="https://golang.org"> <img src="https://img.shields.io/badge/golang-1.16-blue" alt="golang"></a>
66
<a href="https://pkg.go.dev/github.com/twgh/xcgui"><img src="https://img.shields.io/badge/go.dev-reference-brightgreen" alt="GoDoc"></a>
77
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen" alt="License"></a>
@@ -20,6 +20,7 @@
2020

2121

2222

23+
2324
## 介绍
2425

2526
[English](./README-en.md) | 简体中文
@@ -29,7 +30,7 @@
2930
- DirectUI设计思想:在窗口内没有子窗口,界面元素都是逻辑上的区域(无HWND句柄,安全,灵活),所有UI元素都是自主开发(不受系统限制),更加灵活的实现各种程序界面,满足不同用户的需求。
3031
- 拥有免费的UI设计器:快速开发工具,所见即所得,高度自定义系统(DIY),让UI开发变的更加简单。
3132
- 支持Direct2D,硬件加速,能更大程度的发挥硬件特性,创建高性能,高质量的2D图形。
32-
- [wiki](https://github.com/twgh/xcgui/wiki) 里有简单的入门教程,有空可以看一下,少走弯路。
33+
- [WIKI](https://github.com/twgh/xcgui/wiki) 里有简单的入门教程,有空可以看一下,少走弯路。
3334
- 有完善的 [中文官方文档](http://www.xcgui.com/doc-ui/)[官方资源社区](http://mall.xcgui.com)
3435
- 官方QQ群(人多用各种语言的都有):[2283812](https://jq.qq.com/?_wv=1027&k=AiXY4uMc),只聊Go语言版的QQ群:[793788011](https://jq.qq.com/?_wv=1027&k=bkKgsYYk)
3536

@@ -101,13 +102,13 @@ func main() {
101102
64位
102103

103104
```bash
104-
curl -fL "https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui.dll?version=latest" -o xcgui.dll
105+
iwr https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui.dll?version=latest -OutFile xcgui.dll
105106
```
106107

107108
32位
108109

109110
```bash
110-
curl -fL "https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui-32.dll?version=latest" -o xcgui.dll
111+
iwr https://pkggo-generic.pkg.coding.net/xcgui/file/xcgui-32.dll?version=latest -OutFile xcgui.dll
111112
```
112113

113114
#### (3)使用getxcgui工具下载
@@ -191,19 +192,19 @@ var svgIcon = `<svg t="1669088647057" class="icon" viewBox="0 0 1024 1024" versi
191192

192193
xcc包里都是常量,像这样使用:`xcc.Window_Transparent_Shadow`
193194

194-
需要用到xcc包常量的参数注释都是类似这样的,复制`Window_Transparent_`[xcc包](https://pkg.go.dev/github.com/twgh/xcgui/xcc#pkg-constants)里搜索即可看到相关常量注释:
195+
需要用到xcc包常量的参数注释都是类似这样的,复制`Window_Transparent_` [xcc包](https://pkg.go.dev/github.com/twgh/xcgui/xcc#pkg-constants) 里搜索即可看到相关常量注释:
195196

196197
[![注释](https://s4.ax1x.com/2021/12/22/TQvQzt.png)](https://github.com/twgh/xcgui/blob/main/window/windowbase.go#L630)
197198

198199
## 命令介绍
199200

200-
xc包里包含xcgui.dll里所有的API,有一千多个函数,可以直接使用,封装好的类都在其他包里。
201+
xc包里包含xcgui.dll里所有的API,有近2000个函数,不习惯使用类的可以直接使用,封装好的类都在其他包里。
201202

202203
在某些情况下,把xc包里的原生函数与封装好的类混合起来使用会更加方便。
203204

204205
炫彩所有的结构体也都在xc包里。
205206

206-
建议使用 [Goland](https://www.jetbrains.com/go/?from=xcgui) 进行开发,以获得最好的开发体验。本项目所使用的注释格式在Goland里看起来是最好的。
207+
建议使用 [Goland](https://www.jetbrains.com/go/?from=xcgui) 进行开发,以获得最好的开发体验。
207208

208209
## 事件
209210

adapter/adapter.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,36 @@ import (
55
"github.com/twgh/xcgui/xc"
66
)
77

8-
// 数据适配器.
8+
// adapter 数据适配器.
99
type adapter struct {
1010
objectbase.ObjectBase
1111
}
1212

1313
// 数据适配器_增加引用计数.
14-
func (a *adapter) AddRef() int {
14+
func (a *adapter) AddRef() int32 {
1515
return xc.XAd_AddRef(a.Handle)
1616
}
1717

1818
// 数据适配器_释放引用计数.
19-
func (a *adapter) Release() int {
19+
func (a *adapter) Release() int32 {
2020
return xc.XAd_Release(a.Handle)
2121
}
2222

2323
// 数据适配器_取引用计数.
24-
func (a *adapter) GetRefCount() int {
24+
func (a *adapter) GetRefCount() int32 {
2525
return xc.XAd_GetRefCount(a.Handle)
2626
}
2727

2828
// 数据适配器_销毁.
29-
func (a *adapter) Destroy() int {
30-
return xc.XAd_Destroy(a.Handle)
29+
func (a *adapter) Destroy() *adapter {
30+
xc.XAd_Destroy(a.Handle)
31+
return a
3132
}
3233

3334
// 数据适配器_启用自动销毁.
3435
//
3536
// bEnable: 是否启用.
36-
func (a *adapter) EnableAutoDestroy(bEnable bool) int {
37-
return xc.XAd_EnableAutoDestroy(a.Handle, bEnable)
37+
func (a *adapter) EnableAutoDestroy(bEnable bool) *adapter {
38+
xc.XAd_EnableAutoDestroy(a.Handle, bEnable)
39+
return a
3840
}

0 commit comments

Comments
 (0)