source: trunk/third/gtk/gtk/simple.c @ 14482

Revision 14482, 835 bytes checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14481, which included commits to RCS files with non-trunk default branches.
Line 
1#include <gtk/gtk.h>
2#include <gdk/gdkprivate.h>
3
4
5void
6hello (void)
7{
8  g_print ("hello world\n");
9}
10
11int
12main (int argc, char *argv[])
13{
14  GtkWidget *window;
15  GtkWidget *button;
16
17  gdk_progclass = g_strdup ("XTerm");
18  gtk_init (&argc, &argv);
19
20  window = gtk_widget_new (gtk_window_get_type (),
21                           "GtkObject::user_data", NULL,
22                           "GtkWindow::type", GTK_WINDOW_TOPLEVEL,
23                           "GtkWindow::title", "hello world",
24                           "GtkWindow::allow_grow", FALSE,
25                           "GtkWindow::allow_shrink", FALSE,
26                           "GtkContainer::border_width", 10,
27                           NULL);
28  button = gtk_widget_new (gtk_button_get_type (),
29                           "GtkButton::label", "hello world",
30                           "GtkObject::signal::clicked", hello, NULL,
31                           "GtkWidget::parent", window,
32                           "GtkWidget::visible", TRUE,
33                           NULL);
34  gtk_widget_show (window);
35
36  gtk_main ();
37
38  return 0;
39}
Note: See TracBrowser for help on using the repository browser.