Mon Jun 5 16:00:09 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll need this later, and this makes sure that the atexit for glib gets called after that for GDK, so atexits are properly ordered for object leak checking. * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call pango_x_shutdown_display() * gtk/simple.c (main): Close window on destroy.
		
			
				
	
	
		
			41 lines
		
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <gtk/gtk.h>
 | 
						|
 | 
						|
 | 
						|
void
 | 
						|
hello (void)
 | 
						|
{
 | 
						|
  g_print ("hello world\n");
 | 
						|
}
 | 
						|
 | 
						|
int
 | 
						|
main (int argc, char *argv[])
 | 
						|
{
 | 
						|
  GtkWidget *window;
 | 
						|
  GtkWidget *button;
 | 
						|
 | 
						|
  /* FIXME: This is not allowable - what is this supposed to be? */
 | 
						|
  /*  gdk_progclass = g_strdup ("XTerm"); */
 | 
						|
  gtk_init (&argc, &argv);
 | 
						|
 | 
						|
  window = gtk_widget_new (gtk_window_get_type (),
 | 
						|
			   "GtkObject::user_data", NULL,
 | 
						|
			   "GtkObject::signal::destroy", gtk_main_quit, NULL,
 | 
						|
			   "GtkWindow::type", GTK_WINDOW_TOPLEVEL,
 | 
						|
			   "GtkWindow::title", "hello world",
 | 
						|
			   "GtkWindow::allow_grow", FALSE,
 | 
						|
			   "GtkWindow::allow_shrink", FALSE,
 | 
						|
			   "GtkContainer::border_width", 10,
 | 
						|
			   NULL);
 | 
						|
  button = gtk_widget_new (gtk_button_get_type (),
 | 
						|
			   "GtkButton::label", "hello world",
 | 
						|
			   "GtkObject::signal::clicked", hello, NULL,
 | 
						|
			   "GtkWidget::parent", window,
 | 
						|
			   "GtkWidget::visible", TRUE,
 | 
						|
			   NULL);
 | 
						|
  gtk_widget_show (window);
 | 
						|
 | 
						|
  gtk_main ();
 | 
						|
 | 
						|
  return 0;
 | 
						|
}
 |