diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-03 10:02:27 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-03 10:02:27 -0400 |
| commit | 9eb9aa82c02a0276df38428895bd840ec8caea02 (patch) | |
| tree | 5621f946a9eac5a7c7ee94f4f3be7990f85beb2d /uitask.go | |
| parent | 8a81650b3da7ce00725336df9e03b38e935c5a65 (diff) | |
Removed uitask and made the Window creation functions only callable from the main thread. This si the first part in the real major change, which bans all concurrent use of the API and provides a Post() function for communication. I don't like this, but it's the only way. Untested.
Diffstat (limited to 'uitask.go')
| -rw-r--r-- | uitask.go | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -27,23 +27,7 @@ func Go() error { return nil } -// Ready is pulsed when Go() is ready to begin accepting requests to the safe methods. -// Go() will wait for something to receive on Ready, then Ready will be closed. -var Ready = make(chan struct{}) - // Stop should be pulsed when you are ready for Go() to return. // Pulsing Stop will cause Go() to return immediately; the programmer is responsible for cleaning up (for instance, hiding open Windows) beforehand. // Do not pulse Stop more than once. var Stop = make(chan struct{}) - -// uitask is an object of a type implemented by each uitask_***.go that does everything that needs to be communicated to the main thread. -type _uitask struct{} -var uitask = _uitask{} - -// and the required methods are: -var xuitask interface { - // creates a window - // TODO whether this waits for the window creation to finish is implementation defined? - createWindow(*Window, Control, bool) -} = uitask -// compilation will fail if uitask doesn't have all these methods |
