summaryrefslogtreecommitdiff
path: root/gtkcalls_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-16 17:30:58 -0500
committerPietro Gagliardi <[email protected]>2014-02-16 17:30:58 -0500
commit7c365b39205310d042d17fcb0825e84ee19477a5 (patch)
treef58c8c42b1126e0bf16125f737d7f74c133afcd1 /gtkcalls_unix.go
parent1bcbce414287a9eecfd291522f4a8e2dd0c28102 (diff)
[GTK+] Added buttons. Things aren't quite being positioned properly yet though...
Diffstat (limited to 'gtkcalls_unix.go')
-rw-r--r--gtkcalls_unix.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go
index 0f4f818..fa69789 100644
--- a/gtkcalls_unix.go
+++ b/gtkcalls_unix.go
@@ -88,11 +88,22 @@ func gtk_container_add(container *gtkWidget, widget *gtkWidget) {
C.gtk_container_add((*C.GtkContainer)(unsafe.Pointer(container)), gtkwidget(widget))
}
-func gtk_fixed_put(container *gtkWidget, widget *gtkWidget, x int, y int) {
- C.gtk_fixed_put((*C.GtkFixed)(unsafe.Pointer(container)), gtkwidget(widget),
+func gtk_fixed_move(container *gtkWidget, widget *gtkWidget, x int, y int) {
+ C.gtk_fixed_move((*C.GtkFixed)(unsafe.Pointer(container)), gtkwidget(widget),
C.gint(x), C.gint(y))
}
func gtk_widget_set_size_request(widget *gtkWidget, width int, height int) {
C.gtk_widget_set_size_request(gtkwidget(widget), C.gint(width), C.gint(height))
}
+
+func gtk_button_new() *gtkWidget {
+ return (*gtkWidget)(unsafe.Pointer(C.gtk_button_new()))
+}
+
+func gtk_button_set_label(button *gtkWidget, label string) {
+ clabel := C.CString(label)
+ defer C.free(unsafe.Pointer(clabel))
+ C.gtk_button_set_label((*C.GtkButton)(unsafe.Pointer(button)),
+ (*C.gchar)(unsafe.Pointer(clabel)))
+}