summaryrefslogtreecommitdiff
path: root/gtkcalls_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-16 21:40:59 -0500
committerPietro Gagliardi <[email protected]>2014-02-16 21:40:59 -0500
commit6bf0b00aa36b646ca74c79f6a149f394431eb683 (patch)
tree144fc98665402328343cf7c8aff05e8bfdcb493d /gtkcalls_unix.go
parentbce4c19fddd35483534933b0db2bdb8d1549b0dd (diff)
Added GTK+ LineEdit. It appears there's something weird happening now...
Diffstat (limited to 'gtkcalls_unix.go')
-rw-r--r--gtkcalls_unix.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go
index fbea882..f4cbe54 100644
--- a/gtkcalls_unix.go
+++ b/gtkcalls_unix.go
@@ -166,3 +166,18 @@ func gtk_combo_box_get_active(widget *gtkWidget) int {
func gtk_combo_box_text_remove(widget *gtkWidget, index int) {
C.gtk_combo_box_text_remove((*C.GtkComboBoxText)(unsafe.Pointer(widget)), C.gint(index))
}
+
+func gtk_entry_new() *gtkWidget {
+ return (*gtkWidget)(unsafe.Pointer(C.gtk_entry_new()))
+}
+
+func gtk_entry_set_text(widget *gtkWidget, text string) {
+ ctext := C.CString(text)
+ defer C.free(unsafe.Pointer(ctext))
+ C.gtk_entry_set_text((*C.GtkEntry)(unsafe.Pointer(widget)),
+ (*C.gchar)(unsafe.Pointer(ctext)))
+}
+
+func gtk_entry_get_text(widget *gtkWidget) string {
+ return C.GoString((*C.char)(unsafe.Pointer(C.gtk_entry_get_text((*C.GtkEntry)(unsafe.Pointer(widget))))))
+}