Renamed display() to areaRepaintAll() and resolved a TODO on the Mac OS X side.
This commit is contained in:
parent
9217250d5c
commit
eec2f985b0
|
@ -31,12 +31,12 @@ func newArea(ab *areabase) Area {
|
||||||
func (a *area) SetSize(width, height int) {
|
func (a *area) SetSize(width, height int) {
|
||||||
a.width = width
|
a.width = width
|
||||||
a.height = height
|
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))
|
C.moveControl(a._id, 0, 0, C.intptr_t(a.width), C.intptr_t(a.height))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *area) RepaintAll() {
|
func (a *area) RepaintAll() {
|
||||||
C.display(a._id)
|
C.areaRepaintAll(a._id)
|
||||||
}
|
}
|
||||||
|
|
||||||
//export areaView_drawRect
|
//export areaView_drawRect
|
||||||
|
|
|
@ -176,8 +176,8 @@ uintptr_t keyCode(id e)
|
||||||
return (uintptr_t) ([toNSEvent(e) keyCode]);
|
return (uintptr_t) ([toNSEvent(e) keyCode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO move to common_darwin.m?
|
// TODO is this the best way? see if we can mark a rect for repaint
|
||||||
void display(id view)
|
void areaRepaintAll(id view)
|
||||||
{
|
{
|
||||||
[toNSView(view) display];
|
[toNSView(view) display];
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,6 @@ extern intptr_t buttonNumber(id);
|
||||||
extern intptr_t clickCount(id);
|
extern intptr_t clickCount(id);
|
||||||
extern uintptr_t pressedMouseButtons(void);
|
extern uintptr_t pressedMouseButtons(void);
|
||||||
extern uintptr_t keyCode(id);
|
extern uintptr_t keyCode(id);
|
||||||
extern void display(id);
|
extern void areaRepaintAll(id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue