From eec2f985b0a78b3c15a3e71e14f897a3ccab5c97 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 9 Aug 2014 21:27:28 -0400 Subject: [PATCH] Renamed display() to areaRepaintAll() and resolved a TODO on the Mac OS X side. --- redo/area_darwin.go | 4 ++-- redo/area_darwin.m | 4 ++-- redo/objc_darwin.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/redo/area_darwin.go b/redo/area_darwin.go index 1d715ac..ba466e1 100644 --- a/redo/area_darwin.go +++ b/redo/area_darwin.go @@ -31,12 +31,12 @@ func newArea(ab *areabase) Area { func (a *area) SetSize(width, height int) { a.width = width a.height = height - // TODO different? + // set the frame size to set the area's effective size on the Cocoa side C.moveControl(a._id, 0, 0, C.intptr_t(a.width), C.intptr_t(a.height)) } func (a *area) RepaintAll() { - C.display(a._id) + C.areaRepaintAll(a._id) } //export areaView_drawRect diff --git a/redo/area_darwin.m b/redo/area_darwin.m index 10fbbd8..1a9c7eb 100644 --- a/redo/area_darwin.m +++ b/redo/area_darwin.m @@ -176,8 +176,8 @@ uintptr_t keyCode(id e) return (uintptr_t) ([toNSEvent(e) keyCode]); } -// TODO move to common_darwin.m? -void display(id view) +// TODO is this the best way? see if we can mark a rect for repaint +void areaRepaintAll(id view) { [toNSView(view) display]; } diff --git a/redo/objc_darwin.h b/redo/objc_darwin.h index 566e190..9962c4e 100644 --- a/redo/objc_darwin.h +++ b/redo/objc_darwin.h @@ -102,6 +102,6 @@ extern intptr_t buttonNumber(id); extern intptr_t clickCount(id); extern uintptr_t pressedMouseButtons(void); extern uintptr_t keyCode(id); -extern void display(id); +extern void areaRepaintAll(id); #endif