From ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 30 Jun 2014 22:48:12 -0400 Subject: 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. --- area.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'area.go') 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 { -- cgit v1.2.3