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 that return bool is to do nothing but return false
|
||||
- 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
|
||||
|
|
|
@ -53,4 +53,6 @@ windows
|
|||
mac os x
|
||||
- applicationShouldTerminate: not handled
|
||||
gtk+, mac os x
|
||||
- default buttons, escape
|
||||
- Area: default buttons, escape
|
||||
all
|
||||
- make spaced settable somehow
|
||||
|
|
|
@ -8,8 +8,10 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
// Go initializes package ui.
|
||||
// TODO write this bit
|
||||
// Go initializes and runs package ui.
|
||||
// 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 {
|
||||
runtime.LockOSThread()
|
||||
if err := uiinit(); err != nil {
|
||||
|
|
Loading…
Reference in New Issue