Wrote the documentation for Go(). Also more TODOs.
This commit is contained in:
parent
4e120b03df
commit
a2629c2bbf
|
@ -7,5 +7,6 @@ notes:
|
||||||
- default behavior of event handlers is to do nothing
|
- default behavior of event handlers is to do nothing
|
||||||
- default behavior of event handlers that return bool is to do nothing but return false
|
- default behavior of event handlers that return bool is to do nothing but return false
|
||||||
- passing nil to an event handler set function restores default behavior
|
- passing nil to an event handler set function restores default behavior
|
||||||
|
- only functions safe for calling outside Do() are Go(), Do(), and Stop()
|
||||||
*/
|
*/
|
||||||
package ui
|
package ui
|
||||||
|
|
|
@ -53,4 +53,6 @@ windows
|
||||||
mac os x
|
mac os x
|
||||||
- applicationShouldTerminate: not handled
|
- applicationShouldTerminate: not handled
|
||||||
gtk+, mac os x
|
gtk+, mac os x
|
||||||
- default buttons, escape
|
- Area: default buttons, escape
|
||||||
|
all
|
||||||
|
- make spaced settable somehow
|
||||||
|
|
|
@ -8,8 +8,10 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Go initializes package ui.
|
// Go initializes and runs package ui.
|
||||||
// TODO write this bit
|
// It returns a non-nil error if initialization fails.
|
||||||
|
// Otherwise, it will run the event loop and not return until Stop is called.
|
||||||
|
// Due to platform-specific issues, it must be called from the main OS thread; in general, do not call Go() from anywhere except main() (including any goroutines).
|
||||||
func Go() error {
|
func Go() error {
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
if err := uiinit(); err != nil {
|
if err := uiinit(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue