From 1badd5368128f5fef3e12b800f40a276a7553c4a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 5 Aug 2014 17:46:42 -0400 Subject: Renamed textField to textfield; this is just for the private implementation. --- redo/textfield_darwin.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'redo/textfield_darwin.go') diff --git a/redo/textfield_darwin.go b/redo/textfield_darwin.go index cb5b8fa..22a97cf 100644 --- a/redo/textfield_darwin.go +++ b/redo/textfield_darwin.go @@ -9,52 +9,52 @@ import ( // #include "objc_darwin.h" import "C" -type textField struct { +type textfield struct { _id C.id } -func newTextField() *textField { - return &textField{ +func newTextField() *textfield { + return &textfield{ _id: C.newTextField(), } } -func newPasswordField() *textField { - return &textField{ +func newPasswordField() *textfield { + return &textfield{ _id: C.newPasswordField(), } } -func (t *textField) Text() string { +func (t *textfield) Text() string { return C.GoString(C.textFieldText(t._id)) } -func (t *textField) SetText(text string) { +func (t *textfield) SetText(text string) { ctext := C.CString(text) defer C.free(unsafe.Pointer(ctext)) C.textFieldSetText(t._id, ctext) } -func (t *textField) id() C.id { +func (t *textfield) id() C.id { return t._id } -func (t *textField) setParent(p *controlParent) { +func (t *textfield) setParent(p *controlParent) { basesetParent(t, p) } -func (t *textField) allocate(x int, y int, width int, height int, d *sizing) []*allocation { +func (t *textfield) allocate(x int, y int, width int, height int, d *sizing) []*allocation { return baseallocate(t, x, y, width, height, d) } -func (t *textField) preferredSize(d *sizing) (width, height int) { +func (t *textfield) preferredSize(d *sizing) (width, height int) { return basepreferredSize(t, d) } -func (t *textField) commitResize(a *allocation, d *sizing) { +func (t *textfield) commitResize(a *allocation, d *sizing) { basecommitResize(t, a, d) } -func (t *textField) getAuxResizeInfo(d *sizing) { +func (t *textfield) getAuxResizeInfo(d *sizing) { basegetAuxResizeInfo(t, d) } -- cgit v1.2.3