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;
}
原文地址:https://www.cnblogs.com/faeriesoft/p/4221161.html