From a6f18bc2b3420de5e2a508bb1c019661541b7dcc Mon Sep 17 00:00:00 2001 From: vcaesar Date: Wed, 17 Nov 2021 17:08:59 -0400 Subject: [PATCH] Update godoc and README.md --- README.md | 6 +++--- README_zh.md | 6 +++--- clipboard/clipboard_test.go | 3 +++ robotgo_mac_win.go | 4 ++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27c4225..bf74a8b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ GCC #### For Mac OS X: -Xcode Command Line Tools (And Privacy setting: [#277](#277) ) +Xcode Command Line Tools (And Privacy setting: [#277](https://github.com/go-vgo/robotgo/issues/277) ) ``` xcode-select --install @@ -70,7 +70,8 @@ xcode-select --install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files) (Use recommended) ``` -Or the other GCC (But you should compile the "libpng" with yourself. Or you can removed the bitmap.go. +Or the other GCC (But you should compile the "libpng" with yourself. +Or you can removed the bitmap.go. In the plans, the bitmap.go will moves to the bitmap dir, but break the API. ) ``` @@ -114,7 +115,6 @@ sudo dnf install xsel xclip ``` go get github.com/go-vgo/robotgo ``` - It's that easy! png.h: No such file or directory? Please see [issues/47](https://github.com/go-vgo/robotgo/issues/47). diff --git a/README_zh.md b/README_zh.md index 23a143a..350248b 100644 --- a/README_zh.md +++ b/README_zh.md @@ -55,7 +55,7 @@ GCC #### For Mac OS X: -Xcode Command Line Tools (And Privacy setting: [#277](#277) ) +Xcode Command Line Tools (And Privacy setting: [#277](https://github.com/go-vgo/robotgo/issues/277) ) ``` xcode-select --install @@ -66,7 +66,8 @@ xcode-select --install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files) (推荐使用) ``` -Or the other GCC (But you should compile the "libpng" with yourself. Or you can removed the bitmap.go ) +Or the other GCC (But you should compile the "libpng" with yourself. +Or you can removed the bitmap.go ) ``` #### For everything else (Linux 等其他系统): @@ -108,7 +109,6 @@ sudo dnf install xsel xclip ``` go get github.com/go-vgo/robotgo ``` - It's that easy! png.h: No such file or directory? Please see [issues/47](https://github.com/go-vgo/robotgo/issues/47). diff --git a/clipboard/clipboard_test.go b/clipboard/clipboard_test.go index 993d343..43f05ad 100644 --- a/clipboard/clipboard_test.go +++ b/clipboard/clipboard_test.go @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin || windows +// +build darwin windows + package clipboard_test import ( diff --git a/robotgo_mac_win.go b/robotgo_mac_win.go index de6d21a..b0486c9 100644 --- a/robotgo_mac_win.go +++ b/robotgo_mac_win.go @@ -37,6 +37,10 @@ func internalGetTitle(pid int32, args ...int32) string { // ActivePID active the window by PID, // // If args[0] > 0 on the Windows platform via a window handle to active +// +// Examples: +// ids, _ := robotgo.FindIds() +// robotgo.ActivePID(ids[0]) func ActivePID(pid int32, args ...int) error { var hwnd int if len(args) > 0 {