summaryrefslogtreecommitdiff
path: root/newctrl/button_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-18 17:03:38 -0400
committerPietro Gagliardi <[email protected]>2014-10-18 17:03:38 -0400
commitaed423a09f35e26a318bd44a6670d4222906de9a (patch)
tree01ad31d5c137859dfeae5f42094834b405971177 /newctrl/button_darwin.go
parent62048303a34f6cac733798651adb53b640e2114a (diff)
Remvoed the newctrl working directory.
Diffstat (limited to 'newctrl/button_darwin.go')
-rw-r--r--newctrl/button_darwin.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/newctrl/button_darwin.go b/newctrl/button_darwin.go
deleted file mode 100644
index 1a0cd1b..0000000
--- a/newctrl/button_darwin.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// 16 july 2014
-
-package ui
-
-import (
- "unsafe"
-)
-
-// #include "objc_darwin.h"
-import "C"
-
-type button struct {
- *controlSingleObject
- clicked *event
-}
-
-func newButton(text string) *button {
- ctext := C.CString(text)
- defer C.free(unsafe.Pointer(ctext))
- b := &button{
- controlSingleObject: newControlSingleObject(C.newButton()),
- clicked: newEvent(),
- }
- C.buttonSetText(b.id, ctext)
- C.buttonSetDelegate(b.id, unsafe.Pointer(b))
- return b
-}
-
-func (b *button) OnClicked(e func()) {
- b.clicked.set(e)
-}
-
-func (b *button) Text() string {
- return C.GoString(C.buttonText(b.id))
-}
-
-func (b *button) SetText(text string) {
- ctext := C.CString(text)
- defer C.free(unsafe.Pointer(ctext))
- C.buttonSetText(b.id, ctext)
-}
-
-//export buttonClicked
-func buttonClicked(xb unsafe.Pointer) {
- b := (*button)(unsafe.Pointer(xb))
- b.clicked.fire()
-}