summaryrefslogtreecommitdiff
path: root/area.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-30 22:48:12 -0400
committerPietro Gagliardi <[email protected]>2014-06-30 22:48:12 -0400
commitffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 (patch)
tree000fadd9af11843d92e7f0eee49fa90cca1379cd /area.go
parent990d50e9a153681a091a23734f8962e728fde1b0 (diff)
Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah.
Diffstat (limited to 'area.go')
-rw-r--r--area.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/area.go b/area.go
index 0871eef..1ff86ef 100644
--- a/area.go
+++ b/area.go
@@ -6,7 +6,6 @@ import (
"fmt"
"image"
"reflect"
- "sync"
"unsafe"
)
@@ -28,7 +27,6 @@ import (
// to lead to trouble.
// [FOR FUTURE PLANNING Use TextArea instead, providing a TextAreaHandler.]
type Area struct {
- lock sync.Mutex
created bool
sysData *sysData
handler AreaHandler
@@ -298,9 +296,6 @@ func NewArea(width int, height int, handler AreaHandler) *Area {
// SetSize will also signal the entirety of the Area to be redrawn as in RepaintAll.
// It panics if width or height is zero or negative.
func (a *Area) SetSize(width int, height int) {
- a.lock.Lock()
- defer a.lock.Unlock()
-
checkAreaSize(width, height, "Area.SetSize()")
if a.created {
a.sysData.setAreaSize(width, height)
@@ -313,9 +308,6 @@ func (a *Area) SetSize(width int, height int) {
// RepaintAll signals the entirety of the Area for redraw.
// If called before the Window containing the Area is created, RepaintAll does nothing.
func (a *Area) RepaintAll() {
- a.lock.Lock()
- defer a.lock.Unlock()
-
if !a.created {
return
}
@@ -323,9 +315,6 @@ func (a *Area) RepaintAll() {
}
func (a *Area) make(window *sysData) error {
- a.lock.Lock()
- defer a.lock.Unlock()
-
a.sysData.handler = a.handler
err := a.sysData.make(window)
if err != nil {