Wrote the documentation for Go(). Also more TODOs.

This commit is contained in:
Pietro Gagliardi 2014-08-14 09:53:29 -04:00
parent 4e120b03df
commit a2629c2bbf
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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 {