GTK+ 3: (一) Hello World!

int main (int argc, char **argv)
{
  /* Initialize i18n support */
  gtk_set_locale ();

  /* Initialize the widget set */
  gtk_init (&argc, &argv);

  /* Create the main window */
  mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  /* gtk_widget_set_size_request ( GTK_WINDOW( mainwin ), 800, 600 ); */
  /* Set up our GUI elements */
  ...

  /* Show the application window */
  gtk_widget_show_all (mainwin);

  /* Enter the main event loop, and wait for user interaction */
  gtk_main ();

  /* The user lost interest */
  return 0;
}

 

posted @ 2015-01-13 14:06  StuJnX6ry  阅读(334)  评论(0编辑  收藏  举报