Skip to content

Commit

Permalink
rebase by 5313f8a commit
Browse files Browse the repository at this point in the history
  • Loading branch information
george012 committed Jun 11, 2024
1 parent 27a7218 commit 6b5fa6e
Show file tree
Hide file tree
Showing 231 changed files with 38,832 additions and 38,669 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.DS_Store
/fltk_build
/bin/
/FLTK.framework/
/share/

*~
*.swp
.idea/
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# go-fltk

---
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/pwiecz/go-fltk)
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/george012/fltk_go)

* [Document](./README.md)
* [中文文档](./README_zh-cn.md)
Expand All @@ -15,7 +15,7 @@ go-fltk comes with prebuilt FLTK libraries for some architectures (linux/amd64,
or build them for other architectures.
To build FLTK libraries for your platform it should be enough to call `go generate` from the root of the go-fltk source tree.

If the build procedure doesn't work for you, you can modify `fltk-build.sh` or `fltk-build.bat` yourself or ask a question on `https://github.com/pwiecz/go-fltk/discussions`.
If the build procedure doesn't work for you, you can modify `fltk-build.sh` or `fltk-build.bat` yourself or ask a question on `https://github.com/george012/fltk_go/discussions`.

For running programs built using go-fltk you will need some system libs which are normally available on operating systems with a graphical user interfaces:
- Windows: No external dependencies, besides a (for mingw64)
Expand All @@ -34,7 +34,7 @@ For running programs built using go-fltk you will need some system libs which ar
```go
package main

import "github.com/pwiecz/go-fltk"
import "github.com/george012/fltk_go"

func main() {
win := fltk.NewWindow(400, 300)
Expand Down Expand Up @@ -68,7 +68,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

// FLTK uses an RGBI color representation, the I is an index into FLTK's color map
Expand Down Expand Up @@ -136,7 +136,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand All @@ -156,4 +156,4 @@ func main() {

## Resources
- [Link](https://www.fltk.org/doc-1.4/index.html) to the official FLTK 1.4 documentation.
- [Link](https://pkg.go.dev/github.com/pwiecz/go-fltk) to go-fltk documentation.
- [Link](https://pkg.go.dev/github.com/george012/fltk_go) to go-fltk documentation.
12 changes: 6 additions & 6 deletions README_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 1. go-fltk

---
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/pwiecz/go-fltk)
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/george012/fltk_go)

* [Document](./README.md)
* [中文文档](./README_zh-cn.md)
Expand All @@ -25,7 +25,7 @@
go-fltk 带有一些架构的预构建 FLTK 库(linux/amd64, windows/amd64),但你也可以轻松地自己重建它们,或者为其他架构构建它们。
要为你的平台构建 FLTK 库,只需从 go-fltk 源代码树的根目录运行 go generate。

如果构建过程对你不起作用,你可以自行修改 fltk-build.sh 或 fltk-build.bat,或者在 https://github.com/pwiecz/go-fltk/discussions 提出问题。
如果构建过程对你不起作用,你可以自行修改 fltk-build.sh 或 fltk-build.bat,或者在 https://github.com/george012/fltk_go/discussions 提出问题。

要运行使用 go-fltk 构建的程序,你将需要一些系统库,这些库通常在带有图形用户界面的操作系统上是可用的:

Expand All @@ -45,7 +45,7 @@ go-fltk 带有一些架构的预构建 FLTK 库(linux/amd64, windows/amd64)
```go
package main

import "github.com/pwiecz/go-fltk"
import "github.com/george012/fltk_go"

func main() {
win := fltk.NewWindow(400, 300)
Expand Down Expand Up @@ -79,7 +79,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

// FLTK 使用 RGBI 颜色表示法,其中 I 是 FLTK 颜色表的索引
Expand Down Expand Up @@ -147,7 +147,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand All @@ -167,4 +167,4 @@ func main() {

## 1.5. 资源
- [官方 FLTK 1.4 文档](https://www.fltk.org/doc-1.4/index.html)
- [go-fltk 文档](https://pkg.go.dev/github.com/pwiecz/go-fltk)
- [go-fltk 文档](https://pkg.go.dev/github.com/george012/fltk_go)
2 changes: 1 addition & 1 deletion cgo_darwin_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
package fltk

// #cgo darwin,amd64 CXXFLAGS: -std=c++11
// #cgo darwin,amd64 CPPFLAGS: -I${SRCDIR}/lib/darwin/amd64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -I${SRCDIR}/include/png -I${SRCDIR}/include/zlib -I${SRCDIR}/include/jpeg -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
// #cgo darwin,amd64 CPPFLAGS: -I${SRCDIR}/lib/darwin/amd64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -I${SRCDIR}/include/png -I${SRCDIR}/include/zlib -I${SRCDIR}/include/jpeg -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
// #cgo darwin,amd64 LDFLAGS: ${SRCDIR}/lib/darwin/amd64/libfltk_images.a ${SRCDIR}/lib/darwin/amd64/libfltk_jpeg.a ${SRCDIR}/lib/darwin/amd64/libfltk_png.a ${SRCDIR}/lib/darwin/amd64/libfltk_z.a ${SRCDIR}/lib/darwin/amd64/libfltk_gl.a -framework OpenGL ${SRCDIR}/lib/darwin/amd64/libfltk_forms.a ${SRCDIR}/lib/darwin/amd64/libfltk.a -lm -lpthread -framework Cocoa
import "C"
3 changes: 2 additions & 1 deletion cgo_darwin_arm64.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//go:build darwin && arm64
// +build darwin,arm64

package fltk

// #cgo darwin,arm64 CXXFLAGS: -std=c++11
// #cgo darwin,arm64 CPPFLAGS: -I${SRCDIR}/lib/darwin/arm64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -I${SRCDIR}/include/png -I${SRCDIR}/include/zlib -I${SRCDIR}/include/jpeg -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
// #cgo darwin,arm64 CPPFLAGS: -I${SRCDIR}/lib/darwin/arm64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -I${SRCDIR}/include/png -I${SRCDIR}/include/zlib -I${SRCDIR}/include/jpeg -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
// #cgo darwin,arm64 LDFLAGS: ${SRCDIR}/lib/darwin/arm64/libfltk_images.a ${SRCDIR}/lib/darwin/arm64/libfltk_jpeg.a ${SRCDIR}/lib/darwin/arm64/libfltk_png.a ${SRCDIR}/lib/darwin/arm64/libfltk_z.a ${SRCDIR}/lib/darwin/arm64/libfltk_gl.a -framework OpenGL ${SRCDIR}/lib/darwin/arm64/libfltk_forms.a ${SRCDIR}/lib/darwin/arm64/libfltk.a -lm -lpthread -framework Cocoa
import "C"
6 changes: 6 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package config

const (
ProjectName = "fltk_go"
ProjectVersion = "v0.0.1"
)
2 changes: 1 addition & 1 deletion examples/7GUIs/cells/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/cells/panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"log"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

type Panel struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/circle/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/circle/panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"runtime"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

type Panel struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/counter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/crud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/flightbooker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/temperature/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/7GUIs/timer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"time"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/chart/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/rand"
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/choice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-dial/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

type MyDial struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/dnd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

type Sender struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/flex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

var i = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/flutter-like/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"strconv"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

// FLTK uses an RGBI color representation, the I is an index into FLTK's color map
Expand Down
2 changes: 1 addition & 1 deletion examples/grid/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/pwiecz/go-fltk"
import "github.com/george012/fltk_go"

func main() {
win := fltk.NewWindow(320, 180)
Expand Down
2 changes: 1 addition & 1 deletion examples/group/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"runtime"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/helpview/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/icons/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
_ "image/png"
"runtime"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

//go:embed 8x8.png
Expand Down
2 changes: 1 addition & 1 deletion examples/image/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/input_choice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions examples/mdviewer/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/pwiecz/go-fltk/examples/mdviewer
module github.com/george012/fltk_go/examples/mdviewer

go 1.17

replace github.com/pwiecz/go-fltk => ../../
replace github.com/george012/fltk_go => ../../

require github.com/pwiecz/go-fltk v0.0.0
require github.com/george012/fltk_go v0.0.0

require github.com/yuin/goldmark v1.4.14
1 change: 0 additions & 1 deletion examples/mdviewer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

_ "embed"

"github.com/pwiecz/go-fltk"
"github.com/yuin/goldmark"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/native_file_chooser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions examples/opengl/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/pwiecz/go-fltk/examples/opengl
module github.com/george012/fltk_go/examples/opengl

go 1.17

require (
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6
github.com/pwiecz/go-fltk v0.0.0-20220723095549-2020b5635372
github.com/george012/fltk_go v0.0.0-20220723095549-2020b5635372
)

replace github.com/pwiecz/go-fltk => ../../
replace github.com/george012/fltk_go => ../../
2 changes: 1 addition & 1 deletion examples/opengl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"log"
"runtime"

"github.com/george012/fltk_go"
"github.com/go-gl/gl/v2.1/gl"
"github.com/pwiecz/go-fltk"
)

// A port of fltk CubeView test program to Go
Expand Down
2 changes: 1 addition & 1 deletion examples/paint/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/pwiecz/go-fltk"
"github.com/george012/fltk_go"
)

func main() {
Expand Down
Loading

0 comments on commit 6b5fa6e

Please sign in to comment.