Skip to content

Commit

Permalink
Merge pull request #17 from Hoto-Cocoa/patch-1
Browse files Browse the repository at this point in the history
docs: update readme, master branch renamed to main
  • Loading branch information
gen2brain authored May 22, 2023
2 parents 4858a32 + 2752907 commit 492dc69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Note that you can also build and link against the GTK2 version, see build tags b
On macOS, you need Xcode or Command Line Tools for Xcode.

Note that support for `Cocoa` is a **work in progress**. Not everything is implemented. If you can help with Cocoa or GLCanvas, please join the IUP mailing list.
Also note that you must use and distribute binary in the `.app` directory, together with `.nib` compiled resources, see [example.app](https://github.com/gen2brain/iup-go/tree/master/dist/darwin/example.app).
Also note that you must use and distribute binary in the `.app` directory, together with `.nib` compiled resources, see [example.app](https://github.com/gen2brain/iup-go/tree/main/dist/darwin/example.app).

You can also build for GTK+ in macOS, with `gtk` build tag. It will use [Quartz](https://en.wikipedia.org/wiki/Quartz_(graphics_layer)) native rendering.
See [screenshot](examples/sample/sample_darwin_gtk.png), `.app` is not required with GTK+.
Expand Down Expand Up @@ -85,15 +85,15 @@ though not all controls and attributes are possible, check the documentation for
### Documentation

[IUP](https://www.tecgraf.puc-rio.br/iup/) documentation is nice, every Go function in doc reference there.
Also check [Go Reference](https://pkg.go.dev/github.com/gen2brain/iup-go/iup) and [Examples](https://github.com/gen2brain/iup-go/tree/master/examples).
Also check [Go Reference](https://pkg.go.dev/github.com/gen2brain/iup-go/iup) and [Examples](https://github.com/gen2brain/iup-go/tree/main/examples).

### Thread-Safety

User interface (and OpenGL) is usually not thread-safe and IUP is not thread-safe. Some platforms enforce running UI on the main thread.
Note that a goroutine can arbitrarily and randomly be scheduled or rescheduled on different running threads.

The secondary threads (goroutine) should not directly update the UI, instead, use `PostMessage` that is expected to be thread-safe.
See [example](https://github.com/gen2brain/iup-go/tree/master/examples/postmessage) that sends data to an element,
See [example](https://github.com/gen2brain/iup-go/tree/main/examples/postmessage) that sends data to an element,
that will be received by a callback when the main loop regains control. You can also use the `IdleFunc` and `Timer`.

### Cross-compile (Linux)
Expand Down Expand Up @@ -129,4 +129,4 @@ alarm: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DE

### License

iup-go is MIT licensed, same as IUP. View [LICENSE](https://github.com/gen2brain/iup-go/blob/master/LICENSE).
iup-go is MIT licensed, same as IUP. View [LICENSE](https://github.com/gen2brain/iup-go/blob/main/LICENSE).

0 comments on commit 492dc69

Please sign in to comment.