GTK Buttons GTK Buttons (gtk_button, defined in gtkbutton.h) are used to create push-buttons. We can attach a callback to a 'pressed' signal, as well as to a few other signals. /* create a new button. */ GtkWidget* button = gtk_button_new_with_label("Hello World"); /* set a callback for the 'clicked' signal of the button. */ /* the given gpointer will be passed as the 'data' parameter */ /* to the callback. */ gtk_signal_connect(GTK_OBJECT(search_button), "clicked", GTK_SIGNAL_FUNC(on_button_clicked), (gpointer)"tough"); And the callback function itself: void on_button_clicked(GtkButton* button, gpointer data) { /* cast the data back to a char* */ char* txt = (char*)data; printf("on_button_clicked - '%s'\n", txt); fflush(stdout); }