2004-03-06 03:38:59 +00:00
|
|
|
#include <config.h>
|
1997-11-24 22:37:52 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
|
|
|
|
void
|
1998-05-03 22:41:32 +00:00
|
|
|
hello (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
g_print ("hello world\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *button;
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
/* FIXME: This is not allowable - what is this supposed to be? */
|
|
|
|
/* gdk_progclass = g_strdup ("XTerm"); */
|
1997-11-24 22:37:52 +00:00
|
|
|
gtk_init (&argc, &argv);
|
2001-03-07 14:49:21 +00:00
|
|
|
|
|
|
|
window = g_object_connect (gtk_widget_new (gtk_window_get_type (),
|
|
|
|
"user_data", NULL,
|
|
|
|
"type", GTK_WINDOW_TOPLEVEL,
|
|
|
|
"title", "hello world",
|
|
|
|
"allow_grow", FALSE,
|
|
|
|
"allow_shrink", FALSE,
|
|
|
|
"border_width", 10,
|
|
|
|
NULL),
|
|
|
|
"signal::destroy", gtk_main_quit, NULL,
|
|
|
|
NULL);
|
|
|
|
button = g_object_connect (gtk_widget_new (gtk_button_get_type (),
|
|
|
|
"GtkButton::label", "hello world",
|
|
|
|
"GtkWidget::parent", window,
|
|
|
|
"GtkWidget::visible", TRUE,
|
|
|
|
NULL),
|
|
|
|
"signal::clicked", hello, NULL,
|
|
|
|
NULL);
|
1997-11-24 22:37:52 +00:00
|
|
|
gtk_widget_show (window);
|
|
|
|
|
|
|
|
gtk_main ();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|