summaryrefslogtreecommitdiff
path: root/control.go
diff options
context:
space:
mode:
Diffstat (limited to 'control.go')
-rw-r--r--control.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/control.go b/control.go
index 03cf181..23a8ddf 100644
--- a/control.go
+++ b/control.go
@@ -130,8 +130,12 @@ func (c *ControlBase) Disable() {
// This function only works on Controls that use ControlBase.
func ControlFromLibui(c uintptr) Control {
// comma-ok form to avoid creating nil entries
- c, _ := controls[(*C.uiControl)(unsafe.Pointer(c))]
- return c
+ cc, _ := controls[(*C.uiControl)(unsafe.Pointer(c))]
+ return cc
+}
+
+func touiControl(c uintptr) *C.uiControl {
+ return (*C.uiControl)(unsafe.Pointer(c))
}
// LibuiFreeText allows implementations of Control