[Anjuta-list] How do I create this simple program in ajunta?
- From: Brian Lavender <brian brie com>
- To: anjuta-list lists sourceforge net
- Subject: [Anjuta-list] How do I create this simple program in ajunta?
- Date: Fri, 11 Jan 2008 11:57:22 -0800
I created a new project, but I am having a hard time getting a simple
gtk application working. How do I create the following in ajunta?
brian
#include <gtk/gtk.h>
gint destroyapp (GtkWidget *widget, gpointer gdata)
{
g_print ("Quitting...\n");
gtk_main_quit();
return (TRUE);
}
void button_was_clicked (GtkWidget *widget, gpointer gdata)
{
g_print("Saclug button pressed!!!!\n");
}
int main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *brianButton;
gtk_init(&argc, &argv);
window = gtk_window_new( GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(destroyapp), NULL);
brianButton = gtk_button_new_with_label("Click SacLUG");
gtk_signal_connect(GTK_OBJECT(brianButton), "clicked",
GTK_SIGNAL_FUNC(button_was_clicked), NULL);
gtk_container_add(GTK_CONTAINER(window), brianButton);
gtk_widget_show(brianButton);
gtk_widget_show(window);
gtk_main();
return 0;
}
--
Brian Lavender
http://www.brie.com/brian/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]